gitweb.git
Merge branch 'master' of github.com:jiangxin/git into... Jiang Xin Sat, 5 Sep 2015 01:23:31 +0000 (09:23 +0800)

Merge branch 'master' of github.com:jiangxin/git into master

* 'master' of github.com:jiangxin/git:
l10n: zh_CN: Update Git Glossary: "commit message"
l10n: zh_CN: Update Git Glossary: pickaxe
l10n: zh_CN: Update Git Glossary: fork
l10n: zh_CN: Update Git Glossary: tag
l10n: zh_CN: Update Git Glossary: "dumb", "smart"
l10n: zh_CN: Update Git Glossary: SHA-1
l10n: zh_CN: Add Surrounding Spaces
l10n: zh_CN: Add translations for Git glossary
l10n: TEAMS: stash inactive zh_CN team members
l10n: zh_CN: Update Translation of "tag"
l10n: zh_CN: Unify Translation of "packfile"
l10n: zh_CN: Update Translation: "tag object"

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)Jiang Xin Sat, 5 Sep 2015 01:21:10 +0000 (09:21 +0800)

l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)

Generate po/git.pot from v2.6.0-rc0-24-gec371ff for git v2.6.0 l10n
round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

git_connect: clear GIT_* environment for sshJeff King Fri, 4 Sep 2015 22:40:08 +0000 (18:40 -0400)

git_connect: clear GIT_* environment for ssh

When we "switch" to another local repository to run the server
side of a fetch or push, we must clear the variables in
local_repo_env so that our local $GIT_DIR, etc, do not
pollute the upload-pack or receive-pack that is executing in
the "remote" repository.

We have never done so for ssh connections. For the most
part, nobody has noticed because ssh will not pass unknown
environment variables by default. However, it is not out of
the question for a user to configure ssh to pass along GIT_*
variables using SendEnv/AcceptEnv.

We can demonstrate the problem by using "git -c" on a local
command and seeing its impact on a remote repository. This
config ends up in $GIT_CONFIG_PARAMETERS. In the local case,
the config has no impact, but in the ssh transport, it does
(our test script has a fake ssh that passes through all
environment variables; this isn't normal, but does simulate
one possible setup).

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

Sync with maintJunio C Hamano Fri, 4 Sep 2015 21:34:57 +0000 (14:34 -0700)

Sync with maint

* maint:

Git 2.5.2 v2.5.2Junio C Hamano Fri, 4 Sep 2015 17:46:00 +0000 (10:46 -0700)

Git 2.5.2

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

Sync with 2.4.9Junio C Hamano Fri, 4 Sep 2015 17:43:23 +0000 (10:43 -0700)

Sync with 2.4.9

Git 2.4.9 v2.4.9Junio C Hamano Fri, 4 Sep 2015 17:36:00 +0000 (10:36 -0700)

Git 2.4.9

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

Sync with 2.3.9Junio C Hamano Fri, 4 Sep 2015 17:34:19 +0000 (10:34 -0700)

Sync with 2.3.9

Git 2.3.9 v2.3.9Junio C Hamano Fri, 4 Sep 2015 17:31:34 +0000 (10:31 -0700)

Git 2.3.9

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

Sync with 2.2.3Junio C Hamano Fri, 4 Sep 2015 17:29:28 +0000 (10:29 -0700)

Sync with 2.2.3

Git 2.2.3 v2.2.3Junio C Hamano Fri, 4 Sep 2015 17:25:47 +0000 (10:25 -0700)

Git 2.2.3

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

Merge branch 'jk/long-paths' into maint-2.2Junio C Hamano Fri, 4 Sep 2015 17:25:23 +0000 (10:25 -0700)

Merge branch 'jk/long-paths' into maint-2.2

show-branch: use a strbuf for reflog descriptionsJeff King Wed, 19 Aug 2015 18:12:48 +0000 (14:12 -0400)

show-branch: use a strbuf for reflog descriptions

When we show "branch@{0}", we format into a fixed-size
buffer using sprintf. This can overflow if you have long
branch names. We can fix it by using a temporary strbuf.

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

read_info_alternates: handle paths larger than PATH_MAXJeff King Wed, 19 Aug 2015 18:12:45 +0000 (14:12 -0400)

read_info_alternates: handle paths larger than PATH_MAX

This function assumes that the relative_base path passed
into it is no larger than PATH_MAX, and writes into a
fixed-size buffer. However, this path may not have actually
come from the filesystem; for example, add_submodule_odb
generates a path using a strbuf and passes it in. This is
hard to trigger in practice, though, because the long
submodule directory would have to exist on disk before we
would try to open its info/alternates file.

We can easily avoid the bug, though, by simply creating the
filename on the heap.

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

notes: use a strbuf in add_non_noteJeff King Wed, 19 Aug 2015 18:12:41 +0000 (14:12 -0400)

notes: use a strbuf in add_non_note

When we are loading a notes tree into our internal hash
table, we also collect any files that are clearly non-notes.
We format the name of the file into a PATH_MAX buffer, but
unlike true notes (which cannot be larger than a fanned-out
sha1 hash), these tree entries can be arbitrarily long,
overflowing our buffer.

We can fix this by switching to a strbuf. It doesn't even
cost us an extra allocation, as we can simply hand ownership
of the buffer over to the non-note struct.

This is of moderate security interest, as you might fetch
notes trees from an untrusted remote. However, we do not do
so by default, so you would have to manually fetch into the
notes namespace.

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

verify_absent: allow filenames longer than PATH_MAXJeff King Wed, 19 Aug 2015 18:12:37 +0000 (14:12 -0400)

verify_absent: allow filenames longer than PATH_MAX

When unpack-trees wants to know whether a path will
overwrite anything in the working tree, we use lstat() to
see if there is anything there. But if we are going to write
"foo/bar", we can't just lstat("foo/bar"); we need to look
for leading prefixes (e.g., "foo"). So we use the lstat cache
to find the length of the leading prefix, and copy the
filename up to that length into a temporary buffer (since
the original name is const, we cannot just stick a NUL in
it).

The copy we make goes into a PATH_MAX-sized buffer, which
will overflow if the prefix is longer than PATH_MAX. How
this happens is a little tricky, since in theory PATH_MAX is
the biggest path we will have read from the filesystem. But
this can happen if:

- the compiled-in PATH_MAX does not accurately reflect
what the filesystem is capable of

- the leading prefix is not _quite_ what is on disk; it
contains the next element from the name we are checking.
So if we want to write "aaa/bbb/ccc/ddd" and "aaa/bbb"
exists, the prefix of interest is "aaa/bbb/ccc". If
"aaa/bbb" approaches PATH_MAX, then "ccc" can overflow
it.

So this can be triggered, but it's hard to do. In
particular, you cannot just "git clone" a bogus repo. The
verify_absent checks happen before unpack-trees writes
anything to the filesystem, so there are never any leading
prefixes during the initial checkout, and the bug doesn't
trigger. And by definition, these files are larger than
PATH_MAX, so writing them will fail, and clone will
complain (though it may write a partial path, which will
cause a subsequent "git checkout" to hit the bug).

We can fix it by creating the temporary path on the heap.
The extra malloc overhead is not important, as we are
already making at least one stat() call (and probably more
for the prefix discovery).

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

Merge branch 'ee/clean-test-fixes' into maintJunio C Hamano Fri, 4 Sep 2015 02:18:05 +0000 (19:18 -0700)

Merge branch 'ee/clean-test-fixes' into maint

* ee/clean-test-fixes:
t7300: fix broken && chains

Merge branch 'jk/log-missing-default-HEAD' into maintJunio C Hamano Fri, 4 Sep 2015 02:18:03 +0000 (19:18 -0700)

Merge branch 'jk/log-missing-default-HEAD' into maint

"git init empty && git -C empty log" said "bad default revision 'HEAD'",
which was found to be a bit confusing to new users.

* jk/log-missing-default-HEAD:
log: diagnose empty HEAD more clearly

Merge branch 'cc/trailers-corner-case-fix' into maintJunio C Hamano Fri, 4 Sep 2015 02:18:03 +0000 (19:18 -0700)

Merge branch 'cc/trailers-corner-case-fix' into maint

The "interpret-trailers" helper mistook a multi-paragraph title of
a commit log message with a colon in it as the end of the trailer
block.

* cc/trailers-corner-case-fix:
trailer: support multiline title
trailer: retitle a test and correct an in-comment message
trailer: ignore first line of message

Merge branch 'dt/commit-preserve-base-index-upon-opport... Junio C Hamano Fri, 4 Sep 2015 02:18:02 +0000 (19:18 -0700)

Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update' into maint

When re-priming the cache-tree opportunistically while committing
the in-core index as-is, we mistakenly invalidated the in-core
index too aggressively, causing the experimental split-index code
to unnecessarily rewrite the on-disk index file(s).

* dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update:
commit: don't rewrite shared index unnecessarily

Merge branch 'rs/archive-zip-many' into maintJunio C Hamano Fri, 4 Sep 2015 02:18:01 +0000 (19:18 -0700)

Merge branch 'rs/archive-zip-many' into maint

"git archive" did not use zip64 extension when creating an archive
with more than 64k entries, which nobody should need, right ;-)?

* rs/archive-zip-many:
archive-zip: support more than 65535 entries
archive-zip: use a local variable to store the creator version
t5004: test ZIP archives with many entries

Merge branch 'jc/calloc-pathspec' into maintJunio C Hamano Fri, 4 Sep 2015 02:18:00 +0000 (19:18 -0700)

Merge branch 'jc/calloc-pathspec' into maint

Minor code cleanup.

* jc/calloc-pathspec:
ps_matched: xcalloc() takes nmemb and then element size

Merge branch 'ss/fix-config-fd-leak' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:59 +0000 (19:17 -0700)

Merge branch 'ss/fix-config-fd-leak' into maint

* ss/fix-config-fd-leak:
config: close config file handle in case of error

Merge branch 'sg/wt-status-header-inclusion' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:57 +0000 (19:17 -0700)

Merge branch 'sg/wt-status-header-inclusion' into maint

* sg/wt-status-header-inclusion:
wt-status: move #include "pathspec.h" to the header

Merge branch 'po/po-readme' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:56 +0000 (19:17 -0700)

Merge branch 'po/po-readme' into maint

Doc updates for i18n.

* po/po-readme:
po/README: Update directions for l10n contributors

Merge branch 'sg/t3020-typofix' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:54 +0000 (19:17 -0700)

Merge branch 'sg/t3020-typofix' into maint

* sg/t3020-typofix:
t3020: fix typo in test description

Merge branch 'as/docfix-reflog-expire-unreachable'... Junio C Hamano Fri, 4 Sep 2015 02:17:53 +0000 (19:17 -0700)

Merge branch 'as/docfix-reflog-expire-unreachable' into maint

Docfix.

* as/docfix-reflog-expire-unreachable:
Documentation/config: fix inconsistent label on gc.*.reflogExpireUnreachable

Merge branch 'nd/fixup-linked-gitdir' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:53 +0000 (19:17 -0700)

Merge branch 'nd/fixup-linked-gitdir' into maint

The code in "multiple-worktree" support that attempted to recover
from an inconsistent state updated an incorrect file.

* nd/fixup-linked-gitdir:
setup: update the right file in multiple checkouts

Merge branch 'jk/rev-list-has-no-notes' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:52 +0000 (19:17 -0700)

Merge branch 'jk/rev-list-has-no-notes' into maint

"git rev-list" does not take "--notes" option, but did not complain
when one is given.

* jk/rev-list-has-no-notes:
rev-list: make it obvious that we do not support notes

Merge branch 'jk/fix-alias-pager-config-key-warnings... Junio C Hamano Fri, 4 Sep 2015 02:17:52 +0000 (19:17 -0700)

Merge branch 'jk/fix-alias-pager-config-key-warnings' into maint

Because the configuration system does not allow "alias.0foo" and
"pager.0foo" as the configuration key, the user cannot use '0foo'
as a custom command name anyway, but "git 0foo" tried to look these
keys up and emitted useless warnings before saying '0foo is not a
git command'. These warning messages have been squelched.

* jk/fix-alias-pager-config-key-warnings:
config: silence warnings for command names with invalid keys

Merge branch 'nd/dwim-wildcards-as-pathspecs' into... Junio C Hamano Fri, 4 Sep 2015 02:17:51 +0000 (19:17 -0700)

Merge branch 'nd/dwim-wildcards-as-pathspecs' into maint

Test updates for Windows.

* nd/dwim-wildcards-as-pathspecs:
t2019: skip test requiring '*' in a file name non Windows

Merge branch 'sg/help-group' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:51 +0000 (19:17 -0700)

Merge branch 'sg/help-group' into maint

We rewrote one of the build scripts in Perl but this reimplements
in Bourne shell.

* sg/help-group:
generate-cmdlist: re-implement as shell script

Merge branch 'ps/t1509-chroot-test-fixup' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:50 +0000 (19:17 -0700)

Merge branch 'ps/t1509-chroot-test-fixup' into maint

t1509 test that requires a dedicated VM environment had some
bitrot, which has been corrected.

* ps/t1509-chroot-test-fixup:
tests: fix cleanup after tests in t1509-root-worktree
tests: fix broken && chains in t1509-root-worktree

Merge branch 'jh/strbuf-read-use-read-in-full' into... Junio C Hamano Fri, 4 Sep 2015 02:17:50 +0000 (19:17 -0700)

Merge branch 'jh/strbuf-read-use-read-in-full' into maint

strbuf_read() used to have one extra iteration (and an unnecessary
strbuf_grow() of 8kB), which was eliminated.

* jh/strbuf-read-use-read-in-full:
strbuf_read(): skip unnecessary strbuf_grow() at eof

Merge branch 'jk/long-error-messages' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:49 +0000 (19:17 -0700)

Merge branch 'jk/long-error-messages' into maint

The codepath to produce error messages had a hard-coded limit to
the size of the message, primarily to avoid memory allocation while
calling die().

* jk/long-error-messages:
vreportf: avoid intermediate buffer
vreportf: report to arbitrary filehandles

Merge branch 'cb/open-noatime-clear-errno' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:49 +0000 (19:17 -0700)

Merge branch 'cb/open-noatime-clear-errno' into maint

When trying to see that an object does not exist, a state errno
leaked from our "first try to open a packfile with O_NOATIME and
then if it fails retry without it" logic on a system that refuses
O_NOATIME. This confused us and caused us to die, saying that the
packfile is unreadable, when we should have just reported that the
object does not exist in that packfile to the caller.

* cb/open-noatime-clear-errno:
git_open_noatime: return with errno=0 on success

Merge branch 'mh/get-remote-group-fix' into maintJunio C Hamano Fri, 4 Sep 2015 02:17:47 +0000 (19:17 -0700)

Merge branch 'mh/get-remote-group-fix' into maint

An off-by-one error made "git remote" to mishandle a remote with a
single letter nickname.

* mh/get-remote-group-fix:
get_remote_group(): use skip_prefix()
get_remote_group(): eliminate superfluous call to strcspn()
get_remote_group(): rename local variable "space" to "wordlen"
get_remote_group(): handle remotes with single-character names

t6300: add tests for "-local" date formatsJohn Keeping Thu, 3 Sep 2015 21:49:01 +0000 (22:49 +0100)

t6300: add tests for "-local" date formats

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

t6300: make UTC and local dates differentJohn Keeping Thu, 3 Sep 2015 21:49:00 +0000 (22:49 +0100)

t6300: make UTC and local dates different

By setting the UTC time to 23:18:43 the date in +0200 is the following
day, 2006-07-04. This will ensure that the test for "short-local" to be
added in the following patch tests for different output from the "short"
format.

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

date: make "local" orthogonal to date formatJeff King Thu, 3 Sep 2015 21:48:59 +0000 (22:48 +0100)

date: make "local" orthogonal to date format

Most of our "--date" modes are about the format of the date:
which items we show and in what order. But "--date=local" is
a bit of an oddball. It means "show the date in the normal
format, but using the local timezone". The timezone we use
is orthogonal to the actual format, and there is no reason
we could not have "localized iso8601", etc.

This patch adds a "local" boolean field to "struct
date_mode", and drops the DATE_LOCAL element from the
date_mode_type enum (it's now just DATE_NORMAL plus
local=1). The new feature is accessible to users by adding
"-local" to any date mode (e.g., "iso-local"), and we retain
"local" as an alias for "default-local" for backwards
compatibility.

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

date: check for "local" before anything elseJohn Keeping Thu, 3 Sep 2015 21:48:58 +0000 (22:48 +0100)

date: check for "local" before anything else

In a following commit we will make "local" orthogonal to the format.
Although this will not apply to "relative", which does not use the
timezone, it applies to all other formats so move the timezone
conversion to the start of the function.

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

t6300: add test for "raw" date formatJohn Keeping Thu, 3 Sep 2015 21:48:57 +0000 (22:48 +0100)

t6300: add test for "raw" date format

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

t6300: introduce test_date() helperJohn Keeping Thu, 3 Sep 2015 21:48:56 +0000 (22:48 +0100)

t6300: introduce test_date() helper

This moves the setup of the "expected" file inside the test case. The
helper function has the advantage that we can use SQ in the file content
without needing to escape the quotes.

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

fast-import: switch crash-report date to iso8601Jeff King Thu, 3 Sep 2015 21:48:55 +0000 (22:48 +0100)

fast-import: switch crash-report date to iso8601

When fast-import emits a crash report, it does so in the
user's local timezone. But because we omit the timezone
completely for DATE_LOCAL, a reader of the report does not
immediately know which time zone was used. Let's switch this
to ISO8601 instead, which includes the time zone.

This does mean we will show the time in UTC, but that's not
a big deal. A crash report like this will either be looked
at immediately (in which case nobody even looks at the
timestamp), or it will be passed along to a developer to
debug, in which case the original timezone is less likely to
be of interest.

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

Documentation/rev-list: don't list date formatsJohn Keeping Thu, 3 Sep 2015 21:48:54 +0000 (22:48 +0100)

Documentation/rev-list: don't list date formats

We are about to add several new date formats which will make this list
too long to display in a single line.

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

Documentation/git-for-each-ref: don't list date formatsJohn Keeping Thu, 3 Sep 2015 21:48:53 +0000 (22:48 +0100)

Documentation/git-for-each-ref: don't list date formats

We are about to add a new set of supported date formats and do not want
to have to maintain the same list in several different bits of
documentation. Refer to git-rev-list(1) which contains the full list of
supported formats.

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

Documentation/config: don't list date formatsJohn Keeping Thu, 3 Sep 2015 21:48:52 +0000 (22:48 +0100)

Documentation/config: don't list date formats

This list is already incomplete (missing "raw") and we're about to add
new formats. Since this option sets a default for git-log's --date
option, just refer to git-log(1).

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

Documentation/blame-options: don't list date formatsJohn Keeping Thu, 3 Sep 2015 21:48:51 +0000 (22:48 +0100)

Documentation/blame-options: don't list date formats

This list is already incomplete (missing "raw") and we're about to add
new formats. Remove it and refer to the canonical documentation in
git-log(1).

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

pack-protocol: clarify LF-handling in PKT-LINE()Jeff King Thu, 3 Sep 2015 08:24:09 +0000 (04:24 -0400)

pack-protocol: clarify LF-handling in PKT-LINE()

The spec is very inconsistent about which PKT-LINE() parts
of the grammar include a LF. On top of that, the code is not
consistent, either (e.g., send-pack does not put newlines
into the ref-update commands it sends).

Let's make explicit the long-standing expectation that we
generally expect pkt-lines to end in a newline, but that
receivers should be lenient. This makes the spec consistent,
and matches what git already does (though it does not always
fulfill the SHOULD).

We do make an exception for the push-cert, where the
receiving code is currently a bit pickier. This is a
reasonable way to be, as the data needs to be byte-for-byte
compatible with what was signed. We _could_ make up some
rules about signing a canonicalized version including
newlines, but that would require a code change, and is out
of scope for this patch.

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

Merge branch 'jk/am-rerere-lock-fix'Junio C Hamano Thu, 3 Sep 2015 21:14:01 +0000 (14:14 -0700)

Merge branch 'jk/am-rerere-lock-fix'

Recent "git am" introduced a double-locking failure when used with
the "--3way" option that invokes rerere machinery.

* jk/am-rerere-lock-fix:
rerere: release lockfile in non-writing functions

submodule: rewrite `module_name` shell function in CStefan Beller Wed, 2 Sep 2015 21:42:25 +0000 (14:42 -0700)

submodule: rewrite `module_name` shell function in C

This implements the helper `name` in C instead of shell,
yielding a nice performance boost.

Before this patch, I measured a time (best out of three):

$ time ./t7400-submodule-basic.sh >/dev/null
real 0m11.066s
user 0m3.348s
sys 0m8.534s

With this patch applied I measured (also best out of three)

$ time ./t7400-submodule-basic.sh >/dev/null
real 0m10.063s
user 0m3.044s
sys 0m7.487s

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: rewrite `module_list` shell function in CStefan Beller Wed, 2 Sep 2015 21:42:24 +0000 (14:42 -0700)

submodule: rewrite `module_list` shell function in C

Most of the submodule operations work on a set of submodules.
Calculating and using this set is usually done via:

module_list "$@" | {
while read mode sha1 stage sm_path
do
# the actual operation
done
}

Currently the function `module_list` is implemented in the
git-submodule.sh as a shell script wrapping a perl script.
The rewrite is in C, such that it is faster and can later be
easily adapted when other functions are rewritten in C.

git-submodule.sh, similar to the builtin commands, will navigate
to the top-most directory of the repository and keep the
subdirectory as a variable. As the helper is called from
within the git-submodule.sh script, we are already navigated
to the root level, but the path arguments are still relative
to the subdirectory we were in when calling git-submodule.sh.
That's why there is a `--prefix` option pointing to an alternative
path which to anchor relative path arguments.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.6-rc0 v2.6.0-rc0Junio C Hamano Wed, 2 Sep 2015 19:55:21 +0000 (12:55 -0700)

Git 2.6-rc0

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

Merge branch 'cc/trailers-corner-case-fix'Junio C Hamano Wed, 2 Sep 2015 19:50:21 +0000 (12:50 -0700)

Merge branch 'cc/trailers-corner-case-fix'

The "interpret-trailers" helper mistook a multi-paragraph title of
a commit log message with a colon in it as the end of the trailer
block.

* cc/trailers-corner-case-fix:
trailer: support multiline title

Merge branch 'sb/read-cache-one-indent-style-fix'Junio C Hamano Wed, 2 Sep 2015 19:50:18 +0000 (12:50 -0700)

Merge branch 'sb/read-cache-one-indent-style-fix'

* sb/read-cache-one-indent-style-fix:
read-cache: fix indentation in read_index_from

Merge branch 'ee/clean-test-fixes'Junio C Hamano Wed, 2 Sep 2015 19:50:16 +0000 (12:50 -0700)

Merge branch 'ee/clean-test-fixes'

* ee/clean-test-fixes:
t7300: fix broken && chains

Merge branch 'jk/log-missing-default-HEAD'Junio C Hamano Wed, 2 Sep 2015 19:50:08 +0000 (12:50 -0700)

Merge branch 'jk/log-missing-default-HEAD'

"git init empty && git -C empty log" said "bad default revision 'HEAD'",
which was found to be a bit confusing to new users.

* jk/log-missing-default-HEAD:
log: diagnose empty HEAD more clearly

t7060: actually test "git diff-index --cached -M"Matthieu Prat Wed, 2 Sep 2015 18:12:55 +0000 (14:12 -0400)

t7060: actually test "git diff-index --cached -M"

A test was designed for "git diff-index --cached -M" but the command is
run without the "-M" option (which makes the test essentially identical
to its preceding counterpart).

Signed-off-by: Matthieu Prat <matthieuprat@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ninth batch for 2.6Junio C Hamano Tue, 1 Sep 2015 23:31:58 +0000 (16:31 -0700)

Ninth batch for 2.6

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

Merge branch 'dt/commit-preserve-base-index-upon-opport... Junio C Hamano Tue, 1 Sep 2015 23:31:29 +0000 (16:31 -0700)

Merge branch 'dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update'

When re-priming the cache-tree opportunistically while committing
the in-core index as-is, we mistakenly invalidated the in-core
index too aggressively, causing the experimental split-index code
to unnecessarily rewrite the on-disk index file(s).

* dt/commit-preserve-base-index-upon-opportunistic-cache-tree-update:
commit: don't rewrite shared index unnecessarily

Merge branch 'rt/remove-hold-lockfile-for-append'Junio C Hamano Tue, 1 Sep 2015 23:31:26 +0000 (16:31 -0700)

Merge branch 'rt/remove-hold-lockfile-for-append'

* rt/remove-hold-lockfile-for-append:
lockfile: remove function "hold_lock_file_for_append"

Merge branch 'rs/archive-zip-many'Junio C Hamano Tue, 1 Sep 2015 23:31:24 +0000 (16:31 -0700)

Merge branch 'rs/archive-zip-many'

"git archive" did not use zip64 extension when creating an archive
with more than 64k entries, which nobody should need, right ;-)?

* rs/archive-zip-many:
archive-zip: support more than 65535 entries
archive-zip: use a local variable to store the creator version
t5004: test ZIP archives with many entries

Merge branch 'ls/p4-fold-case-client-specs'Junio C Hamano Tue, 1 Sep 2015 23:31:22 +0000 (16:31 -0700)

Merge branch 'ls/p4-fold-case-client-specs'

On case insensitive systems, "git p4" did not work well with client
specs.

* ls/p4-fold-case-client-specs:
git-p4: honor core.ignorecase when using P4 client specs

Merge branch 'ah/submodule-typofix-in-error'Junio C Hamano Tue, 1 Sep 2015 23:31:21 +0000 (16:31 -0700)

Merge branch 'ah/submodule-typofix-in-error'

Error string fix.

* ah/submodule-typofix-in-error:
git-submodule: remove extraneous space from error message

Merge branch 'ah/reflog-typofix-in-error'Junio C Hamano Tue, 1 Sep 2015 23:31:18 +0000 (16:31 -0700)

Merge branch 'ah/reflog-typofix-in-error'

Error string fix.

* ah/reflog-typofix-in-error:
reflog: add missing single quote to error message

Merge branch 'ah/read-tree-usage-string'Junio C Hamano Tue, 1 Sep 2015 23:31:15 +0000 (16:31 -0700)

Merge branch 'ah/read-tree-usage-string'

Usage string fix.

* ah/read-tree-usage-string:
read-tree: replace bracket set with parentheses to clarify usage

Merge branch 'ah/pack-objects-usage-strings'Junio C Hamano Tue, 1 Sep 2015 23:31:12 +0000 (16:31 -0700)

Merge branch 'ah/pack-objects-usage-strings'

Usage string fix.

* ah/pack-objects-usage-strings:
pack-objects: place angle brackets around placeholders in usage strings

Merge branch 'br/svn-doc-include-paths-config'Junio C Hamano Tue, 1 Sep 2015 23:31:09 +0000 (16:31 -0700)

Merge branch 'br/svn-doc-include-paths-config'

* br/svn-doc-include-paths-config:
git-svn doc: mention "svn-remote.<name>.include-paths"

Merge branch 'nd/fixup-linked-gitdir'Junio C Hamano Tue, 1 Sep 2015 23:31:06 +0000 (16:31 -0700)

Merge branch 'nd/fixup-linked-gitdir'

The code in "multiple-worktree" support that attempted to recover
from an inconsistent state updated an incorrect file.

* nd/fixup-linked-gitdir:
setup: update the right file in multiple checkouts

rerere: release lockfile in non-writing functionsJeff King Tue, 1 Sep 2015 22:14:09 +0000 (18:14 -0400)

rerere: release lockfile in non-writing functions

There's a bug in builtin/am.c in which we take a lock on
MERGE_RR recursively. But rather than fix am.c, this patch
fixes the confusing interface from rerere.c that caused the
bug. Read on for the gory details.

The setup_rerere() function both reads the existing MERGE_RR
file, and takes MERGE_RR.lock. In the rerere() and
rerere_forget() functions, we end up in write_rr(), which
will then commit the lock file.

But for functions like rerere_clear() that do not write to
MERGE_RR, we expect the caller to have handled
setup_rerere(). That caller would then need to release the
lockfile, but it can't; the lock struct is local to
rerere.c.

For builtin/rerere.c, this is OK. We run a single rerere
operation and then exit immediately, which has the side
effect of rolling back the lockfile.

But in builtin/am.c, this is actively wrong. If we run "git
am -3 --skip", we call setup-rerere twice without releasing
the lock:

1. The "--skip" causes us to call am_rerere_clear(), which
calls setup_rerere(), but never drops the lock.

2. We then proceed to the next patch.

3. The "--3way" may cause us to call rerere() to handle
conflicts in that patch, but we are already holding the
lock. The lockfile code dies with:

BUG: prepare_tempfile_object called for active object

We could fix this by having rerere_clear() call
rollback_lock_file(). But it feels a bit odd for it to roll
back a lockfile that it did not itself take. So let's
simplify the interface further, and handle setup_rerere in
the function itself, taking away the question from the
caller over whether they need to do so.

We can give rerere_gc() the same treatment, as well (even
though it doesn't have any callers besides builtin/rerere.c
at this point). Note that these functions don't take flags
from their callers to pass along to setup_rerere; that's OK,
because the flags would not be meaningful for what they are
doing.

Both of those functions need to hold the lock because even
though they do not write to MERGE_RR, they are still writing
and should be protected from a simultaneous "rerere" run.
But rerere_remaining(), "rerere diff", and "rerere status"
are all read-only operations. They want to setup_rerere(),
but do not care about taking the lock in the first place.
Since our update of MERGE_RR is the usual atomic rename done
by commit_lock_file, they can just do a lockless read. For
that, we teach setup_rerere a READONLY flag to avoid the
lock.

As a bonus, this pushes builtin/rerere.c's setup_rerere call
closer to the functions that use it. Which means that "git
rerere totally-bogus-command" will no longer silently
exit(0) in a repository without rerere enabled.

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

pkt-line: show packets in async processes as "sideband"Jeff King Tue, 1 Sep 2015 20:24:13 +0000 (16:24 -0400)

pkt-line: show packets in async processes as "sideband"

If you run "GIT_TRACE_PACKET=1 git push", you may get
confusing output like (line prefixes omitted for clarity):

packet: push< \1000eunpack ok0019ok refs/heads/master0000
packet: push< unpack ok
packet: push< ok refs/heads/master
packet: push< 0000
packet: push< 0000

Why do we see the data twice, once apparently wrapped inside
another pkt-line, and once unwrapped? Why do we get two
flush packets?

The answer is that we start an async process to demux the
sideband data. The first entry comes from the sideband
process reading the data, and the second from push itself.
Likewise, the first flush is inside the demuxed packet, and
the second is an actual sideband flush.

We can make this a bit more clear by marking the sideband
demuxer explicitly as "sideband" rather than "push". The
most elegant way to do this would be to simply call
packet_trace_identity() inside the sideband demuxer. But we
can't do that reliably, because it relies on a global
variable, which might be shared if pthreads are in use.

What we really need is thread-local storage for
packet_trace_identity. But the async code does not provide
an interface for that, and it would be messy to add it here
(we'd have to care about pthreads, initializing our
pthread_key_t ahead of time, etc).

So instead, let us just assume that any async process is
handling sideband data. That's always true now, and is
likely to remain so in the future.

The output looks like:

packet: sideband< \1000eunpack ok0019ok refs/heads/master0000
packet: push< unpack ok
packet: push< ok refs/heads/master
packet: push< 0000
packet: sideband< 0000

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

run-command: provide in_async query functionJeff King Tue, 1 Sep 2015 20:22:43 +0000 (16:22 -0400)

run-command: provide in_async query function

It's not easy for arbitrary code to find out whether it is
running in an async process or not. A top-level function
which is fed to start_async() can know (you just pass down
an argument saying "you are async"). But that function may
call other global functions, and we would not want to have
to pass the information all the way through the call stack.

Nor can we simply set a global variable, as those may be
shared between async threads and the main thread (if the
platform supports pthreads). We need pthread tricks _or_ a
global variable, depending on how start_async is
implemented.

The callers don't have enough information to do this right,
so let's provide a simple query function that does.
Fortunately we can reuse the existing infrastructure to make
the pthread case simple (and even simplify die_async() by
using our new function).

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

git-quiltimport: add commandline option --series <file>Juerg Haefliger Mon, 31 Aug 2015 12:06:38 +0000 (14:06 +0200)

git-quiltimport: add commandline option --series <file>

The quilt series file doesn't have to be located in the same directory
with the patches and can be named differently than 'series' as well. This
patch adds a commandline option to allow for a non-standard series
filename and location.

Signed-off-by: Juerg Haefliger <juerg.haefliger@hp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: make refs/bisect/* per-worktreeDavid Turner Tue, 1 Sep 2015 02:13:11 +0000 (22:13 -0400)

refs: make refs/bisect/* per-worktree

We need the place we stick refs for bisects in progress to not be
shared between worktrees. So we make the refs/bisect/ hierarchy
per-worktree.

The is_per_worktree_ref function and associated docs learn that
refs/bisect/ is per-worktree, as does the git_path code in path.c

The ref-packing functions learn that per-worktree refs should not be
packed (since packed-refs is common rather than per-worktree).

Since refs/bisect is per-worktree, logs/refs/bisect should be too.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

path: optimize common dir checkingDavid Turner Tue, 1 Sep 2015 02:13:10 +0000 (22:13 -0400)

path: optimize common dir checking

Instead of a linear search over common_list to check whether
a path is common, use a trie. The trie search operates on
path prefixes, and handles excludes.

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: clean up common_listDavid Turner Tue, 1 Sep 2015 02:13:09 +0000 (22:13 -0400)

refs: clean up common_list

Instead of common_list having formatting like ! and /, use a struct to
hold common_list data in a structured form.

We don't use 'exclude' yet; instead, we keep the old codepath that
handles info/sparse-checkout and logs/HEAD. Later, we will use exclude.

[jc: with "make common_list[] static" clean-up from Ramsay squashed in]

Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eighth batch for 2.6Junio C Hamano Mon, 31 Aug 2015 22:40:24 +0000 (15:40 -0700)

Eighth batch for 2.6

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

Merge branch 'sg/describe-contains'Junio C Hamano Mon, 31 Aug 2015 22:39:10 +0000 (15:39 -0700)

Merge branch 'sg/describe-contains'

"git describe" without argument defaulted to describe the HEAD
commit, but "git describe --contains" didn't. Arguably, in a
repository used for active development, such defaulting would not
be very useful as the tip of branch is typically not tagged, but it
is better to be consistent.

* sg/describe-contains:
describe --contains: default to HEAD when no commit-ish is given

Merge branch 'db/push-sign-if-asked'Junio C Hamano Mon, 31 Aug 2015 22:39:07 +0000 (15:39 -0700)

Merge branch 'db/push-sign-if-asked'

The client side codepaths in "git push" have been cleaned up
and the user can request to perform an optional "signed push",
i.e. sign only when the other end accepts signed push.

* db/push-sign-if-asked:
push: add a config option push.gpgSign for default signed pushes
push: support signing pushes iff the server supports it
builtin/send-pack.c: use parse_options API
config.c: rename git_config_maybe_bool_text and export it as git_parse_maybe_bool
transport: remove git_transport_options.push_cert
gitremote-helpers.txt: document pushcert option
Documentation/git-send-pack.txt: document --signed
Documentation/git-send-pack.txt: wrap long synopsis line
Documentation/git-push.txt: document when --signed may fail

Merge branch 'jk/notes-merge-config'Junio C Hamano Mon, 31 Aug 2015 22:39:05 +0000 (15:39 -0700)

Merge branch 'jk/notes-merge-config'

"git notes merge" can be told with "--strategy=<how>" option how to
automatically handle conflicts; this can now be configured by
setting notes.mergeStrategy configuration variable.

* jk/notes-merge-config:
notes: teach git-notes about notes.<name>.mergeStrategy option
notes: add notes.mergeStrategy option to select default strategy
notes: add tests for --commit/--abort/--strategy exclusivity
notes: extract parse_notes_merge_strategy to notes-utils
notes: extract enum notes_merge_strategy to notes-utils.h
notes: document cat_sort_uniq rewriteMode

Merge branch 'jc/am-state-fix'Junio C Hamano Mon, 31 Aug 2015 22:39:01 +0000 (15:39 -0700)

Merge branch 'jc/am-state-fix'

Recent reimplementation of "git am" changed the format of state
files kept in $GIT_DIR/rebase-apply/ without meaning to do so,
primarily because write_file() API was cumbersome to use and it was
easy to mistakenly make text files with incomplete lines. Update
write_file() interface to make it harder to misuse.

* jc/am-state-fix:
write_file(): drop caller-supplied LF from calls to create a one-liner file
write_file_v(): do not leave incomplete line at the end
write_file(): drop "fatal" parameter
builtin/am: make sure state files are text
builtin/am: introduce write_state_*() helper functions

Merge branch 'jc/log-p-cc'Junio C Hamano Mon, 31 Aug 2015 22:38:59 +0000 (15:38 -0700)

Merge branch 'jc/log-p-cc'

"git log --cc" did not show any patch, even though most of the time
the user meant "git log --cc -p -m" to see patch output for commits
with a single parent, and combined diff for merge commits. The
command is taught to DWIM "--cc" (without "--raw" and other forms
of output specification) to "--cc -p -m".

* jc/log-p-cc:
builtin/log.c: minor reformat
log: show merge commit when --cc is given
log: when --cc is given, default to -p unless told otherwise
log: rename "tweak" helpers

Merge branch 'jk/fix-alias-pager-config-key-warnings'Junio C Hamano Mon, 31 Aug 2015 22:38:57 +0000 (15:38 -0700)

Merge branch 'jk/fix-alias-pager-config-key-warnings'

Because the configuration system does not allow "alias.0foo" and
"pager.0foo" as the configuration key, the user cannot use '0foo'
as a custom command name anyway, but "git 0foo" tried to look these
keys up and emitted useless warnings before saying '0foo is not a
git command'. These warning messages have been squelched.

* jk/fix-alias-pager-config-key-warnings:
config: silence warnings for command names with invalid keys

Merge branch 'jk/rev-list-has-no-notes'Junio C Hamano Mon, 31 Aug 2015 22:38:54 +0000 (15:38 -0700)

Merge branch 'jk/rev-list-has-no-notes'

"git rev-list" does not take "--notes" option, but did not complain
when one is given.

* jk/rev-list-has-no-notes:
rev-list: make it obvious that we do not support notes

Merge branch 'hv/submodule-config'Junio C Hamano Mon, 31 Aug 2015 22:38:52 +0000 (15:38 -0700)

Merge branch 'hv/submodule-config'

The gitmodules API accessed from the C code learned to cache stuff
lazily.

* hv/submodule-config:
submodule: allow erroneous values for the fetchRecurseSubmodules option
submodule: use new config API for worktree configurations
submodule: extract functions for config set and lookup
submodule: implement a config API for lookup of .gitmodules values

Merge branch 'sg/config-name-only'Junio C Hamano Mon, 31 Aug 2015 22:38:50 +0000 (15:38 -0700)

Merge branch 'sg/config-name-only'

"git config --list" output was hard to parse when values consist of
multiple lines. "--name-only" option is added to help this.

* sg/config-name-only:
get_urlmatch: avoid useless strbuf write
format_config: simplify buffer handling
format_config: don't init strbuf
config: restructure format_config() for better control flow
completion: list variable names reliably with 'git config --name-only'
config: add '--name-only' option to list only variable names

read-cache: fix indentation in read_index_fromStefan Beller Mon, 31 Aug 2015 18:43:29 +0000 (11:43 -0700)

read-cache: fix indentation in read_index_from

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: allow "stash show" diff output configurableNamhyung Kim Sat, 29 Aug 2015 15:25:57 +0000 (00:25 +0900)

stash: allow "stash show" diff output configurable

Some users might want to see diff (patch) output always rather than
diffstat when [s]he runs 'git stash show'. Although this can be
done with adding -p option, users are too lazy to type extra three
keys.

Add two variables that control to show diffstat and patch output
respectively. The stash.showStat is for diffstat and default is
true. The stat.showPatch is for the patch output and default is
false.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

trailer: support multiline titleChristian Couder Sun, 30 Aug 2015 19:14:40 +0000 (21:14 +0200)

trailer: support multiline title

We currently ignore the first line passed to `git interpret-trailers`,
when looking for the beginning of the trailers.

Unfortunately this does not work well when a commit is created with a
line break in the title, using for example the following command:

git commit -m 'place of
code: change we made'

That's why instead of ignoring only the first line, it is better to
ignore the first paragraph.

Signed-off-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7300: fix broken && chainsErik Elfström Sun, 30 Aug 2015 09:18:09 +0000 (11:18 +0200)

t7300: fix broken && chains

While we are here, remove some boilerplate by using test_commit.

Signed-off-by: Erik Elfström <erik.elfstrom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: diagnose empty HEAD more clearlyJeff King Sat, 29 Aug 2015 05:04:18 +0000 (01:04 -0400)

log: diagnose empty HEAD more clearly

If you init or clone an empty repository, the initial
message from running "git log" is not very friendly:

$ git init
Initialized empty Git repository in /home/peff/foo/.git/
$ git log
fatal: bad default revision 'HEAD'

Let's detect this situation and write a more friendly
message:

$ git log
fatal: your current branch 'master' does not have any commits yet

We also detect the case that 'HEAD' points to a broken ref;
this should be even less common, but is easy to see. Note
that we do not diagnose all possible cases. We rely on
resolve_ref, which means we do not get information about
complex cases. E.g., "--default master" would use dwim_ref
to find "refs/heads/master", but we notice only that
"master" does not exist. Similarly, a complex sha1
expression like "--default HEAD^2" will not resolve as a
ref.

But that's OK. We fall back to a generic error message in
those cases, and they are unlikely to be used anyway.
Catching an empty or broken "HEAD" improves the common case,
and the other cases are not regressed.

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

show-ref: place angle brackets around variables in... Alex Henrie Sat, 29 Aug 2015 04:18:44 +0000 (22:18 -0600)

show-ref: place angle brackets around variables in usage string

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: don't rewrite shared index unnecessarilyDavid Turner Thu, 27 Aug 2015 17:07:54 +0000 (13:07 -0400)

commit: don't rewrite shared index unnecessarily

Remove a cache invalidation which would cause the shared index to be
rewritten on as-is commits.

When the cache-tree has changed, we need to update it. But we don't
necessarily need to update the shared index. So setting
active_cache_changed to SOMETHING_CHANGED is unnecessary. Instead, we
let update_main_cache_tree just update the CACHE_TREE_CHANGED bit.

In order to test this, make test-dump-split-index not segfault on
missing replace_bitmap/delete_bitmap. This new codepath is not called
now that the test passes, but is necessary to avoid a segfault when the
new test is run with the old builtin/commit.c code.

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

Sync with 2.5.1Junio C Hamano Fri, 28 Aug 2015 19:32:45 +0000 (12:32 -0700)

Sync with 2.5.1

Seventh batch for 2.6Junio C Hamano Fri, 28 Aug 2015 19:27:39 +0000 (12:27 -0700)

Seventh batch for 2.6

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

Merge branch 'cc/trailers-corner-case-fix'Junio C Hamano Fri, 28 Aug 2015 19:32:17 +0000 (12:32 -0700)

Merge branch 'cc/trailers-corner-case-fix'

"interpret-trailers" helper mistook a single-liner log message that
has a colon as the end of existing trailer.

* cc/trailers-corner-case-fix:
trailer: retitle a test and correct an in-comment message
trailer: ignore first line of message

Merge branch 'dt/untracked-subdir'Junio C Hamano Fri, 28 Aug 2015 19:32:14 +0000 (12:32 -0700)

Merge branch 'dt/untracked-subdir'

The experimental untracked-cache feature were buggy when paths with
a few levels of subdirectories are involved.

* dt/untracked-subdir:
untracked cache: fix entry invalidation
untracked-cache: fix subdirectory handling

git-p4: fix P4 label import for unprocessed commitsLuke Diamand Thu, 27 Aug 2015 07:18:58 +0000 (08:18 +0100)

git-p4: fix P4 label import for unprocessed commits

With --detect-labels enabled, git-p4 will try to create tags
using git fast-import by writing a "tag" clause to the
fast-import stream.

If the commit that the tag references has not yet actually
been processed by fast-import, then the tag can't be created
and git-p4 fails to import the P4 label.

Teach git-p4 to use fast-import "marks" when creating tags
which reference commits created during the current run of the
program.

Commits created before the current run are still referenced
in the old way using a normal git commit.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: do not terminate creating tag for unknown commitLuke Diamand Thu, 27 Aug 2015 07:18:57 +0000 (08:18 +0100)

git-p4: do not terminate creating tag for unknown commit

If p4 reports a tag for a commit that git-p4 does not know
about (e.g. because it references a P4 changelist that was
imported prior to the point at which the repo was cloned into
git), make sure that the error is correctly caught and handled.
rather than just crashing.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: failing test for ignoring invalid p4 labelsLuke Diamand Thu, 27 Aug 2015 07:18:56 +0000 (08:18 +0100)

git-p4: failing test for ignoring invalid p4 labels

When importing a label which references a commit that git-p4 does
not know about, git-p4 should skip it and go on to process other
labels that can be imported.

Instead it crashes when attempting to find the missing commit in
the git history. This test demonstrates the problem.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>