gitweb.git
Merge branch 'js/gitweb-path-info-unquote' into maint... Junio C Hamano Mon, 10 Sep 2012 22:23:46 +0000 (15:23 -0700)

Merge branch 'js/gitweb-path-info-unquote' into maint-1.7.11

"gitweb" when used with PATH_INFO failed to notice directories with
SP (and other characters that need URL-style quoting) in them.

* js/gitweb-path-info-unquote:
gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

Prepare for 1.7.11.6Junio C Hamano Fri, 24 Aug 2012 19:33:31 +0000 (12:33 -0700)

Prepare for 1.7.11.6

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

Merge branch 'mv/pull-r-for-rebase' into maint-1.7.11Junio C Hamano Fri, 24 Aug 2012 19:05:47 +0000 (12:05 -0700)

Merge branch 'mv/pull-r-for-rebase' into maint-1.7.11

A minor documentation update.

* mv/pull-r-for-rebase:
man: git pull -r is a short for --rebase

Merge branch 'jc/maint-abbrev-option-cli' into maint... Junio C Hamano Fri, 24 Aug 2012 19:05:44 +0000 (12:05 -0700)

Merge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
gitcli: describe abbreviation of long options

Merge branch 'jc/maint-rev-list-topo-doc' into maint... Junio C Hamano Fri, 24 Aug 2012 19:05:40 +0000 (12:05 -0700)

Merge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
rev-list docs: clarify --topo-order description

Merge branch 'hv/coding-guidelines' into maint-1.7.11Junio C Hamano Fri, 24 Aug 2012 19:05:35 +0000 (12:05 -0700)

Merge branch 'hv/coding-guidelines' into maint-1.7.11

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
Documentation/CodingGuidelines: spell out more shell guidelines

Merge branch 'jc/tag-doc' into maint-1.7.11Junio C Hamano Fri, 24 Aug 2012 19:05:30 +0000 (12:05 -0700)

Merge branch 'jc/tag-doc' into maint-1.7.11

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
Documentation: do not mention .git/refs/* directories

Merge branch 'mk/test-seq' into maint-1.7.11Junio C Hamano Fri, 24 Aug 2012 19:05:24 +0000 (12:05 -0700)

Merge branch 'mk/test-seq' into maint-1.7.11

Add a compatibility/utility function to the test framework.

* mk/test-seq:
tests: Introduce test_seq

Merge branch 'lp/no-cmd-http-fetch' into maint-1.7.11Junio C Hamano Fri, 24 Aug 2012 19:05:19 +0000 (12:05 -0700)

Merge branch 'lp/no-cmd-http-fetch' into maint-1.7.11

* lp/no-cmd-http-fetch:
builtin.h: remove unused cmd_<foo> declarations

Merge branch 'bw/maint-1.7.9-solaris-getpass' into... Junio C Hamano Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)

Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11

* bw/maint-1.7.9-solaris-getpass:
Enable HAVE_DEV_TTY for Solaris
terminal: seek when switching between reading and writing

Merge branch 'jk/maint-commit-check-committer-early... Junio C Hamano Fri, 24 Aug 2012 19:05:08 +0000 (12:05 -0700)

Merge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11

* jk/maint-commit-check-committer-early:
commit: check committer identity more strictly

Make the ciabot scripts completely self-configuring... Eric S. Raymond Thu, 23 Aug 2012 05:21:53 +0000 (01:21 -0400)

Make the ciabot scripts completely self-configuring in the normal case.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Improved documentation for the ciabot scripts.Eric S. Raymond Thu, 23 Aug 2012 04:10:53 +0000 (00:10 -0400)

Improved documentation for the ciabot scripts.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

contrib/ciabot: Get ciabot configuration from git variablesEric S. Raymond Wed, 22 Aug 2012 10:52:30 +0000 (06:52 -0400)

contrib/ciabot: Get ciabot configuration from git variables

These changes remove all need to modify the ciabot scripts for installation.
Instead, per-project configuration can be dome via variables in a [ciabot]
section of the config file.

Also, correct for the new server address.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

man: git pull -r is a short for --rebaseMiklos Vajna Thu, 16 Aug 2012 09:50:18 +0000 (11:50 +0200)

man: git pull -r is a short for --rebase

Letting the "--rebase" option squat on the short-and-sweet single
letter option "-r" was an unintended accident and was not even
documented, but the short option seems to be already used in the
wild. Let's document it so that other options that begin with "r"
would not be tempted to steal it.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitcli: describe abbreviation of long optionsJunio C Hamano Fri, 17 Aug 2012 06:16:22 +0000 (23:16 -0700)

gitcli: describe abbreviation of long options

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

Git 1.7.11.5 v1.7.11.5Junio C Hamano Wed, 15 Aug 2012 20:39:53 +0000 (13:39 -0700)

Git 1.7.11.5

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

Merge branch 'rj/maint-grep-remove-redundant-test'... Junio C Hamano Wed, 15 Aug 2012 20:37:20 +0000 (13:37 -0700)

Merge branch 'rj/maint-grep-remove-redundant-test' into maint

* rj/maint-grep-remove-redundant-test:
t7810-*.sh: Remove redundant test

Merge branch 'hv/link-alt-odb-entry' into maintJunio C Hamano Wed, 15 Aug 2012 20:36:47 +0000 (13:36 -0700)

Merge branch 'hv/link-alt-odb-entry' into maint

* hv/link-alt-odb-entry:
link_alt_odb_entry: fix read over array bounds reported by valgrind

rev-list docs: clarify --topo-order descriptionJunio C Hamano Wed, 15 Aug 2012 20:02:48 +0000 (13:02 -0700)

rev-list docs: clarify --topo-order description

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

Reword the description for both "--date-order" and "--topo-order",
and add an illustration to it.

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

gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFOJay Soffian Thu, 9 Aug 2012 02:29:26 +0000 (22:29 -0400)

gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

When gitweb is used as a DirectoryIndex, it attempts to strip
PATH_INFO on its own, as $cgi->url() fails to do so.

However, it fails to account for the fact that PATH_INFO has
already been URL-decoded by the web server, but the value
returned by $cgi->url() has not been. This causes the stripping
to fail whenever the URL contains encoded characters.

To see this in action, setup gitweb as a DirectoryIndex and
then use it on a repository with a directory containing a
space in the name. Navigate to tree view, examine the gitweb
generated html and you'll see a link such as:

<a href="/test.git/tree/HEAD:/directory with spaces">directory with spaces</a>

When clicked on, the browser will URL-encode this link, giving
a $cgi->url() of the form:

/test.git/tree/HEAD:/directory%20with%20spaces

While PATH_INFO is:

/test.git/tree/HEAD:/directory with spaces

Fix this by calling unescape() on both $my_url and $my_uri before
stripping PATH_INFO from them.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/CodingGuidelines: spell out more shell... Heiko Voigt Wed, 15 Aug 2012 17:06:01 +0000 (19:06 +0200)

Documentation/CodingGuidelines: spell out more shell guidelines

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

Spell some of the guidelines out.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Enable HAVE_DEV_TTY for SolarisBen Walton Tue, 7 Aug 2012 03:07:42 +0000 (23:07 -0400)

Enable HAVE_DEV_TTY for Solaris

Now that git_terminal_prompt can cleanly interact with /dev/tty on
Solaris, enable HAVE_DEV_TTY so that this code path is used for
credential reading instead of relying on the crippled getpass().

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

terminal: seek when switching between reading and writingJeff King Tue, 7 Aug 2012 04:10:26 +0000 (00:10 -0400)

terminal: seek when switching between reading and writing

When a stdio stream is opened in update mode (e.g., "w+"),
the C standard forbids switching between reading or writing
without an intervening positioning function. Many
implementations are lenient about this, but Solaris libc
will flush the recently-read contents to the output buffer.
In this instance, that meant writing the non-echoed password
that the user just typed to the terminal.

Fix it by inserting a no-op fseek between the read and
write.

The opposite direction (writing followed by reading) is also
disallowed, but our intervening fflush is an acceptable
positioning function for that alternative.

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

Prepare for 1.7.11.5Junio C Hamano Mon, 6 Aug 2012 22:51:58 +0000 (15:51 -0700)

Prepare for 1.7.11.5

Hopefully that will be the final 1.7.11.x maintenance release.

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

Merge branch 'jn/block-sha1' into maintJunio C Hamano Mon, 6 Aug 2012 22:40:00 +0000 (15:40 -0700)

Merge branch 'jn/block-sha1' into maint

* jn/block-sha1:
Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads
block-sha1: put expanded macro parameters in parentheses
block-sha1: avoid pointer conversion that violates alignment constraints

Merge branch 'jn/make-assembly-in-right-directory'... Junio C Hamano Mon, 6 Aug 2012 22:39:38 +0000 (15:39 -0700)

Merge branch 'jn/make-assembly-in-right-directory' into maint

* jn/make-assembly-in-right-directory:
Makefile: fix location of listing produced by "make subdir/foo.s"

Merge branch 'ms/daemon-doc-typo' into maintJunio C Hamano Mon, 6 Aug 2012 22:39:16 +0000 (15:39 -0700)

Merge branch 'ms/daemon-doc-typo' into maint

* ms/daemon-doc-typo:
Documentation/git-daemon: add missing word

Merge branch 'lm/git-blame-el' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:54 +0000 (15:37 -0700)

Merge branch 'lm/git-blame-el' into maint

* lm/git-blame-el:
git-blame.el: Do not use bare 0 to mean (point-min)
git-blame.el: Use with-current-buffer where appropriate
git-blame.el: Do not use goto-line in lisp code

Merge branch 'rs/ipv6-ssh-url' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:43 +0000 (15:37 -0700)

Merge branch 'rs/ipv6-ssh-url' into maint

* rs/ipv6-ssh-url:
git: Wrong parsing of ssh urls with IPv6 literals ignores port

Merge branch 'rs/git-blame-mapcar-mapc' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:28 +0000 (15:37 -0700)

Merge branch 'rs/git-blame-mapcar-mapc' into maint

* rs/git-blame-mapcar-mapc:
git-blame.el: use mapc instead of mapcar

Merge branch 'rr/doc-commit' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:09 +0000 (15:37 -0700)

Merge branch 'rr/doc-commit' into maint

* rr/doc-commit:
commit: document a couple of options

doc: A few minor copy edits.Štěpán Němec Sat, 14 Jul 2012 22:20:36 +0000 (00:20 +0200)

doc: A few minor copy edits.

- (glossary) the quotes around the Wikipedia URL prevented its
linkification in frontends that support it; remove them

- (manual) newer version (SHA-1) == following, older == preceding, not
the other way around

- trivial typo and wording fixes

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/maint-checkout-orphan-check-fix' into... Junio C Hamano Mon, 6 Aug 2012 22:31:16 +0000 (15:31 -0700)

Merge branch 'jk/maint-checkout-orphan-check-fix' into maint

* jk/maint-checkout-orphan-check-fix:
checkout: don't confuse ref and object flags

Merge branch 'mh/maint-revisions-doc' into maintJunio C Hamano Mon, 6 Aug 2012 22:30:57 +0000 (15:30 -0700)

Merge branch 'mh/maint-revisions-doc' into maint

* mh/maint-revisions-doc:
Enumerate revision range specifiers in the documentation
Make <refname> documentation more consistent.

Merge branch 'jc/mergetool-tool-help' into maintJunio C Hamano Mon, 6 Aug 2012 22:30:18 +0000 (15:30 -0700)

Merge branch 'jc/mergetool-tool-help' into maint

* jc/mergetool-tool-help:
mergetool: support --tool-help option like difftool does

Documentation: do not mention .git/refs/* directoriesJunio C Hamano Mon, 6 Aug 2012 20:36:47 +0000 (13:36 -0700)

Documentation: do not mention .git/refs/* directories

It is an implementation detail that a new tag is created by adding a
file in the .git/refs/tags directory. The only thing the user needs
to know is that a "git tag" creates a ref in the refs/tags namespace,
and without "-f", it does not overwrite an existing tag.

Inspired by a report from 乙酸鋰 <ch3cooli@gmail.com>; I think I
caught all the existing mention in Documentation/ directory in the
tip of 1.7.9.X maintenance track, but we may have added new ones
since then.

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

tests: Introduce test_seqMichał Kiedrowicz Fri, 3 Aug 2012 22:21:04 +0000 (00:21 +0200)

tests: Introduce test_seq

Jeff King wrote:

The seq command is GNU-ism, and is missing at least in older BSD
releases and their derivatives, not to mention antique
commercial Unixes.

We already purged it in b3431bc (Don't use seq in tests, not
everyone has it, 2007-05-02), but a few new instances have crept
in. They went unnoticed because they are in scripts that are not
run by default.

Replace them with test_seq that is implemented with a Perl snippet
(proposed by Jeff). This is better than inlining this snippet
everywhere it's needed because it's easier to read and it's easier
to change the implementation (e.g. to C) if we ever decide to remove
Perl from the test suite.

Note that test_seq is not a complete replacement for seq(1). It
just has what we need now, in addition that it makes it possible for
us to do something like "test_seq a m" if we wanted to in the
future.

There are also many places that do `for i in 1 2 3 ...` but I'm not sure
if it's worth converting them to test_seq. That would introduce running
more processes of Perl.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.11.4 v1.7.11.4Junio C Hamano Mon, 30 Jul 2012 20:09:25 +0000 (13:09 -0700)

Git 1.7.11.4

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

Merge branch 'jk/maint-commit-document-editmsg' into... Junio C Hamano Mon, 30 Jul 2012 20:05:36 +0000 (13:05 -0700)

Merge branch 'jk/maint-commit-document-editmsg' into maint

"$GIT_DIR/COMMIT_EDITMSG" file that is used to hold the commit log
message user edits was not documented.

* jk/maint-commit-document-editmsg:
commit: document the temporary commit message file

Merge branch 'jk/maint-advise-vaddf' into maintJunio C Hamano Mon, 30 Jul 2012 20:05:25 +0000 (13:05 -0700)

Merge branch 'jk/maint-advise-vaddf' into maint

The advise() function did not use varargs correctly to format
its message.

* jk/maint-advise-vaddf:
advice: pass varargs to strbuf_vaddf, not strbuf_addf

Merge branch 'kk/maint-commit-tree' into maintJunio C Hamano Mon, 30 Jul 2012 20:05:13 +0000 (13:05 -0700)

Merge branch 'kk/maint-commit-tree' into maint

"git commit-tree" learned a more natural "-p <parent> <tree>" order
of arguments long time ago, but recently forgot it by mistake.

* kk/maint-commit-tree:
Revert "git-commit-tree(1): update synopsis"
commit-tree: resurrect command line parsing updates

Merge branch 'jv/maint-no-ext-diff' into maintJunio C Hamano Mon, 30 Jul 2012 20:04:59 +0000 (13:04 -0700)

Merge branch 'jv/maint-no-ext-diff' into maint

"git diff --no-ext-diff" did not output anything for a typechange
filepair when GIT_EXTERNAL_DIFF is in effect.

* jv/maint-no-ext-diff:
diff: test precedence of external diff drivers
diff: correctly disable external_diff with --no-ext-diff

Merge branch 'pg/maint-1.7.9-am-where-is-patch' into... Junio C Hamano Mon, 30 Jul 2012 20:04:39 +0000 (13:04 -0700)

Merge branch 'pg/maint-1.7.9-am-where-is-patch' into maint

When "git am" failed, old timers knew to check .git/rebase-apply/patch
to see what went wrong, but we never told the users about it.

* pg/maint-1.7.9-am-where-is-patch:
am: indicate where a failed patch is to be found

Merge branch 'jl/maint-1.7.10-recurse-submodules-with... Junio C Hamano Mon, 30 Jul 2012 20:04:18 +0000 (13:04 -0700)

Merge branch 'jl/maint-1.7.10-recurse-submodules-with-symlink' into maint

When "git submodule add" clones a submodule repository, it can get
confused where to store the resulting submodule repository in the
superproject's .git/ directory when there is a symbolic link in the
path to the current directory.

* jl/maint-1.7.10-recurse-submodules-with-symlink:
submodules: don't stumble over symbolic links when cloning recursively

Merge branch 'jc/maint-filter-branch-epoch-date' into... Junio C Hamano Mon, 30 Jul 2012 20:03:40 +0000 (13:03 -0700)

Merge branch 'jc/maint-filter-branch-epoch-date' into maint

In 1.7.9 era, we taught "git rebase" about the raw timestamp format
but we did not teach the same trick to "filter-branch", which rolled
a similar logic on its own.

* jc/maint-filter-branch-epoch-date:
t7003: add test to filter a branch with a commit at epoch
date.c: Fix off by one error in object-header date parsing
filter-branch: do not forget the '@' prefix to force git-timestamp

t7810-*.sh: Remove redundant testRamsay Jones Sat, 28 Jul 2012 18:50:49 +0000 (19:50 +0100)

t7810-*.sh: Remove redundant test

Since commit bbc09c22 ("grep: rip out support for external grep",
12-01-2010), test number 60 ("grep -C1 hunk mark between files") is
essentially the same as test number 59.

Test 59 was intended to verify the behaviour of git-grep resulting
from multiple invocations of an external grep. As part of the test,
it creates and adds 1024 files to the index, which is now wasted
effort.

Remove test 59, since it is now redundant.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

link_alt_odb_entry: fix read over array bounds reported... Heiko Voigt Sat, 28 Jul 2012 15:46:36 +0000 (17:46 +0200)

link_alt_odb_entry: fix read over array bounds reported by valgrind

pfxlen can be longer than the path in objdir when relative_base
contains the path to gits object directory. Here we are interested
in checking if ent->base[] (the part that corresponds to .git/objects)
is the same string as objdir, and the code NUL-terminated ent->base[]
to

LEADING PATH\0XX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\0

in preparation for these "duplicate check" step (before we return
from the function, the first NUL is turned into '/' so that we can
fill XX when probing for loose objects). All we need to do is to
compare the string with the path to our object directory.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: don't confuse ref and object flagsJeff King Wed, 25 Jul 2012 21:57:30 +0000 (17:57 -0400)

checkout: don't confuse ref and object flags

When we are leaving a detached HEAD, we do a revision traversal to
check whether we are orphaning any commits, marking the commit we're
leaving as the start of the traversal, and all existing refs as
uninteresting.

Prior to commit 468224e5, we did so by calling for_each_ref, and
feeding each resulting refname to setup_revisions. Commit 468224e5
refactored this to simply mark the pending objects, saving an extra
lookup.

However, it confused the "flags" parameter to the each_ref_fn
clalback, which is about the flags we found while looking up the ref
with the object flag. Because REF_ISSYMREF ("this ref is a symbolic
ref, e.g. refs/remotes/origin/HEAD") happens to be the same bit
pattern as SEEN ("we have picked this object up from the pending
list and moved it to revs.commits list"), we incorrectly reported
that a commit previously at the detached HEAD will become
unreachable if the only ref that can reach the commit happens to be
pointed at by a symbolic ref.

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

Enumerate revision range specifiers in the documentationJunio C Hamano Tue, 24 Jul 2012 22:03:50 +0000 (15:03 -0700)

Enumerate revision range specifiers in the documentation

It was a bit hard to learn how <rev>^@, <rev>^! and various other
forms of range specifiers are used, because they were discussed
mostly in the prose part of the documentation, unlike various forms
of extended SHA-1 expressions that are listed in an enumerated list.

Also add a few more examples showing use of <rev>, <rev>..<rev> and
<rev>^! forms, stolen from a patch by Max Horn.

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

commit: document the temporary commit message fileJeff King Mon, 23 Jul 2012 21:13:12 +0000 (17:13 -0400)

commit: document the temporary commit message file

We do not document COMMIT_EDITMSG at all, but users may want
to know about it for two reasons:

1. They may want to tell their editor to configure itself
for formatting a commit message.

2. If a commit is aborted by an error, the user may want
to recover the commit message they typed.

Let's put a note in git-commit(1).

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

mergetool: support --tool-help option like difftool... Junio C Hamano Mon, 23 Jul 2012 21:16:12 +0000 (14:16 -0700)

mergetool: support --tool-help option like difftool does

This way we do not have to risk the list of tools going out of sync
between the implementation and the documentation.

In the same spirit as bf73fc2 (difftool: print list of valid tools
with '--tool-help', 2012-03-29), trim the list of merge backends in
the documentation. We do not want to have a complete list of valid
tools; we only want a list to help people guess what kind of things
the tools do to be specified there, and refer them to --tool-help
for a complete list.

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

commit: check committer identity more strictlyJeff King Mon, 23 Jul 2012 18:50:35 +0000 (14:50 -0400)

commit: check committer identity more strictly

The identity of the committer will ultimately be pulled from
the ident code by commit_tree(). However, we make an attempt
to check the author and committer identity early, before the
user has done any manual work like inputting a commit
message. That lets us abort without them having to worry
about salvaging the work from .git/COMMIT_EDITMSG.

The early check for committer ident does not use the
IDENT_STRICT flag, meaning that it would not find an empty
name field. The motivation was presumably because we did not
want to be too restrictive, as later calls might be more lax
(for example, when we create the reflog entry, we do not
care too much about a real name). However, because
commit_tree will always get a strict identity to put in the
commit object itself, there is no point in being lax only to
die later (and in fact it is harmful, because the user will
have wasted time typing their commit message).

Incidentally, this bug was masked prior to 060d4bb, as the
initial loose call would taint the later strict call. So the
commit would succeed (albeit with a bogus committer line in
the commit object), and nobody noticed that our early check
did not match the later one.

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

advice: pass varargs to strbuf_vaddf, not strbuf_addfJeff King Mon, 23 Jul 2012 18:48:57 +0000 (14:48 -0400)

advice: pass varargs to strbuf_vaddf, not strbuf_addf

The advise() function takes a variable number of arguments
and converts them into a va_list object to pass to strbuf
for handling. However, we accidentally called strbuf_addf
(that takes a variable number of arguments) instead of
strbuf_vaddf (that takes a va_list).

This bug dates back to v1.7.8.1-1-g23cb5bf, but we never
noticed because none of the current callers passes a string
with a format specifier in it. And the compiler did not
notice because the format string is not available at
compile time.

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

Makefile: BLK_SHA1 does not require fast htonl() and... Jonathan Nieder Mon, 23 Jul 2012 06:29:14 +0000 (01:29 -0500)

Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads

block-sha1/ is fast on most known platforms. Clarify the Makefile to
be less misleading about that.

Early versions of block-sha1/ explicitly relied on fast htonl() and
fast 32-bit loads with arbitrary alignment. Now it uses those on some
arches but the default behavior is byte-at-a-time access for the sake
of arches like ARM, Alpha, and their kin and it is still pretty fast
on these arches (fast enough to supersede the mozilla SHA1
implementation and the hand-written ARM assembler implementation that
were bundled before).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: fix location of listing produced by "make... Jonathan Nieder Sun, 22 Jul 2012 23:47:26 +0000 (18:47 -0500)

Makefile: fix location of listing produced by "make subdir/foo.s"

When I invoke "make block-sha1/sha1.s", 'make' runs $(CC) -S without
specifying where it should put its output and the output ends up in
./sha1.s. Confusing.

Add an -o option to the .s rule to fix this. We were already doing
that for most compiler invocations but had forgotten it for the
assembler listings.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: put expanded macro parameters in parenthesesJonathan Nieder Sun, 22 Jul 2012 23:40:54 +0000 (18:40 -0500)

block-sha1: put expanded macro parameters in parentheses

't' is currently always a numeric constant, but it can't hurt to
prepare for the day that it becomes useful for a caller to pass in a
more complex expression.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: avoid pointer conversion that violates... Jonathan Nieder Sun, 22 Jul 2012 23:39:54 +0000 (18:39 -0500)

block-sha1: avoid pointer conversion that violates alignment constraints

With 660231aa (block-sha1: support for architectures with memory
alignment restrictions, 2009-08-12), blk_SHA1_Update was modified to
access 32-bit chunks of memory one byte at a time on arches that
prefer that:

#define get_be32(p) ( \
(*((unsigned char *)(p) + 0) << 24) | \
(*((unsigned char *)(p) + 1) << 16) | \
(*((unsigned char *)(p) + 2) << 8) | \
(*((unsigned char *)(p) + 3) << 0) )

The code previously accessed these values by just using htonl(*p).

Unfortunately, Michael noticed on an Alpha machine that git was using
plain 32-bit reads anyway. As soon as we convert a pointer to int *,
the compiler can assume that the object pointed to is correctly
aligned as an int (C99 section 6.3.2.3 "pointer conversions"
paragraph 7), and gcc takes full advantage by using a single 32-bit
load, resulting in a whole bunch of unaligned access traps.

So we need to obey the alignment constraints even when only dealing
with pointers instead of actual values. Do so by changing the type
of 'data' to void *. This patch renames 'data' to 'block' at the same
time to make sure all references are updated to reflect the new type.

Reported-tested-and-explained-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.11.3 v1.7.11.3Junio C Hamano Sun, 22 Jul 2012 20:07:40 +0000 (13:07 -0700)

Git 1.7.11.3

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

Merge branch 'jk/push-delete-ref-error-message' into... Junio C Hamano Sun, 22 Jul 2012 20:04:25 +0000 (13:04 -0700)

Merge branch 'jk/push-delete-ref-error-message' into maint

The error message from "git push $there :bogo" (and its equivalent
"git push $there --delete bogo") mentioned that we tried and failed
to guess what ref is being deleted based on the LHS of the refspec,
which we don't.

* jk/push-delete-ref-error-message:
push: don't guess at qualifying remote refs on deletion

Merge branch 'ar/clone-honor-umask-at-top' into maintJunio C Hamano Sun, 22 Jul 2012 20:04:05 +0000 (13:04 -0700)

Merge branch 'ar/clone-honor-umask-at-top' into maint

A handful of files and directories we create had tighter than
necessary permission bits when the user wanted to have group
writability (e.g. by setting "umask 002").

* ar/clone-honor-umask-at-top:
add: create ADD_EDIT.patch with mode 0666
rerere: make rr-cache fanout directory honor umask
Restore umasks influence on the permissions of work tree created by clone

Merge branch 'cw/amend-commit-without-message' into... Junio C Hamano Sun, 22 Jul 2012 20:03:52 +0000 (13:03 -0700)

Merge branch 'cw/amend-commit-without-message' into maint

"commit --amend" used to refuse amending a commit with an empty log
message, with or without "--allow-empty-message".

* cw/amend-commit-without-message:
Allow edit of empty message with commit --amend

Merge branch 'jk/maint-commit-amend-only-no-paths'... Junio C Hamano Sun, 22 Jul 2012 20:03:29 +0000 (13:03 -0700)

Merge branch 'jk/maint-commit-amend-only-no-paths' into maint

"git commit --amend --only --" was meant to allow "Clever" people to
rewrite the commit message without making any change even when they
have already changes for the next commit added to their index, but
it never worked as advertised since it was introduced in 1.3.0 era.

* jk/maint-commit-amend-only-no-paths:
commit: fix "--amend --only" with no pathspec

Merge branch 'tg/maint-cache-name-compare' into maintJunio C Hamano Sun, 22 Jul 2012 20:01:56 +0000 (13:01 -0700)

Merge branch 'tg/maint-cache-name-compare' into maint

Even though the index can record pathnames longer than 1<<12 bytes,
in some places we were not comparing them in full, potentially
replacing index entries instead of adding.

* tg/maint-cache-name-compare:
cache_name_compare(): do not truncate while comparing paths

Merge branch 'tr/maint-show-walk' into maintJunio C Hamano Sun, 22 Jul 2012 20:01:40 +0000 (13:01 -0700)

Merge branch 'tr/maint-show-walk' into maint

"git show"'s auto-walking behaviour was an unreliable and
unpredictable hack; it now behaves just like "git log" does when it
walks.

* tr/maint-show-walk:
show: fix "range implies walking"
Demonstrate git-show is broken with ranges

Merge branch 'jc/refactor-diff-stdin' into maintJunio C Hamano Sun, 22 Jul 2012 20:01:22 +0000 (13:01 -0700)

Merge branch 'jc/refactor-diff-stdin' into maint

"git diff", "git status" and anything that internally uses the
comparison machinery was utterly broken when the difference
involved a file with "-" as its name. This was due to the way "git
diff --no-index" was incorrectly bolted on to the system, making
any comparison that involves a file "-" at the root level
incorrectly read from the standard input.

* jc/refactor-diff-stdin:
diff-index.c: "git diff" has no need to read blob from the standard input
diff-index.c: unify handling of command line paths
diff-index.c: do not pretend paths are pathspecs

Merge branch 'mz/empty-rebase-test' into maintJunio C Hamano Sun, 22 Jul 2012 20:00:55 +0000 (13:00 -0700)

Merge branch 'mz/empty-rebase-test' into maint

We did not have test to make sure "git rebase" without extra options
filters out an empty commit in the original history.

* mz/empty-rebase-test:
add test case for rebase of empty commit

Merge branch 'js/fast-export-paths-with-spaces' into... Junio C Hamano Sun, 22 Jul 2012 20:00:45 +0000 (13:00 -0700)

Merge branch 'js/fast-export-paths-with-spaces' into maint

"git fast-export" produced an input stream for fast-import without
properly quoting pathnames when they contain SPs in them.

* js/fast-export-paths-with-spaces:
fast-export: quote paths with spaces

Merge branch 'cw/no-detaching-an-unborn' into maintJunio C Hamano Sun, 22 Jul 2012 20:00:31 +0000 (13:00 -0700)

Merge branch 'cw/no-detaching-an-unborn' into maint

"git checkout --detach", when you are still on an unborn branch,
should be forbidden, but it wasn't.

* cw/no-detaching-an-unborn:
git-checkout: disallow --detach on unborn branch

Merge branch 'vr/use-our-perl-in-tests' into maintJunio C Hamano Sun, 22 Jul 2012 19:59:56 +0000 (12:59 -0700)

Merge branch 'vr/use-our-perl-in-tests' into maint

Some implementations of Perl terminates "lines" with CRLF even when
the script is operating on just a sequence of bytes. Make sure to
use "$PERL_PATH", the version of Perl the user told Git to use, in
our tests to avoid unnecessary breakages in tests.

* vr/use-our-perl-in-tests:
t/README: add a bit more Don'ts
tests: enclose $PERL_PATH in double quotes
t/test-lib.sh: export PERL_PATH for use in scripts
t: Replace 'perl' by $PERL_PATH

diff: test precedence of external diff driversJeff King Thu, 19 Jul 2012 11:49:38 +0000 (07:49 -0400)

diff: test precedence of external diff drivers

There are three ways to specify an external diff command:
GIT_EXTERNAL_DIFF in the environment, diff.external in the
config, or a "diff" gitattribute. The current order of
precedence is:

1. gitattribute

2. GIT_EXTERNAL_DIFF

3. diff.external

Usually our rule is that environment variables should take
precedence over on-disk config (i.e., option 2 should come
before option 1). However, this situation is trickier than
some, because option 1 is more specific to the individual
file than option 2 (which affects all files), so it might be
preferable. So the current behavior can be seen as
implementing "do the specific thing if we can, but fall back
to this general thing".

This is probably not what we would do if we were writing git
from scratch, but it has been this way for several years,
and is not worth changing. So let's at least document that
this is the way it's supposed to work with a test.

While we're there, let's also make sure that diff.external
(which was not previously tested at all) works by running it
through the same tests as GIT_EXTERNAL_DIFF.

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

diff: correctly disable external_diff with --no-ext... Junio C Hamano Wed, 18 Jul 2012 05:08:59 +0000 (22:08 -0700)

diff: correctly disable external_diff with --no-ext-diff

Upon seeing a type-change filepair, "diff --no-ext-diff" does not
show the usual "deletion followed by addition" split patch and does
not run the external diff driver either.

This is because the logic to disable external diff was placed at a
wrong level in the callchain. run_diff_cmd() decides to show the
split patch only when external diff driver is not configured or
specified via GIT_EXTERNAL_DIFF environment, but this is done before
checking if --no-ext-diff was given. To make things worse,
run_diff_cmd() checks --no-ext-diff and disables the output for such
a filepair completely, as the callchain below it (e.g. builtin_diff)
does not want to handle typechange filepairs.

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

Revert "git-commit-tree(1): update synopsis"Junio C Hamano Tue, 17 Jul 2012 20:11:03 +0000 (13:11 -0700)

Revert "git-commit-tree(1): update synopsis"

This reverts commit d28436736a078a429213003a9472e8caeb86c286, which
was done without realizing that the updated command line argument
order was lost by mistake.

Merge branch 'kk/maint-1.7.9-commit-tree' into kk/maint... Junio C Hamano Tue, 17 Jul 2012 20:10:49 +0000 (13:10 -0700)

Merge branch 'kk/maint-1.7.9-commit-tree' into kk/maint-commit-tree

* kk/maint-1.7.9-commit-tree:
commit-tree: resurrect command line parsing updates

commit-tree: resurrect command line parsing updatesJunio C Hamano Tue, 17 Jul 2012 20:05:13 +0000 (13:05 -0700)

commit-tree: resurrect command line parsing updates

79a9312 (commit-tree: update the command line parsing, 2011-11-09)
updated the command line parser to understand the usual "flags first
and then non-flag arguments" order, in addition to the original and
a bit unusual "tree comes first and then zero or more -p <parent>".

Unfortunately, ba3c69a (commit: teach --gpg-sign option, 2011-10-05)
broke it by mistake. Resurrect it, and protect the feature with a
test from future breakages.

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

Documentation/git-daemon: add missing wordMichael Schubert Mon, 16 Jul 2012 11:50:31 +0000 (13:50 +0200)

Documentation/git-daemon: add missing word

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: indicate where a failed patch is to be foundPaul Gortmaker Fri, 13 Jul 2012 15:51:30 +0000 (11:51 -0400)

am: indicate where a failed patch is to be found

If "git am" fails to apply something, the end user may need to know
where to find the patch that failed to apply, so that the user can
do other things (e.g. trying "GNU patch" on it, running "diffstat"
to see what it tried to change, etc.) The input to "am" may have
contained more than one patch, or the message may have been MIME
encoded, and knowing what the user fed to "am" does not help very
much for this purpose.

Also introduce advice.amworkdir configuration to allow people who
learned where to look to squelch this message.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7003: add test to filter a branch with a commit at... Junio C Hamano Thu, 12 Jul 2012 20:51:37 +0000 (13:51 -0700)

t7003: add test to filter a branch with a commit at epoch

Running filter-branch on a history that has a commit with timestamp
at epoch used to fail, but it should have been fixed. Add test to
make sure it won't break again.

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

date.c: Fix off by one error in object-header date... Junio C Hamano Thu, 12 Jul 2012 20:46:49 +0000 (13:46 -0700)

date.c: Fix off by one error in object-header date parsing

It is perfectly OK for a valid decimal integer to begin with '9' but
116eb3a (parse_date(): allow ancient git-timestamp, 2012-02-02) did
not express the range correctly.

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

submodules: don't stumble over symbolic links when... Jens Lehmann Thu, 12 Jul 2012 17:45:32 +0000 (19:45 +0200)

submodules: don't stumble over symbolic links when cloning recursively

Since 69c3051 (submodules: refactor computation of relative gitdir path)
cloning a submodule recursively fails for nested submodules when a
symbolic link is part of the path to the work tree of the superproject.

This happens when module_clone() tries to find the relative paths between
the work tree and the git dir. When a symbolic link in current $PWD points
to a directory that is at a different level, then determining the number
of "../" needed to traverse to the superproject's work tree leads to a
wrong result.

As there is no portable way to say "pwd -P", use cd_to_toplevel to remove
the link from $PWD, which fixes this problem.

A test for this issue has been added to t7406.

Reported-by: Bob Halley <halley@play-bow.org>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.11.2 v1.7.11.2Junio C Hamano Wed, 11 Jul 2012 19:55:38 +0000 (12:55 -0700)

Git 1.7.11.2

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

Merge branch 'jc/maint-blame-unique-abbrev' into maintJunio C Hamano Wed, 11 Jul 2012 19:58:28 +0000 (12:58 -0700)

Merge branch 'jc/maint-blame-unique-abbrev' into maint

"git blame" did not try to make sure that the abbreviated commit
object names in its output are unique.

* jc/maint-blame-unique-abbrev:
blame: compute abbreviation width that ensures uniqueness

Merge branch 'rj/platform-pread-may-be-thread-unsafe... Junio C Hamano Wed, 11 Jul 2012 19:57:28 +0000 (12:57 -0700)

Merge branch 'rj/platform-pread-may-be-thread-unsafe' into maint

On Cygwin, the platform pread(2) is not thread safe, just like our own
compat/ emulation, and cannot be used in the index-pack program.
Makefile variable NO_THREAD_SAFE_PREAD can be defined to avoid use of
this function in a threaded program.

* rj/platform-pread-may-be-thread-unsafe:
index-pack: Disable threading on cygwin

Merge branch 'th/diff-no-index-fixes' into maintJunio C Hamano Wed, 11 Jul 2012 19:48:44 +0000 (12:48 -0700)

Merge branch 'th/diff-no-index-fixes' into maint

"git diff --no-index" did not correctly handle relative paths and
did not correctly give exit codes when run under "--quiet" option.

* th/diff-no-index-fixes:
diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes
diff: handle relative paths in no-index

Merge branch 'nd/clone-single-fix' into maintJunio C Hamano Wed, 11 Jul 2012 19:48:29 +0000 (12:48 -0700)

Merge branch 'nd/clone-single-fix' into maint

"git clone --single-branch" to clone a single branch did not limit
the cloning to the specified branch.

* nd/clone-single-fix:
clone: fix ref selection in --single-branch --branch=xxx

Merge branch 'jc/rev-list-simplify-merges-first-parent... Junio C Hamano Wed, 11 Jul 2012 19:46:57 +0000 (12:46 -0700)

Merge branch 'jc/rev-list-simplify-merges-first-parent' into maint

When "git log" gets "--simplify-merges/by-decoration" together with
"--first-parent", the combination of these options makes the
simplification logic to use in-core commit objects that haven't been
examined for relevance, either producing incorrect result or taking
too long to produce any output. Teach the simplification logic to
ignore commits that the first-parent traversal logic ignored when
both are in effect to work around the issue.

* jc/rev-list-simplify-merges-first-parent:
revision: ignore side parents while running simplify-merges
revision: note the lack of free() in simplify_merges()
revision: "simplify" options imply topo-order sort

Merge branch 'hv/submodule-update-nuke-submodules'... Junio C Hamano Wed, 11 Jul 2012 19:46:31 +0000 (12:46 -0700)

Merge branch 'hv/submodule-update-nuke-submodules' into maint

"git add" allows adding a regular file to the path where a submodule
used to exist, but "git update-index" did not allow an equivalent
operation to Porcelain writers.

* hv/submodule-update-nuke-submodules:
update-index: allow overwriting existing submodule index entries

Merge branch 'jk/diff-no-index-pager' into maintJunio C Hamano Wed, 11 Jul 2012 19:46:21 +0000 (12:46 -0700)

Merge branch 'jk/diff-no-index-pager' into maint

"git diff --no-index" did not work with pagers correctly.

* jk/diff-no-index-pager:
do not run pager with diff --no-index --quiet
fix pager.diff with diff --no-index

Merge branch 'mm/verify-filename-fix' into maintJunio C Hamano Wed, 11 Jul 2012 19:45:49 +0000 (12:45 -0700)

Merge branch 'mm/verify-filename-fix' into maint

"git diff COPYING HEAD:COPYING" gave a nonsense error message that
claimed that the treeish HEAD did not have COPYING in it.

* mm/verify-filename-fix:
verify_filename(): ask the caller to chose the kind of diagnosis
sha1_name: do not trigger detailed diagnosis for file arguments

Merge branch 'cn/cherry-pick-range-docs' into maintJunio C Hamano Wed, 11 Jul 2012 19:45:34 +0000 (12:45 -0700)

Merge branch 'cn/cherry-pick-range-docs' into maint

The documentation for "git cherry-pick A B..C" was misleading.

* cn/cherry-pick-range-docs:
git-cherry-pick.txt: clarify the use of revision range notation
Documentation: --no-walk is no-op if range is specified

Merge branch 'jc/ustar-checksum-is-unsigned' into maintJunio C Hamano Wed, 11 Jul 2012 19:45:07 +0000 (12:45 -0700)

Merge branch 'jc/ustar-checksum-is-unsigned' into maint

"git archive" incorrectly computed the header checksum; the symptom
was observed only when using pathnames with hi-bit set.

* jc/ustar-checksum-is-unsigned:
archive: ustar header checksum is computed unsigned

Merge branch 'jc/bundle-complete-notice' into maintJunio C Hamano Wed, 11 Jul 2012 19:44:50 +0000 (12:44 -0700)

Merge branch 'jc/bundle-complete-notice' into maint

Running "git bundle verify" on a bundle that records a complete
history said "it requires these 0 commits".

* jc/bundle-complete-notice:
tweak "bundle verify" of a complete history

Merge branch 'jc/ls-files-i-dir' into maintJunio C Hamano Wed, 11 Jul 2012 19:44:34 +0000 (12:44 -0700)

Merge branch 'jc/ls-files-i-dir' into maint

"git ls-files --exclude=t -i" did not consider anything under t/ as
excluded, as it did not pay attention to exclusion of leading paths
while walking the index. Other two users of excluded() are also
updated.

* jc/ls-files-i-dir:
dir.c: make excluded() file scope static
unpack-trees.c: use path_excluded() in check_ok_to_remove()
builtin/add.c: use path_excluded()
path_excluded(): update API to less cache-entry centric
ls-files -i: micro-optimize path_excluded()
ls-files -i: pay attention to exclusion of leading paths

Merge branch 'jc/request-pull-match-tagname' into maintJunio C Hamano Wed, 11 Jul 2012 19:43:58 +0000 (12:43 -0700)

Merge branch 'jc/request-pull-match-tagname' into maint

"git request-pull $url dev" when the tip of "dev" branch was tagged
with "ext4-for-linus" used the contents from the tag in the output
but still asked the "dev" branch to be pulled, not the tag.

* jc/request-pull-match-tagname:
request-pull: really favor a matching tag

cache_name_compare(): do not truncate while comparing... Junio C Hamano Wed, 11 Jul 2012 16:08:28 +0000 (09:08 -0700)

cache_name_compare(): do not truncate while comparing paths

We failed to use ce_namelen() equivalent and instead only compared
up to the CE_NAMEMASK bytes by mistake. Adding an overlong path
that shares the same common prefix as an existing entry in the index
did not add a new entry, but instead replaced the existing one, as
the result.

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

commit: fix "--amend --only" with no pathspecJeff King Tue, 10 Jul 2012 20:40:29 +0000 (16:40 -0400)

commit: fix "--amend --only" with no pathspec

When we do not have any pathspec, we typically disallow an
explicit "--only", because it makes no sense (your commit
would, by definition, be empty). But since 6a74642
(git-commit --amend: two fixes., 2006-04-20), we have
allowed "--amend --only" with the intent that it would amend
the commit, ignoring any contents staged in the index.

However, while that commit allowed the combination, we never
actually implemented the logic to make it work. The current
code notices that we have no pathspec and assumes we want to
do an as-is commit (i.e., the "--only" is ignored).

Instead, we must make sure to follow the partial-commit
code-path. We also need to tweak the list_paths function to
handle a NULL pathspec.

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

add: create ADD_EDIT.patch with mode 0666Jeff King Tue, 10 Jul 2012 06:37:22 +0000 (02:37 -0400)

add: create ADD_EDIT.patch with mode 0666

We should be letting the user's umask take care of
restricting permissions. Even though this is a temporary
file and probably nobody would notice, this brings us in
line with other temporary file creations in git (e.g.,
choosing "e"dit from git-add--interactive).

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

filter-branch: do not forget the '@' prefix to force... Junio C Hamano Mon, 9 Jul 2012 23:53:34 +0000 (16:53 -0700)

filter-branch: do not forget the '@' prefix to force git-timestamp

For some reason, this script reinvents, instead of refactoring the
existing one in git-sh-setup, the logic to grab ident information
from an existing commit; it was missed when the corresponding logic
in git-sh-setup was updated with 2c733fb (parse_date(): '@' prefix
forces git-timestamp, 2012-02-02).

Teach the script that it is OK to have a way ancient timestamp in
the commits that are being filtered.

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

rerere: make rr-cache fanout directory honor umaskJunio C Hamano Mon, 9 Jul 2012 23:27:49 +0000 (16:27 -0700)

rerere: make rr-cache fanout directory honor umask

This is the last remaining call to mkdir(2) that restricts the permission
bits by passing 0755. Just use the same mkdir_in_gitdir() used to create
the leaf directories.

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

Restore umasks influence on the permissions of work... Alex Riesen Sat, 7 Jul 2012 21:50:30 +0000 (23:50 +0200)

Restore umasks influence on the permissions of work tree created by clone

The original version of the git-clone just used mkdir(1) to create
the working directories. The version rewritten in C creates all
directories inside the working tree by using the mode argument of
0777 when calling mkdir(2) to let the umask take effect.

But the top-level directory of the working tree is created by
passing the mode argument of 0755 to mkdir(2), which results in an
overly tight restriction if the user wants to make directories group
writable with a looser umask like 002.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>