gitweb.git
push: --follow-tagsJunio C Hamano Mon, 4 Mar 2013 20:09:50 +0000 (12:09 -0800)

push: --follow-tags

The new option "--follow-tags" tells "git push" to push annotated
tags that are missing from the other side and that can be reached by
the history that is otherwise pushed out.

For example, if you are using the "simple", "current", or "upstream"
push, you would ordinarily push the history leading to the commit at
your current HEAD and nothing else. With this option, you would
also push all annotated tags that can be reached from that commit to
the other side.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit.c: use clear_commit_marks_many() in in_merge_bas... Junio C Hamano Tue, 5 Mar 2013 19:56:03 +0000 (11:56 -0800)

commit.c: use clear_commit_marks_many() in in_merge_bases_many()

Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit.c: add in_merge_bases_many()Junio C Hamano Mon, 4 Mar 2013 18:16:42 +0000 (10:16 -0800)

commit.c: add in_merge_bases_many()

Similar to in_merge_bases(commit, other) that returns true when
commit is an ancestor (i.e. in the merge bases between the two) of
the other commit, in_merge_bases_many(commit, n_other, other[])
checks if commit is an ancestor of any of the other[] commits.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit.c: add clear_commit_marks_many()Junio C Hamano Tue, 5 Mar 2013 19:42:20 +0000 (11:42 -0800)

commit.c: add clear_commit_marks_many()

clear_commit_marks(struct commit *, unsigned) only can clear flag
bits starting from a single commit; introduce an API to allow
feeding an array of commits, so that flag bits can be cleared from
commits reachable from any of them with a single traversal.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.1.5 v1.8.1.5Junio C Hamano Fri, 1 Mar 2013 21:15:29 +0000 (13:15 -0800)

Git 1.8.1.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make !pattern in .gitattributes non-fatalThomas Rast Fri, 1 Mar 2013 20:06:17 +0000 (21:06 +0100)

Make !pattern in .gitattributes non-fatal

Before 82dce99 (attr: more matching optimizations from .gitignore,
2012-10-15), .gitattributes did not have any special treatment of a
leading '!'. The docs, however, always said

The rules how the pattern matches paths are the same as in
`.gitignore` files; see linkgit:gitignore[5].

By those rules, leading '!' means pattern negation. So 82dce99
correctly determined that this kind of line makes no sense and should
be disallowed.

However, users who actually had a rule for files starting with a '!'
are in a bad position: before 82dce99 '!' matched that literal
character, so it is conceivable that users have .gitattributes with
such lines in them. After 82dce99 the unescaped version was
disallowed in such a way that git outright refuses to run(!) most
commands in the presence of such a .gitattributes. It therefore
becomes very hard to fix, let alone work with, such repositories.

Let's at least allow the users to fix their repos: change the fatal
error into a warning.

Reported-by: mathstuf@gmail.com
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'wk/user-manual' into maintJunio C Hamano Fri, 1 Mar 2013 18:37:40 +0000 (10:37 -0800)

Merge branch 'wk/user-manual' into maint

* wk/user-manual:
user-manual: Flesh out uncommitted changes and submodule updates
user-manual: Use request-pull to generate "please pull" text
user-manual: Reorganize the reroll sections, adding 'git rebase -i'

Documentation/githooks: Fix linkgitAndrew Wong Fri, 1 Mar 2013 17:23:57 +0000 (12:23 -0500)

Documentation/githooks: Fix linkgit

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.1.5Junio C Hamano Wed, 27 Feb 2013 18:09:59 +0000 (10:09 -0800)

Update draft release notes to 1.8.1.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ef/non-ascii-parse-options-error-diag... Junio C Hamano Wed, 27 Feb 2013 18:04:26 +0000 (10:04 -0800)

Merge branch 'ef/non-ascii-parse-options-error-diag' into maint

* ef/non-ascii-parse-options-error-diag:
parse-options: report uncorrupted multi-byte options

Merge branch 'wk/man-deny-current-branch-is-default... Junio C Hamano Wed, 27 Feb 2013 18:01:21 +0000 (10:01 -0800)

Merge branch 'wk/man-deny-current-branch-is-default-these-days' into maint

* wk/man-deny-current-branch-is-default-these-days:
user-manual: typofix (ofthe->of the)
user-manual: Update for receive.denyCurrentBranch=refuse

Merge branch 'jn/less-reconfigure' into maintJunio C Hamano Wed, 27 Feb 2013 17:59:19 +0000 (09:59 -0800)

Merge branch 'jn/less-reconfigure' into maint

* jn/less-reconfigure:
Makefile: avoid infinite loop on configure.ac change

Documentation/submodule: Add --force to update synopsisBrad King Wed, 27 Feb 2013 00:41:34 +0000 (19:41 -0500)

Documentation/submodule: Add --force to update synopsis

In commit 9db31bdf (submodule: Add --force option for git submodule
update, 2011-04-01) we added the option to the implementation's usage
synopsis but forgot to add it to the synopsis in the command
documentation. Add the option to the synopsis in the same location it
is reported in usage and re-wrap the options to avoid long lines.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prepare for 1.8.1.5Junio C Hamano Mon, 25 Feb 2013 16:15:40 +0000 (08:15 -0800)

Prepare for 1.8.1.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/mention-tracking-for-pull-default... Junio C Hamano Mon, 25 Feb 2013 16:04:19 +0000 (08:04 -0800)

Merge branch 'jc/mention-tracking-for-pull-default' into maint

* jc/mention-tracking-for-pull-default:
doc: mention tracking for pull.default

Merge branch 'mm/config-intro-in-git-doc' into maintJunio C Hamano Mon, 25 Feb 2013 16:04:17 +0000 (08:04 -0800)

Merge branch 'mm/config-intro-in-git-doc' into maint

* mm/config-intro-in-git-doc:
git.txt: update description of the configuration mechanism

Merge branch 'da/p4merge-mktemp-fix' into maintJunio C Hamano Mon, 25 Feb 2013 16:04:05 +0000 (08:04 -0800)

Merge branch 'da/p4merge-mktemp-fix' into maint

* da/p4merge-mktemp-fix:
p4merge: fix printf usage

Merge branch 'bw/get-tz-offset-perl' into maintJunio C Hamano Mon, 25 Feb 2013 16:04:03 +0000 (08:04 -0800)

Merge branch 'bw/get-tz-offset-perl' into maint

* bw/get-tz-offset-perl:
cvsimport: format commit timestamp ourselves without using strftime
perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases
Move Git::SVN::get_tz to Git::get_tz_offset

Merge branch 'al/mergetool-printf-fix' into maintJunio C Hamano Mon, 25 Feb 2013 16:04:01 +0000 (08:04 -0800)

Merge branch 'al/mergetool-printf-fix' into maint

* al/mergetool-printf-fix:
difftool--helper: fix printf usage
git-mergetool: print filename when it contains %

Merge branch 'jx/utf8-printf-width' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:59 +0000 (08:03 -0800)

Merge branch 'jx/utf8-printf-width' into maint

* jx/utf8-printf-width:
Add utf8_fprintf helper that returns correct number of columns

Merge branch 'mg/bisect-doc' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:57 +0000 (08:03 -0800)

Merge branch 'mg/bisect-doc' into maint

* mg/bisect-doc:
git-bisect.txt: clarify that reset quits bisect

Merge branch 'sp/smart-http-content-type-check' into... Junio C Hamano Mon, 25 Feb 2013 16:03:54 +0000 (08:03 -0800)

Merge branch 'sp/smart-http-content-type-check' into maint

* sp/smart-http-content-type-check:
http_request: reset "type" strbuf before adding
t5551: fix expected error output
Verify Content-Type from smart HTTP servers

Merge branch 'jc/combine-diff-many-parents' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:51 +0000 (08:03 -0800)

Merge branch 'jc/combine-diff-many-parents' into maint

* jc/combine-diff-many-parents:
t4038: add tests for "diff --cc --raw <trees>"
combine-diff: lift 32-way limit of combined diff

Merge branch 'jk/apply-similaritly-parsing' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:44 +0000 (08:03 -0800)

Merge branch 'jk/apply-similaritly-parsing' into maint

* jk/apply-similaritly-parsing:
builtin/apply: tighten (dis)similarity index parsing

Merge branch 'jk/remote-helpers-doc' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:37 +0000 (08:03 -0800)

Merge branch 'jk/remote-helpers-doc' into maint

* jk/remote-helpers-doc:
Rename {git- => git}remote-helpers.txt

Merge branch 'ab/gitweb-use-same-scheme' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:34 +0000 (08:03 -0800)

Merge branch 'ab/gitweb-use-same-scheme' into maint

* ab/gitweb-use-same-scheme:
gitweb: refer to picon/gravatar images over the same scheme

Merge branch 'zk/clean-report-failure' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:32 +0000 (08:03 -0800)

Merge branch 'zk/clean-report-failure' into maint

* zk/clean-report-failure:
git-clean: Display more accurate delete messages

Merge branch 'nd/clone-no-separate-git-dir-with-bare... Junio C Hamano Mon, 25 Feb 2013 16:03:27 +0000 (08:03 -0800)

Merge branch 'nd/clone-no-separate-git-dir-with-bare' into maint

* nd/clone-no-separate-git-dir-with-bare:
clone: forbid --bare --separate-git-dir <dir>

Merge branch 'da/p4merge-mktemp' into maintJunio C Hamano Mon, 25 Feb 2013 16:03:20 +0000 (08:03 -0800)

Merge branch 'da/p4merge-mktemp' into maint

* da/p4merge-mktemp:
mergetools/p4merge: Honor $TMPDIR for the /dev/null placeholder

Documentation: "advice" is uncountableGreg Price Mon, 25 Feb 2013 05:27:20 +0000 (00:27 -0500)

Documentation: "advice" is uncountable

"Advice" is a mass noun, not a count noun; it's not ordinarily
pluralized.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: avoid infinite loop on configure.ac changeJeff King Thu, 21 Feb 2013 06:26:14 +0000 (01:26 -0500)

Makefile: avoid infinite loop on configure.ac change

If you are using autoconf and change the configure.ac, the
Makefile will notice that config.status is older than
configure.ac, and will attempt to rebuild and re-run the
configure script to pick up your changes. The first step in
doing so is to run "make configure". Unfortunately, this
tries to include config.mak.autogen, which depends on
config.status, which depends on configure.ac; so we must
rebuild config.status. Which leads to us running "make
configure", and so on.

It's easy to demonstrate with:

make configure
./configure
touch configure.ac
make

We can break this cycle by not re-invoking make to build
"configure", and instead just putting its rules inline into
our config.status rebuild procedure. We can avoid a copy by
factoring the rules into a make variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.1.4 v1.8.1.4Junio C Hamano Tue, 19 Feb 2013 05:48:05 +0000 (05:48 +0000)

Git 1.8.1.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ob/imap-send-ssl-verify' into maintJunio C Hamano Wed, 20 Feb 2013 05:54:15 +0000 (21:54 -0800)

Merge branch 'ob/imap-send-ssl-verify' into maint

* ob/imap-send-ssl-verify:
imap-send: support subjectAltName as well
imap-send: the subject of SSL certificate must match the host
imap-send: move #ifdef around

imap-send: support subjectAltName as wellOswald Buddenhagen Fri, 15 Feb 2013 20:59:53 +0000 (12:59 -0800)

imap-send: support subjectAltName as well

Check not only the common name of the certificate subject, but also
check the subject alternative DNS names as well, when verifying that
the certificate matches that of the host we are trying to talk to.

Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: the subject of SSL certificate must match... Oswald Buddenhagen Fri, 15 Feb 2013 20:50:35 +0000 (12:50 -0800)

imap-send: the subject of SSL certificate must match the host

We did not check a valid certificate's subject at all, and would
have happily talked with a wrong host after connecting to an
incorrect address and getting a valid certificate that does not
belong to the host we intended to talk to.

Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Flesh out uncommitted changes and submodul... W. Trevor King Tue, 19 Feb 2013 10:05:02 +0000 (05:05 -0500)

user-manual: Flesh out uncommitted changes and submodule updates

If you try and update a submodule with a dirty working directory, you
get an error message like:

$ git submodule update
error: Your local changes to the following files would be overwritten by checkout:
...
Please, commit your changes or stash them before you can switch branches.
Aborting
...

Mention this in the submodule notes. The previous phrase was short
enough that I originally thought it might have been referring to the
reflog note (obviously, uncommitted changes will not show up in the
reflog either ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Use request-pull to generate "please pull... W. Trevor King Tue, 19 Feb 2013 10:05:01 +0000 (05:05 -0500)

user-manual: Use request-pull to generate "please pull" text

Less work and more error checking (e.g. does a merge base exist?).
Add an explicit push before request-pull to satisfy request-pull,
which checks to make sure the references are publically available.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Reorganize the reroll sections, adding... W. Trevor King Tue, 19 Feb 2013 10:05:00 +0000 (05:05 -0500)

user-manual: Reorganize the reroll sections, adding 'git rebase -i'

I think this interface is often more convenient than extended cherry
picking or using 'git format-patch'. In fact, I removed the
cherry-pick section entirely. The entry-level suggestions for
rerolling are now:

1. git commit --amend
2. git format-patch origin
git reset --hard origin
...edit and reorder patches...
git am *.patch
3. git rebase -i origin

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: move #ifdef aroundJunio C Hamano Fri, 15 Feb 2013 20:32:19 +0000 (12:32 -0800)

imap-send: move #ifdef around

Instead of adding an early return to the inside of the
ssl_socket_connect() function for NO_OPENSSL compilation, split it
into a separate stub function.

No functional change, but the next change to extend ssl_socket_connect()
will become easier to read this way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: typofix (ofthe->of the)Junio C Hamano Mon, 18 Feb 2013 20:43:00 +0000 (12:43 -0800)

user-manual: typofix (ofthe->of the)

Noticed by Drew Northup

Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: use -o latest.tar.gz to create a gzipped... W. Trevor King Mon, 18 Feb 2013 00:16:01 +0000 (19:16 -0500)

user-manual: use -o latest.tar.gz to create a gzipped tarball

This functionality was introduced by 0e804e09 (archive: provide
builtin .tar.gz filter, 2011-07-21) for v1.7.7.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: use 'git config --global user.*' for setupW. Trevor King Mon, 18 Feb 2013 00:15:58 +0000 (19:15 -0500)

user-manual: use 'git config --global user.*' for setup

A simple command line call is easier than spawning an editor,
especially for folks new to ideas like the "command line" and "text
editors". This is also the approach suggested by 'git commit' if you
try and commit without having configured user.name or user.email.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: mention 'git remote add' for remote branch... W. Trevor King Mon, 18 Feb 2013 00:15:56 +0000 (19:15 -0500)

user-manual: mention 'git remote add' for remote branch config

I hardly ever setup remote.<name>.url using 'git config'. While it
may be instructive to do so, we should also point out 'git remote
add'.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: give 'git push -f' as an alternative to... W. Trevor King Mon, 18 Feb 2013 00:15:55 +0000 (19:15 -0500)

user-manual: give 'git push -f' as an alternative to +master

This mirrors existing language in the description of 'git fetch'.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: use 'remote add' to setup push URLsW. Trevor King Mon, 18 Feb 2013 00:15:53 +0000 (19:15 -0500)

user-manual: use 'remote add' to setup push URLs

There is no need to use here documents to setup this configuration.
It is easier, less confusing, and more robust to use `git remote add`
directly.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git.txt: update description of the configuration mechanismMatthieu Moy Thu, 14 Feb 2013 15:36:54 +0000 (16:36 +0100)

git.txt: update description of the configuration mechanism

The old Git version where it appeared is now useful only to historians,
not to normal users. Also, the text was mentioning only the per-repo
config file, but this is a good place to teach that customization can
also be made per-user.

While at it, remove a now-defunct e-mail from an example.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Update for receive.denyCurrentBranch=refuseW. Trevor King Fri, 8 Feb 2013 17:04:20 +0000 (12:04 -0500)

user-manual: Update for receive.denyCurrentBranch=refuse

acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

7d182f5 (Documentation: receive.denyCurrentBranch defaults to
'refuse', 2010-03-17) updated Documentation/config.txt, but forgot to
update the user manual.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Replace filepattern with pathspec for consistencyMatthieu Moy Tue, 12 Feb 2013 09:24:44 +0000 (10:24 +0100)

Replace filepattern with pathspec for consistency

pathspec is the most widely used term, and is the one defined in
gitglossary.txt. <filepattern> was used only in the synopsys for git-add
and git-commit, and in git-add.txt. Get rid of it.

This patch is obtained with by running:

perl -pi -e 's/filepattern/pathspec/' `git grep -l filepattern`

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-options: report uncorrupted multi-byte optionsErik Faye-Lund Mon, 11 Feb 2013 23:13:48 +0000 (00:13 +0100)

parse-options: report uncorrupted multi-byte options

Because our command-line parser considers only one byte at the time
for short-options, we incorrectly report only the first byte when
multi-byte input was provided. This makes user-errors slightly
awkward to diagnose for instance under UTF-8 locale and non-English
keyboard layouts.

Report the whole argument-string when a non-ASCII short-option is
detected.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Improved-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add utf8_fprintf helper that returns correct number... Jiang Xin Sat, 9 Feb 2013 06:31:09 +0000 (14:31 +0800)

Add utf8_fprintf helper that returns correct number of columns

Since command usages can be translated, they may include utf-8
encoded strings, and the output in console may not align well any
more. This is because strlen() is different from strwidth() on utf-8
strings.

A wrapper utf8_fprintf() can help to return the correct number of
columns required.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-bisect.txt: clarify that reset quits bisectMichael J Gruber Mon, 11 Feb 2013 08:35:04 +0000 (09:35 +0100)

git-bisect.txt: clarify that reset quits bisect

"reset" can be easily misunderstood as resetting a bisect session to its
start without finishing it. Clarify that it actually quits the bisect
session.

Reported-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Rewrite git-gc section for automatic packingW. Trevor King Sun, 10 Feb 2013 15:10:27 +0000 (10:10 -0500)

user-manual: Rewrite git-gc section for automatic packing

This should have happened back in 2007, when `git gc` learned about
auto (e9831e8, git-gc --auto: add documentation, 2007-09-17).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Fix 'you - Git' -> 'you--Git' typoW. Trevor King Sun, 10 Feb 2013 15:10:39 +0000 (10:10 -0500)

user-manual: Fix 'you - Git' -> 'you--Git' typo

Use an em-dash, not a hyphen, to join these clauses.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Fix 'http' -> 'HTTP' typosW. Trevor King Sun, 10 Feb 2013 15:10:37 +0000 (10:10 -0500)

user-manual: Fix 'http' -> 'HTTP' typos

HTTP is an acronym which has not (yet) made the transition to word
status (unlike "laser", probably because lasers are inherently cooler
than HTTP ;).

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

user-manual: Fix 'both: so' -> 'both; so' typoW. Trevor King Sun, 10 Feb 2013 15:10:36 +0000 (10:10 -0500)

user-manual: Fix 'both: so' -> 'both; so' typo

The clause "so `git log ...` will return no commits..." is
independent, not a description of "both", so a semicolon is more
appropriate.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

p4merge: fix printf usageDavid Aguilar Sun, 10 Feb 2013 01:21:25 +0000 (17:21 -0800)

p4merge: fix printf usage

Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

difftool--helper: fix printf usageDavid Aguilar Sun, 10 Feb 2013 01:21:25 +0000 (17:21 -0800)

difftool--helper: fix printf usage

Do not use a random string as if it is a format string for printf
when showing it literally; instead feed it to '%s' format.

Reported-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsimport: format commit timestamp ourselves without... Ben Walton Sat, 9 Feb 2013 21:46:58 +0000 (21:46 +0000)

cvsimport: format commit timestamp ourselves without using strftime

Some implementations of strftime(3) lack support for "%z". Also
there is no need for %s in git-cvsimport as the supplied time is
already in seconds since the epoch.

For %z, use the function get_tz_offset provided by Git.pm instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perl/Git.pm: fix get_tz_offset to properly handle DST... Ben Walton Sat, 9 Feb 2013 21:46:57 +0000 (21:46 +0000)

perl/Git.pm: fix get_tz_offset to properly handle DST boundary cases

When passed a local time that was on the boundary of a DST change,
get_tz_offset returned a GMT offset that was incorrect (off by one
hour). This is because the time was converted to GMT and then back to
a time stamp via timelocal() which cannot disambiguate boundary cases
as noted in its documentation.

Modify this algorithm, using an approach suggested in

http://article.gmane.org/gmane.comp.version-control.git/213871

to first convert the timestamp in question to two broken down forms
with localtime() and gmtime(), and then compute what timestamps
these two broken down forms would represent in GMT (i.e. a timezone
that does not have DST issues) by applying timegm() on them. The
difference between the resulting timestamps is the timezone offset.

This avoids the ambigious conversion and allows a correct time to be
returned on every occassion.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Move Git::SVN::get_tz to Git::get_tz_offsetBen Walton Sat, 9 Feb 2013 21:46:56 +0000 (21:46 +0000)

Move Git::SVN::get_tz to Git::get_tz_offset

This function has utility outside of the SVN module for any routine
that needs the equivalent of GNU strftime's %z formatting option.
Move it to the top-level Git.pm so that non-SVN modules don't need to
import the SVN module to use it.

The rename makes the purpose of the function clearer.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-mergetool: print filename when it contains %Asheesh Laroia Fri, 8 Feb 2013 01:16:24 +0000 (17:16 -0800)

git-mergetool: print filename when it contains %

If git-mergetool was invoked with files with a percent sign (%) in
their names, it would print an error. For example, if you were
calling mergetool on a file called "%2F":

printf: %2F: invalid directive

Do not pass random string to printf as if it were a valid format.
Use format string "%s" and pass the string as data to be formatted
instead.

Signed-off-by: Asheesh Laroia <asheesh@asheesh.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.1.3 v1.8.1.3Junio C Hamano Thu, 7 Feb 2013 23:21:10 +0000 (15:21 -0800)

Git 1.8.1.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mz/pick-unborn' into maintJunio C Hamano Thu, 7 Feb 2013 23:16:04 +0000 (15:16 -0800)

Merge branch 'mz/pick-unborn' into maint

"git cherry-pick" did not replay a root commit to an unborn branch.

* mz/pick-unborn:
learn to pick/revert into unborn branch
tests: move test_cmp_rev to test-lib-functions

Merge branch 'nd/fix-perf-parameters-in-tests' into... Junio C Hamano Thu, 7 Feb 2013 23:16:00 +0000 (15:16 -0800)

Merge branch 'nd/fix-perf-parameters-in-tests' into maint

* nd/fix-perf-parameters-in-tests:
test-lib.sh: unfilter GIT_PERF_*

Merge branch 'jc/do-not-let-random-file-interfere-with... Junio C Hamano Thu, 7 Feb 2013 23:15:23 +0000 (15:15 -0800)

Merge branch 'jc/do-not-let-random-file-interfere-with-completion-tests' into maint

Scripts to test bash completion was inherently flaky as it was
affected by whatever random things the user may have on $PATH.

* jc/do-not-let-random-file-interfere-with-completion-tests:
t9902: protect test from stray build artifacts

Merge branch 'ft/transport-report-segv' into maintJunio C Hamano Thu, 7 Feb 2013 23:15:08 +0000 (15:15 -0800)

Merge branch 'ft/transport-report-segv' into maint

A failure to push due to non-ff while on an unborn branch
dereferenced a NULL pointer when showing an error message.

* ft/transport-report-segv:
push: fix segfault when HEAD points nowhere

Merge branch 'sb/gpg-plug-fd-leak' into maintJunio C Hamano Thu, 7 Feb 2013 23:14:54 +0000 (15:14 -0800)

Merge branch 'sb/gpg-plug-fd-leak' into maint

We forgot to close the file descriptor reading from "gpg" output,
killing "git log --show-signature" on a long history.

* sb/gpg-plug-fd-leak:
gpg: close stderr once finished with it in verify_signed_buffer()

Merge branch 'jc/fake-ancestor-with-non-blobs' into... Junio C Hamano Thu, 7 Feb 2013 23:14:22 +0000 (15:14 -0800)

Merge branch 'jc/fake-ancestor-with-non-blobs' into maint

Rebasing the history of superproject with change in the submodule
has been broken since v1.7.12.

* jc/fake-ancestor-with-non-blobs:
apply: diagnose incomplete submodule object name better
apply: simplify build_fake_ancestor()
git-am: record full index line in the patch used while rebasing

Merge branch 'jn/auto-depend-workaround-buggy-ccache... Junio C Hamano Thu, 7 Feb 2013 23:13:34 +0000 (15:13 -0800)

Merge branch 'jn/auto-depend-workaround-buggy-ccache' into maint

Buggy versions of ccache broke the auto-generation of dependencies.

* jn/auto-depend-workaround-buggy-ccache:
Makefile: explicitly set target name for autogenerated dependencies

http_request: reset "type" strbuf before addingJeff King Wed, 6 Feb 2013 10:39:52 +0000 (05:39 -0500)

http_request: reset "type" strbuf before adding

Callers may pass us a strbuf which we use to record the
content-type of the response. However, we simply appended to
it rather than overwriting its contents, meaning that cruft
in the strbuf gave us a bogus type. E.g., the multiple
requests triggered by http_request could yield a type like
"text/plainapplication/x-git-receive-pack-advertisement".

Reported-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4038: add tests for "diff --cc --raw <trees>"John Keeping Tue, 5 Feb 2013 21:39:49 +0000 (21:39 +0000)

t4038: add tests for "diff --cc --raw <trees>"

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5551: fix expected error outputJunio C Hamano Tue, 5 Feb 2013 00:21:42 +0000 (16:21 -0800)

t5551: fix expected error output

We should probably get rid of the check of message instead, but in
the meantime this should do.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Verify Content-Type from smart HTTP serversShawn Pearce Thu, 31 Jan 2013 21:02:07 +0000 (13:02 -0800)

Verify Content-Type from smart HTTP servers

Before parsing a suspected smart-HTTP response verify the returned
Content-Type matches the standard. This protects a client from
attempting to process a payload that smells like a smart-HTTP
server response.

JGit has been doing this check on all responses since the dawn of
time. I mistakenly failed to include it in git-core when smart HTTP
was introduced. At the time I didn't know how to get the Content-Type
from libcurl. I punted, meant to circle back and fix this, and just
plain forgot about it.

Signed-off-by: Shawn Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Start preparing for 1.8.1.3Junio C Hamano Mon, 4 Feb 2013 18:21:10 +0000 (10:21 -0800)

Start preparing for 1.8.1.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'bc/git-p4-for-python-2.4' into maintJunio C Hamano Mon, 4 Feb 2013 18:04:57 +0000 (10:04 -0800)

Merge branch 'bc/git-p4-for-python-2.4' into maint

* bc/git-p4-for-python-2.4:
INSTALL: git-p4 does not support Python 3
git-p4.py: support Python 2.4
git-p4.py: support Python 2.5

Merge branch 'nd/edit-branch-desc-while-detached' into... Junio C Hamano Mon, 4 Feb 2013 18:04:44 +0000 (10:04 -0800)

Merge branch 'nd/edit-branch-desc-while-detached' into maint

Attempt to "branch --edit-description" an existing branch, while
being on a detached HEAD, errored out.

* nd/edit-branch-desc-while-detached:
branch: no detached HEAD check when editing another branch's description

Merge branch 'jn/do-not-drop-username-when-reading... Junio C Hamano Mon, 4 Feb 2013 18:04:26 +0000 (10:04 -0800)

Merge branch 'jn/do-not-drop-username-when-reading-from-etc-mailname' into maint

We used to stuff "user@" and then append what we read from
/etc/mailname to come up with a default e-mail ident, but a bug lost
the "user@" part.

* jn/do-not-drop-username-when-reading-from-etc-mailname:
ident: do not drop username when reading from /etc/mailname

Merge branch 'jk/cvsimport-does-not-work-with-cvsps3... Junio C Hamano Mon, 4 Feb 2013 18:04:22 +0000 (10:04 -0800)

Merge branch 'jk/cvsimport-does-not-work-with-cvsps3' into maint

* jk/cvsimport-does-not-work-with-cvsps3:
git-cvsimport.txt: cvsps-2 is deprecated

Merge branch 'dl/am-hg-locale' into maintJunio C Hamano Mon, 4 Feb 2013 18:04:10 +0000 (10:04 -0800)

Merge branch 'dl/am-hg-locale' into maint

"git am" did not parse datestamp correctly from Hg generated patch,
when it is run in a locale outside C (or en)

* dl/am-hg-locale:
am: invoke perl's strftime in C locale

Merge branch 'jc/help' into maintJunio C Hamano Mon, 4 Feb 2013 18:04:06 +0000 (10:04 -0800)

Merge branch 'jc/help' into maint

* jc/help:
help: include <common-cmds.h> only in one file

Merge branch 'jc/merge-blobs' into maintJunio C Hamano Mon, 4 Feb 2013 18:03:41 +0000 (10:03 -0800)

Merge branch 'jc/merge-blobs' into maint

* jc/merge-blobs:
Makefile: Replace merge-file.h with merge-blobs.h in LIB_H
merge-tree: fix d/f conflicts
merge-tree: add comments to clarify what these functions are doing
merge-tree: lose unused "resolve_directories"
merge-tree: lose unused "flags" from merge_list
Which merge_file() function do you mean?

Merge branch 'jc/doc-maintainer' into maintJunio C Hamano Mon, 4 Feb 2013 18:03:35 +0000 (10:03 -0800)

Merge branch 'jc/doc-maintainer' into maint

* jc/doc-maintainer:
howto/maintain: document "### match next" convention in jch/pu branch
howto/maintain: mark titles for asciidoc
Documentation: update "howto maintain git"

Merge branch 'bc/fix-array-syntax-for-3.0-in-completion... Junio C Hamano Mon, 4 Feb 2013 18:03:13 +0000 (10:03 -0800)

Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint

Command line completion code was inadvertently made incompatible with
older versions of bash by using a newer array notation.

* bc/fix-array-syntax-for-3.0-in-completion-bash:
git-completion.bash: replace zsh notation that breaks bash 3.X

builtin/apply: tighten (dis)similarity index parsingJohn Keeping Sun, 3 Feb 2013 14:37:11 +0000 (14:37 +0000)

builtin/apply: tighten (dis)similarity index parsing

This was prompted by an incorrect warning issued by clang [1], and a
suggestion by Linus to restrict the range to check for values greater
than INT_MAX since these will give bogus output after casting to int.

In fact the (dis)similarity index is a percentage, so reject values
greater than 100.

[1] http://article.gmane.org/gmane.comp.version-control.git/213857

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

combine-diff: lift 32-way limit of combined diffJunio C Hamano Sun, 3 Feb 2013 21:08:18 +0000 (13:08 -0800)

combine-diff: lift 32-way limit of combined diff

The "raw" format of combine-diff output is supposed to have as many
colons as there are parents at the beginning, then blob modes for
these parents, and then object names for these parents.

We weren't however prepared to handle a more than 32-way merge and
did not show the correct number of colons in such a case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: explicitly set target name for autogenerated... Jonathan Nieder Fri, 18 Nov 2011 23:23:24 +0000 (17:23 -0600)

Makefile: explicitly set target name for autogenerated dependencies

"gcc -MF depfile -MMD -MP -c -o path/to/file.o" produces a makefile
snippet named "depfile" describing what files are needed to build the
target given by "-o". When ccache versions before v3.0pre0~187 (Fix
handling of the -MD and -MDD options, 2009-11-01) run, they execute

gcc -MF depfile -MMD -MP -E

instead to get the final content for hashing. Notice that the "-c -o"
combination is replaced by "-E". The result is a target name without
a leading path.

Thus when building git with such versions of ccache with
COMPUTE_HEADER_DEPENDENCIES enabled, the generated makefile snippets
define dependencies for the wrong target:

$ make builtin/add.o
GIT_VERSION = 1.7.8.rc3
* new build flags or prefix
CC builtin/add.o
$ head -1 builtin/.depend/add.o.d
add.o: builtin/add.c cache.h git-compat-util.h compat/bswap.h strbuf.h \

After a change in a header file, object files in a subdirectory are
not automatically rebuilt by "make":

$ touch cache.h
$ make builtin/add.o
$

Luckily we can prevent trouble by explicitly supplying the name of the
target to ccache and gcc, using the -MQ option. Do so.

Reported-and-tested-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reported-by: : 허종만 <jongman.heo@samsung.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Rename {git- => git}remote-helpers.txtJohn Keeping Thu, 31 Jan 2013 21:59:50 +0000 (21:59 +0000)

Rename {git- => git}remote-helpers.txt

When looking up a topic via "git help <topic>", git-help prepends "git-"
to topics that are the names of commands (either builtin or found on the
path) and "git" (no hyphen) to any other topic name.

"git-remote-helpers" is not the name of a command, so "git help
remote-helpers" looks for "gitremote-helpers" and does not find it.

Fix this by renaming "git-remote-helpers.txt" to
"gitremote-helpers.txt".

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: diagnose incomplete submodule object name betterJunio C Hamano Fri, 1 Feb 2013 03:33:27 +0000 (19:33 -0800)

apply: diagnose incomplete submodule object name better

"git am -3" uses this function to build a tree that records how the
preimage the patch was created from would have looked like. An
abbreviated object name on the index line is ordinarily sufficient
for us to figure out the object name the preimage tree would have
contained, but a change to a submodule by definition shows an object
name of a submodule commit which our repository should not have, and
get_sha1_blob() is not an appropriate way to read it (or get_sha1()
for that matter).

Use get_sha1_hex() and complain if we do not find a full object name
there.

We could read from the payload part of the patch to learn the full
object name of the commit, but the primary user "git rebase" has
been fixed to give us a full object name, so this should suffice
for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

apply: simplify build_fake_ancestor()Junio C Hamano Fri, 1 Feb 2013 03:19:44 +0000 (19:19 -0800)

apply: simplify build_fake_ancestor()

The local variable sha1_ptr in the build_fake_ancestor() function
used to either point at the null_sha1[] (if the ancestor did not
have the path) or at sha1[] (if we read the object name into the
local array), but 7a98869 (apply: get rid of --index-info in favor
of --build-fake-ancestor, 2007-09-17) made the "missing in the
ancestor" case unnecessary, hence sha1_ptr, when used, always points
at the local array.

Get rid of the unneeded variable, and restructure the if/else
cascade a bit to make it easier to read. There should be no
behaviour change.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: record full index line in the patch used while... Junio C Hamano Fri, 1 Feb 2013 03:26:21 +0000 (19:26 -0800)

git-am: record full index line in the patch used while rebasing

Earlier, a230949 (am --rebasing: get patch body from commit, not
from mailbox, 2012-06-26) learned to regenerate patch body from the
commit object while rebasing, instead of reading from the rebase-am
front-end. While doing so, it used "git diff-tree" but without
giving it the "--full-index" option.

This does not matter for in-repository objects; during rebasing, any
abbreviated object name should uniquely identify them.

But we may be rebasing a commit that contains a change to a gitlink,
in which case we usually should not have the object (it names a
commit in the submodule). A full object name is necessary to later
reconstruct a fake ancestor index for them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: mention tracking for pull.defaultJunio C Hamano Thu, 31 Jan 2013 20:50:38 +0000 (12:50 -0800)

doc: mention tracking for pull.default

When looking at a configuration file edited long time ago, a user
may find 'pull.default = tracking' and wonder what it means, but
earlier we stopped mentioning this value, even though the code still
support it and more importantly, we have no intention to force old
timers to update their configuration files.

Instead of not mentioning it, add it to the description in a way
that makes it clear that users have no reason to add new uses of it
preferring over 'upstream', by not listing it as a separate item on
the same footing as other values but as a deprecated synonym of the
'upstream' in its description.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

gpg: close stderr once finished with it in verify_signe... Stephen Boyd Thu, 31 Jan 2013 18:18:40 +0000 (10:18 -0800)

gpg: close stderr once finished with it in verify_signed_buffer()

Failing to close the stderr pipe in verify_signed_buffer() causes
git to run out of file descriptors if there are many calls to
verify_signed_buffer(). An easy way to trigger this is to run

git log --show-signature --merges | grep "key"

on the linux kernel git repo. Eventually it will fail with

error: cannot create pipe for gpg: Too many open files
error: could not run gpg.

Close the stderr pipe so that this can't happen.

Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: fix segfault when HEAD points nowhereFraser Tweedale Thu, 31 Jan 2013 12:22:51 +0000 (22:22 +1000)

push: fix segfault when HEAD points nowhere

After a push of a branch other than the current branch fails in
a no-ff error and if you are still on an unborn branch, the code
recently added to report the failure dereferenced a null pointer
while checking the name of the current branch.

Signed-off-by: Fraser Tweedale <frase@frase.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

INSTALL: git-p4 does not support Python 3Junio C Hamano Wed, 30 Jan 2013 19:17:59 +0000 (11:17 -0800)

INSTALL: git-p4 does not support Python 3

Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: no detached HEAD check when editing another... Nguyễn Thái Ngọc Duy Mon, 28 Jan 2013 01:18:13 +0000 (08:18 +0700)

branch: no detached HEAD check when editing another branch's description

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tb/t0050-maint' into maintJunio C Hamano Wed, 30 Jan 2013 15:47:46 +0000 (07:47 -0800)

Merge branch 'tb/t0050-maint' into maint

Update tests that were expecting to fail due to a bug that was
fixed earlier.

* tb/t0050-maint:
t0050: Use TAB for indentation
t0050: honor CASE_INSENSITIVE_FS in add (with different case)
t0050: known breakage vanished in merge (case change)

Merge branch 'nd/fix-directory-attrs-off-by-one' into... Junio C Hamano Tue, 29 Jan 2013 19:18:54 +0000 (11:18 -0800)

Merge branch 'nd/fix-directory-attrs-off-by-one' into maint

The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does. The initial implementation of this that was
merged to 'maint' and 1.8.1.1 had severe performance degradations.

* nd/fix-directory-attrs-off-by-one:
attr: avoid calling find_basename() twice per path
attr: fix off-by-one directory component length calculation

Merge branch 'ph/rebase-preserve-all-merges' into maintJunio C Hamano Tue, 29 Jan 2013 19:18:31 +0000 (11:18 -0800)

Merge branch 'ph/rebase-preserve-all-merges' into maint

"git rebase --preserve-merges" lost empty merges in recent versions
of Git.

* ph/rebase-preserve-all-merges:
rebase --preserve-merges: keep all merge commits including empty ones

README: update stale and/or incorrect informationJunio C Hamano Tue, 29 Jan 2013 19:10:58 +0000 (11:10 -0800)

README: update stale and/or incorrect information

Ramkumar Ramachandra noticed that the old address for the marc
archive no longer works. Update it to its marc.info address,
and also refer to the gmane site.

Remove the reference to "note from the maintainer", which is not
usually followed by any useful discussion on status, direction nor
tasks.

Also replace the reference to "What's in git.git" with "What's
cooking".

Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: refer to picon/gravatar images over the same... Andrej E Baranov Mon, 28 Jan 2013 23:41:32 +0000 (00:41 +0100)

gitweb: refer to picon/gravatar images over the same scheme

With the current code, the images from picon and gravatar are
requested over http://, and browsers give mixed contents warning
when gitweb is served over https://.

Just drop the scheme: part from the URL, so that these external
sites are accessed over https:// in such a case.

Signed-off-by: Andrej E Baranov <admin@andrej-andb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>