gitweb.git
l10n: fr.po v2.11.0_rnd1Jean-Noel Avila Sat, 5 Nov 2016 20:43:53 +0000 (21:43 +0100)

l10n: fr.po v2.11.0_rnd1

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>

l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)Jiang Xin Tue, 1 Nov 2016 13:36:26 +0000 (21:36 +0800)

l10n: git.pot: v2.11.0 round 1 (209 new, 53 removed)

Generate po/git.pot from v2.11.0-rc0 for git v2.11.0 l10n round 1.

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

Git 2.11-rc0 v2.11.0-rc0Junio C Hamano Mon, 31 Oct 2016 20:19:53 +0000 (13:19 -0700)

Git 2.11-rc0

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

Merge branch 'nd/test-helpers'Junio C Hamano Mon, 31 Oct 2016 20:15:27 +0000 (13:15 -0700)

Merge branch 'nd/test-helpers'

Update to the test framework made in 2.9 timeframe broke running
the tests under valgrind, which has been fixed.

* nd/test-helpers:
valgrind: support test helpers

Merge branch 'sc/fmt-merge-msg-doc-markup-fix'Junio C Hamano Mon, 31 Oct 2016 20:15:26 +0000 (13:15 -0700)

Merge branch 'sc/fmt-merge-msg-doc-markup-fix'

Documentation fix.

* sc/fmt-merge-msg-doc-markup-fix:
Documentation/fmt-merge-msg: fix markup in example

Merge branch 'ak/sh-setup-dot-source-i18n-fix'Junio C Hamano Mon, 31 Oct 2016 20:15:25 +0000 (13:15 -0700)

Merge branch 'ak/sh-setup-dot-source-i18n-fix'

Recent update to git-sh-setup (a library of shell functions that
are used by our in-tree scripted Porcelain commands) included
another shell library git-sh-i18n without specifying where it is,
relying on the $PATH. This has been fixed to be more explicit by
prefixing $(git --exec-path) output in front.

* ak/sh-setup-dot-source-i18n-fix:
git-sh-setup: be explicit where to dot-source git-sh-i18n from.

Merge branch 'rs/commit-pptr-simplify'Junio C Hamano Mon, 31 Oct 2016 20:15:25 +0000 (13:15 -0700)

Merge branch 'rs/commit-pptr-simplify'

Code simplification.

* rs/commit-pptr-simplify:
commit: simplify building parents list

Merge branch 'jk/rebase-config-insn-fmt-docfix'Junio C Hamano Mon, 31 Oct 2016 20:15:24 +0000 (13:15 -0700)

Merge branch 'jk/rebase-config-insn-fmt-docfix'

Documentation fix.

* jk/rebase-config-insn-fmt-docfix:
doc: fix missing "::" in config list

Merge branch 'ak/pre-receive-hook-template-modefix'Junio C Hamano Mon, 31 Oct 2016 20:15:23 +0000 (13:15 -0700)

Merge branch 'ak/pre-receive-hook-template-modefix'

A trivial clean-up to a recently graduated topic.

* ak/pre-receive-hook-template-modefix:
pre-receive.sample: mark it executable

Merge branch 'jk/common-main'Junio C Hamano Mon, 31 Oct 2016 20:15:23 +0000 (13:15 -0700)

Merge branch 'jk/common-main'

A trivial clean-up to a recently graduated topic.

* jk/common-main:
git-compat-util: move content inside ifdef/endif guards

Merge branch 'aw/numbered-stash'Junio C Hamano Mon, 31 Oct 2016 20:15:22 +0000 (13:15 -0700)

Merge branch 'aw/numbered-stash'

The user always has to say "stash@{$N}" when naming a single
element in the default location of the stash, i.e. reflogs in
refs/stash. The "git stash" command learned to accept "git stash
apply 4" as a short-hand for "git stash apply stash@{4}".

* aw/numbered-stash:
stash: allow stashes to be referenced by index only

Merge branch 'jt/trailer-with-cruft'Junio C Hamano Mon, 31 Oct 2016 20:15:22 +0000 (13:15 -0700)

Merge branch 'jt/trailer-with-cruft'

Update "interpret-trailers" machinery and teaches it that people in
real world write all sorts of crufts in the "trailer" that was
originally designed to have the neat-o "Mail-Header: like thing"
and nothing else.

* jt/trailer-with-cruft:
trailer: support values folded to multiple lines
trailer: forbid leading whitespace in trailers
trailer: allow non-trailers in trailer block
trailer: clarify failure modes in parse_trailer
trailer: make args have their own struct
trailer: streamline trailer item create and add
trailer: use list.h for doubly-linked list
trailer: improve const correctness

Merge branch 'ls/filter-process'Junio C Hamano Mon, 31 Oct 2016 20:15:21 +0000 (13:15 -0700)

Merge branch 'ls/filter-process'

The smudge/clean filter API expect an external process is spawned
to filter the contents for each path that has a filter defined. A
new type of "process" filter API has been added to allow the first
request to run the filter for a path to spawn a single process, and
all filtering need is served by this single process for multiple
paths, reducing the process creation overhead.

* ls/filter-process:
contrib/long-running-filter: add long running filter example
convert: add filter.<driver>.process option
convert: prepare filter.<driver>.process option
convert: make apply_filter() adhere to standard Git error handling
pkt-line: add functions to read/write flush terminated packet streams
pkt-line: add packet_write_gently()
pkt-line: add packet_flush_gently()
pkt-line: add packet_write_fmt_gently()
pkt-line: extract set_packet_header()
pkt-line: rename packet_write() to packet_write_fmt()
run-command: add clean_on_exit_handler
run-command: move check_pipe() from write_or_die to run_command
convert: modernize tests
convert: quote filter names in error messages

Merge branch 'ls/git-open-cloexec'Junio C Hamano Mon, 31 Oct 2016 20:15:21 +0000 (13:15 -0700)

Merge branch 'ls/git-open-cloexec'

Git generally does not explicitly close file descriptors that were
open in the parent process when spawning a child process, but most
of the time the child does not want to access them. As Windows does
not allow removing or renaming a file that has a file descriptor
open, a slow-to-exit child can even break the parent process by
holding onto them. Use O_CLOEXEC flag to open files in various
codepaths.

* ls/git-open-cloexec:
read-cache: make sure file handles are not inherited by child processes
sha1_file: open window into packfiles with O_CLOEXEC
sha1_file: rename git_open_noatime() to git_open()

git-sh-setup: be explicit where to dot-source git-sh... Anders Kaseorg Sun, 30 Oct 2016 02:10:02 +0000 (22:10 -0400)

git-sh-setup: be explicit where to dot-source git-sh-i18n from.

d323c6b641 ("i18n: git-sh-setup.sh: mark strings for translation",
2016-06-17) started to dot-source git-sh-i18n shell script library,
assuming that $PATH is already adjusted for our scripts, namely,
$GIT_EXEC_PATH is at the beginning of $PATH.

Old contrib scripts like contrib/convert-grafts-to-replace-refs.sh
and contrib/rerere-train.sh and third-party scripts like guilt may
however be using this as ". $(git --exec-path)/git-sh-setup",
without satisfying that assumption. Be more explicit by specifying
its path prefixed with "$(git --exec-path)/". to be safe.

While we’re here, move the sourcing of git-sh-i18n below the shell
portability fixes.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: simplify building parents listRené Scharfe Sat, 29 Oct 2016 12:55:36 +0000 (14:55 +0200)

commit: simplify building parents list

Push pptr down into the FROM_MERGE branch of the if/else statement,
where it's actually used, and call commit_list_append() for appending
elements instead of playing tricks with commit_list_insert(). Call
copy_commit_list() in the amend branch instead of open-coding it. Don't
bother setting pptr in the final branch as it's not used thereafter.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: fix missing "::" in config listJeff King Sun, 30 Oct 2016 18:46:33 +0000 (14:46 -0400)

doc: fix missing "::" in config list

The rebase.instructionFormat option is missing its "::" to
tell AsciiDoc that it's a list entry. As a result, the
option name gets lumped into the description in one big
paragraph.

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

pre-receive.sample: mark it executableAnders Kaseorg Fri, 28 Oct 2016 18:40:41 +0000 (14:40 -0400)

pre-receive.sample: mark it executable

For consistency with other hooks, make the sample hook executable.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 2.10.2Junio C Hamano Fri, 28 Oct 2016 16:03:50 +0000 (09:03 -0700)

Sync with 2.10.2

Git 2.10.2 v2.10.2Junio C Hamano Fri, 28 Oct 2016 16:02:44 +0000 (09:02 -0700)

Git 2.10.2

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

Merge branch 'pb/test-parse-options-expect' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:24 +0000 (09:01 -0700)

Merge branch 'pb/test-parse-options-expect' into maint

Test clean-up.

* pb/test-parse-options-expect:
t0040: convert all possible tests to use `test-parse-options --expect`

Merge branch 'jc/cocci-xstrdup-or-null' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:23 +0000 (09:01 -0700)

Merge branch 'jc/cocci-xstrdup-or-null' into maint

Code cleanup.

* jc/cocci-xstrdup-or-null:
cocci: refactor common patterns to use xstrdup_or_null()

Merge branch 'rs/cocci' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:23 +0000 (09:01 -0700)

Merge branch 'rs/cocci' into maint

Code cleanup.

* rs/cocci:
use strbuf_add_unique_abbrev() for adding short hashes, part 3
remove unnecessary NULL check before free(3)
coccicheck: make transformation for strbuf_addf(sb, "...") more precise
use strbuf_add_unique_abbrev() for adding short hashes, part 2
use strbuf_addstr() instead of strbuf_addf() with "%s", part 2
gitignore: ignore output files of coccicheck make target
use strbuf_addstr() for adding constant strings to a strbuf, part 2
add coccicheck make target
contrib/coccinelle: fix semantic patch for oid_to_hex_r()

Merge branch 'jc/diff-unique-abbrev-comments' into... Junio C Hamano Fri, 28 Oct 2016 16:01:23 +0000 (09:01 -0700)

Merge branch 'jc/diff-unique-abbrev-comments' into maint

A bit more comments in a tricky code.

* jc/diff-unique-abbrev-comments:
diff_unique_abbrev(): document its assumption and limitation

Merge branch 'rs/pretty-format-color-doc-fix' into... Junio C Hamano Fri, 28 Oct 2016 16:01:23 +0000 (09:01 -0700)

Merge branch 'rs/pretty-format-color-doc-fix' into maint

Small doc update.

* rs/pretty-format-color-doc-fix:
pretty: fix document link for color specification

Merge branch 'js/reset-usage' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:22 +0000 (09:01 -0700)

Merge branch 'js/reset-usage' into maint

Message fix-up.

* js/reset-usage:
reset: fix usage

Merge branch 'po/fix-doc-merge-base-illustration' into... Junio C Hamano Fri, 28 Oct 2016 16:01:21 +0000 (09:01 -0700)

Merge branch 'po/fix-doc-merge-base-illustration' into maint

Some AsciiDoc formatter mishandles a displayed illustration with
tabs in it. Adjust a few of them in merge-base documentation to
work around them.

* po/fix-doc-merge-base-illustration:
doc: fix the 'revert a faulty merge' ASCII art tab spacing
doc: fix merge-base ASCII art tab spacing

Merge branch 'jk/tap-verbose-fix' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:20 +0000 (09:01 -0700)

Merge branch 'jk/tap-verbose-fix' into maint

The Travis CI configuration we ship ran the tests with --verbose
option but this risks non-TAP output that happens to be "ok" to be
misinterpreted as TAP signalling a test that passed. This resulted
in unnecessary failure. This has been corrected by introducing a
new mode to run our tests in the test harness to send the verbose
output separately to the log file.

* jk/tap-verbose-fix:
test-lib: bail out when "-v" used under "prove"
travis: use --verbose-log test option
test-lib: add --verbose-log option
test-lib: handle TEST_OUTPUT_DIRECTORY with spaces

Merge branch 'tg/add-chmod+x-fix' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:19 +0000 (09:01 -0700)

Merge branch 'tg/add-chmod+x-fix' into maint

A hot-fix for a test added by a recent topic that went to both
'master' and 'maint' already.

* tg/add-chmod+x-fix:
t3700: fix broken test under !SANITY

Merge branch 'bw/submodule-branch-dot-doc' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:19 +0000 (09:01 -0700)

Merge branch 'bw/submodule-branch-dot-doc' into maint

Recent git allows submodule.<name>.branch to use a special token
"." instead of the branch name; the documentation has been updated
to describe it.

* bw/submodule-branch-dot-doc:
submodules doc: update documentation for "." used for submodule branches

Merge branch 'jk/tighten-alloc' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:18 +0000 (09:01 -0700)

Merge branch 'jk/tighten-alloc' into maint

Protect our code from over-eager compilers.

* jk/tighten-alloc:
inline xalloc_flex() into FLEXPTR_ALLOC_MEM
avoid pointer arithmetic involving NULL in FLEX_ALLOC_MEM

Merge branch 'jk/fetch-quick-tag-following' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:17 +0000 (09:01 -0700)

Merge branch 'jk/fetch-quick-tag-following' into maint

When fetching from a remote that has many tags that are irrelevant
to branches we are following, we used to waste way too many cycles
when checking if the object pointed at by a tag (that we are not
going to fetch!) exists in our repository too carefully.

* jk/fetch-quick-tag-following:
fetch: use "quick" has_sha1_file for tag following

Merge branch 'jk/merge-base-fork-point-without-reflog... Junio C Hamano Fri, 28 Oct 2016 16:01:17 +0000 (09:01 -0700)

Merge branch 'jk/merge-base-fork-point-without-reflog' into maint

"git rebase" immediately after "git clone" failed to find the fork
point from the upstream.

* jk/merge-base-fork-point-without-reflog:
merge-base: handle --fork-point without reflog

Merge branch 'dk/worktree-dup-checkout-with-bare-is... Junio C Hamano Fri, 28 Oct 2016 16:01:16 +0000 (09:01 -0700)

Merge branch 'dk/worktree-dup-checkout-with-bare-is-ok' into maint

In a worktree connected to a repository elsewhere, created via "git
worktree", "git checkout" attempts to protect users from confusion
by refusing to check out a branch that is already checked out in
another worktree. However, this also prevented checking out a
branch, which is designated as the primary branch of a bare
reopsitory, in a worktree that is connected to the bare
repository. The check has been corrected to allow it.

* dk/worktree-dup-checkout-with-bare-is-ok:
worktree: allow the main brach of a bare repository to be checked out

Merge branch 'sb/submodule-config-doc-drop-path' into... Junio C Hamano Fri, 28 Oct 2016 16:01:16 +0000 (09:01 -0700)

Merge branch 'sb/submodule-config-doc-drop-path' into maint

The "submodule.<name>.path" stored in .gitmodules is never copied
to .git/config and such a key in .git/config has no meaning, but
the documentation described it and submodule.<name>.url next to
each other as if both belong to .git/config. This has been fixed.

* sb/submodule-config-doc-drop-path:
documentation: improve submodule.<name>.{url, path} description

Merge branch 'jk/ref-symlink-loop' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:15 +0000 (09:01 -0700)

Merge branch 'jk/ref-symlink-loop' into maint

A stray symbolic link in $GIT_DIR/refs/ directory could make name
resolution loop forever, which has been corrected.

* jk/ref-symlink-loop:
files_read_raw_ref: prevent infinite retry loops in general
files_read_raw_ref: avoid infinite loop on broken symlinks

Merge branch 'nd/commit-p-doc' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:15 +0000 (09:01 -0700)

Merge branch 'nd/commit-p-doc' into maint

Documentation for "git commit" was updated to clarify that "commit
-p <paths>" adds to the current contents of the index to come up
with what to commit.

* nd/commit-p-doc:
git-commit.txt: clarify --patch mode with pathspec

Merge branch 'jk/clone-copy-alternates-fix' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:14 +0000 (09:01 -0700)

Merge branch 'jk/clone-copy-alternates-fix' into maint

"git clone" of a local repository can be done at the filesystem
level, but the codepath did not check errors while copying and
adjusting the file that lists alternate object stores.

* jk/clone-copy-alternates-fix:
clone: detect errors in normalize_path_copy

Merge branch 'dt/http-empty-auth' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:14 +0000 (09:01 -0700)

Merge branch 'dt/http-empty-auth' into maint

http.emptyauth configuration is a way to allow an empty username to
pass when attempting to authenticate using mechanisms like
Kerberos. We took an unspecified (NULL) username and sent ":"
(i.e. no username, no password) to CURLOPT_USERPWD, but did not do
the same when the username is explicitly set to an empty string.

* dt/http-empty-auth:
http: http.emptyauth should allow empty (not just NULL) usernames

Merge branch 'dp/autoconf-curl-ssl' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:13 +0000 (09:01 -0700)

Merge branch 'dp/autoconf-curl-ssl' into maint

The ./configure script generated from configure.ac was taught how
to detect support of SSL by libcurl better.

* dp/autoconf-curl-ssl:
./configure.ac: detect SSL in libcurl using curl-config

Merge branch 'ak/curl-imap-send-explicit-scheme' into... Junio C Hamano Fri, 28 Oct 2016 16:01:13 +0000 (09:01 -0700)

Merge branch 'ak/curl-imap-send-explicit-scheme' into maint

When we started cURL to talk to imap server when a new enough
version of cURL library is available, we forgot to explicitly add
imap(s):// before the destination. To some folks, that didn't work
and the library tried to make HTTP(s) requests instead.

* ak/curl-imap-send-explicit-scheme:
imap-send: Tell cURL to use imap:// or imaps://

Merge branch 'jt/fetch-pack-in-vain-count-with-stateles... Junio C Hamano Fri, 28 Oct 2016 16:01:12 +0000 (09:01 -0700)

Merge branch 'jt/fetch-pack-in-vain-count-with-stateless' into maint

When "git fetch" tries to find where the history of the repository
it runs in has diverged from what the other side has, it has a
mechanism to avoid digging too deep into irrelevant side branches.
This however did not work well over the "smart-http" transport due
to a design bug, which has been fixed.

* jt/fetch-pack-in-vain-count-with-stateless:
fetch-pack: do not reset in_vain on non-novel acks

Merge branch 'js/regexec-buf' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:12 +0000 (09:01 -0700)

Merge branch 'js/regexec-buf' into maint

A follow-up to an already graduated topic.

* js/regexec-buf:
configure.ac: improve description of NO_REGEX test

Merge branch 'rs/c-auto-resets-attributes' into maintJunio C Hamano Fri, 28 Oct 2016 16:01:11 +0000 (09:01 -0700)

Merge branch 'rs/c-auto-resets-attributes' into maint

When "%C(auto)" appears at the very beginning of the pretty format
string, it did not need to issue the reset sequence, but it did.
This is a small optimization to already graduated topic.

* rs/c-auto-resets-attributes:
pretty: avoid adding reset for %C(auto) if output is empty
pretty: let %C(auto) reset all attributes

Merge branch 'yk/git-tag-remove-mention-of-old-layout... Junio C Hamano Fri, 28 Oct 2016 16:01:10 +0000 (09:01 -0700)

Merge branch 'yk/git-tag-remove-mention-of-old-layout-in-doc' into maint

Shorten description of auto-following in "git tag" by removing a
mention of historical remotes layout which is not relevant to the
main topic.

* yk/git-tag-remove-mention-of-old-layout-in-doc:
doc: remove reference to the traditional layout in git-tag.txt

Documentation/fmt-merge-msg: fix markup in exampleStefan Christ Fri, 28 Oct 2016 10:01:26 +0000 (12:01 +0200)

Documentation/fmt-merge-msg: fix markup in example

Use at least 4 delimiting dashes that are required for
ListingBlock to get this block rendered as verbatim text.

Signed-off-by: Stefan Christ <contact@stefanchrist.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

valgrind: support test helpersRené Scharfe Thu, 27 Oct 2016 22:14:00 +0000 (00:14 +0200)

valgrind: support test helpers

Tests run with --valgrind call git commands through a wrapper script
that invokes valgrind on them. This script (valgrind.sh) is in turn
invoked through symlinks created for each command in t/valgrind/bin/.

Since e6e7530d (test helpers: move test-* to t/helper/ subdirectory)
these symlinks have been broken for test helpers -- they point to the
old locations in the root of the build directory. Fix that by teaching
the code for creating the links about the new location of the binaries,
and do the same in the wrapper script to allow it to find its payload.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Getting ready for 2.11-rc0Junio C Hamano Thu, 27 Oct 2016 22:06:24 +0000 (15:06 -0700)

Getting ready for 2.11-rc0

... but not quite yet. A few more topics to go.

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

Merge branch 'svn-cache' of git://bogomips.org/git-svnJunio C Hamano Thu, 27 Oct 2016 22:04:08 +0000 (15:04 -0700)

Merge branch 'svn-cache' of git://bogomips.org/git-svn

* 'svn-cache' of git://bogomips.org/git-svn:
git-svn: do not reuse caches memoized for a different architecture

Merge branch 'svn-wt' of git://bogomips.org/git-svnJunio C Hamano Thu, 27 Oct 2016 22:03:35 +0000 (15:03 -0700)

Merge branch 'svn-wt' of git://bogomips.org/git-svn

* 'svn-wt' of git://bogomips.org/git-svn:
git-svn: "git worktree" awareness
git-svn: reduce scope of input record separator change

Merge branch 'nd/ita-empty-commit'Junio C Hamano Thu, 27 Oct 2016 21:58:50 +0000 (14:58 -0700)

Merge branch 'nd/ita-empty-commit'

When new paths were added by "git add -N" to the index, it was
enough to circumvent the check by "git commit" to refrain from
making an empty commit without "--allow-empty". The same logic
prevented "git status" to show such a path as "new file" in the
"Changes not staged for commit" section.

* nd/ita-empty-commit:
commit: don't be fooled by ita entries when creating initial commit
commit: fix empty commit creation when there's no changes but ita entries
diff: add --ita-[in]visible-in-index
diff-lib: allow ita entries treated as "not yet exist in index"

Merge branch 'js/prepare-sequencer'Junio C Hamano Thu, 27 Oct 2016 21:58:50 +0000 (14:58 -0700)

Merge branch 'js/prepare-sequencer'

Update of the sequencer codebase to make it reusable to reimplement
"rebase -i" continues.

* js/prepare-sequencer: (27 commits)
sequencer: mark all error messages for translation
sequencer: start error messages consistently with lower case
sequencer: quote filenames in error messages
sequencer: mark action_name() for translation
sequencer: remove overzealous assumption in rebase -i mode
sequencer: teach write_message() to append an optional LF
sequencer: refactor write_message() to take a pointer/length
sequencer: roll back lock file if write_message() failed
sequencer: stop releasing the strbuf in write_message()
sequencer: left-trim lines read from the script
sequencer: support cleaning up commit messages
sequencer: support amending commits
sequencer: allow editing the commit message on a case-by-case basis
sequencer: introduce a helper to read files written by scripts
sequencer: prepare for rebase -i's commit functionality
sequencer: remember the onelines when parsing the todo file
sequencer: get rid of the subcommand field
sequencer: avoid completely different messages for different actions
sequencer: strip CR from the todo script
sequencer: completely revamp the "todo" script parsing
...

Merge branch 'jk/daemon-path-ok-check-truncation'Junio C Hamano Thu, 27 Oct 2016 21:58:50 +0000 (14:58 -0700)

Merge branch 'jk/daemon-path-ok-check-truncation'

"git daemon" used fixed-length buffers to turn URL to the
repository the client asked for into the server side directory
path, using snprintf() to avoid overflowing these buffers, but
allowed possibly truncated paths to the directory. This has been
tightened to reject such a request that causes overlong path to be
required to serve.

* jk/daemon-path-ok-check-truncation:
daemon: detect and reject too-long paths

Merge branch 'rs/ring-buffer-wraparound'Junio C Hamano Thu, 27 Oct 2016 21:58:49 +0000 (14:58 -0700)

Merge branch 'rs/ring-buffer-wraparound'

The code that we have used for the past 10+ years to cycle
4-element ring buffers turns out to be not quite portable in
theoretical world.

* rs/ring-buffer-wraparound:
hex: make wraparound of the index into ring-buffer explicit

Merge branch 'sb/submodule-ignore-trailing-slash'Junio C Hamano Thu, 27 Oct 2016 21:58:49 +0000 (14:58 -0700)

Merge branch 'sb/submodule-ignore-trailing-slash'

A minor regression fix for "git submodule".

* sb/submodule-ignore-trailing-slash:
t0060: sidestep surprising path mangling results on Windows
submodule: ignore trailing slash in relative url
submodule: ignore trailing slash on superproject URL

Merge branch 'jk/no-looking-at-dotgit-outside-repo'Junio C Hamano Thu, 27 Oct 2016 21:58:48 +0000 (14:58 -0700)

Merge branch 'jk/no-looking-at-dotgit-outside-repo'

Update "git diff --no-index" codepath not to try to peek into .git/
directory that happens to be under the current directory, when we
know we are operating outside any repository.

* jk/no-looking-at-dotgit-outside-repo:
diff: handle sha1 abbreviations outside of repository
diff_aligned_abbrev: use "struct oid"
diff_unique_abbrev: rename to diff_aligned_abbrev
find_unique_abbrev: use 4-buffer ring
test-*-cache-tree: setup git dir
read info/{attributes,exclude} only when in repository

Merge branch 'jc/abbrev-auto'Junio C Hamano Thu, 27 Oct 2016 21:58:48 +0000 (14:58 -0700)

Merge branch 'jc/abbrev-auto'

"git push" and "git fetch" reports from what old object to what new
object each ref was updated, using abbreviated refnames, and they
attempt to align the columns for this and other pieces of
information. The way these codepaths compute how many display
columns to allocate for the object names portion of this output has
been updated to match the recent "auto scale the default
abbreviation length" change.

* jc/abbrev-auto:
transport: compute summary-width dynamically
transport: allow summary-width to be computed dynamically
fetch: pass summary_width down the callchain
transport: pass summary_width down the callchain

Merge branch 'jk/abbrev-auto'Junio C Hamano Thu, 27 Oct 2016 21:58:47 +0000 (14:58 -0700)

Merge branch 'jk/abbrev-auto'

Updates the way approximate count of total objects is computed
while attempting to come up with a unique abbreviated object name,
which in turn needs to estimate how many hexdigits are necessary to
ensure uniqueness.

* jk/abbrev-auto:
find_unique_abbrev: move logic out of get_short_sha1()

Merge branch 'lt/abbrev-auto'Junio C Hamano Thu, 27 Oct 2016 21:58:47 +0000 (14:58 -0700)

Merge branch 'lt/abbrev-auto'

Allow the default abbreviation length, which has historically been
7, to scale as the repository grows. The logic suggests to use 12
hexdigits for the Linux kernel, and 9 to 10 for Git itself.

* lt/abbrev-auto:
abbrev: auto size the default abbreviation
abbrev: prepare for new world order
abbrev: add FALLBACK_DEFAULT_ABBREV to prepare for auto sizing

git-svn: do not reuse caches memoized for a different... Gavin Lambert Tue, 25 Oct 2016 15:30:11 +0000 (17:30 +0200)

git-svn: do not reuse caches memoized for a different architecture

Reusing cached data speeds up git-svn by quite a fair bit. However, if
the YAML module is unavailable, the caches are written to disk in an
architecture-dependent manner. That leads to problems when upgrading,
say, from 32-bit to 64-bit Git for Windows.

Let's just try to read those caches back if we detect the absence of the
YAML module and the presence of the file, and delete the file if it
could not be read back correctly.

Note that the only way to catch the error when the memoized cache could
not be read back is to put the call inside an `eval { ... }` block
because it would die otherwise; the `eval` block should also return `1`
in case of success explicitly since the function reading back the cached
data does not return an appropriate value to test for success.

This fixes https://github.com/git-for-windows/git/issues/233.

[ew: import "retrieve" explictly, check unlink result]

Signed-off-by: Gavin Lambert <github@mirality.co.nz>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Eric Wong <e@80x24.org>

git-compat-util: move content inside ifdef/endif guardsJeff King Thu, 27 Oct 2016 17:30:30 +0000 (13:30 -0400)

git-compat-util: move content inside ifdef/endif guards

Commit 3f2e2297b9 (add an extra level of indirection to
main(), 2016-07-01) added a declaration to git-compat-util.h,
but it was accidentally placed after the final #endif that
guards against multiple inclusions.

This doesn't have any actual impact on the code, since it's
not incorrect to repeat a function declaration in C. But
it's a bad habit, and makes it more likely for somebody else
to make the same mistake. It also defeats gcc's optimization
to avoid opening header files whose contents are completely
guarded.

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

diff: handle sha1 abbreviations outside of repositoryJeff King Thu, 20 Oct 2016 06:21:25 +0000 (02:21 -0400)

diff: handle sha1 abbreviations outside of repository

When generating diffs outside a repository (e.g., with "diff
--no-index"), we may write abbreviated sha1s as part of
"--raw" output or the "index" lines of "--patch" output.
Since we have no object database, we never find any
collisions, and these sha1s get whatever static abbreviation
length is configured (typically 7).

However, we do blindly look in ".git/objects" to see if any
objects exist, even though we know we are not in a
repository. This is usually harmless because such a
directory is unlikely to exist, but could be wrong in rare
circumstances.

Let's instead notice when we are not in a repository and
behave as if the object database is empty (i.e., just use
the default abbrev length). It would perhaps make sense to
be conservative and show full sha1s in that case, but
showing the default abbreviation is what we've always done
(and is certainly less ugly).

Note that this does mean that:

cd /not/a/repo
GIT_OBJECT_DIRECTORY=/some/real/objdir git diff --no-index ...

used to look for collisions in /some/real/objdir but now
does not. This could be considered either a bugfix (we do
not look at objects if we have no repository) or a
regression, but it seems unlikely that anybody would care
much either way.

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

diff_aligned_abbrev: use "struct oid"Jeff King Thu, 20 Oct 2016 06:20:07 +0000 (02:20 -0400)

diff_aligned_abbrev: use "struct oid"

Since we're modifying this function anyway, it's a good time
to update it to the more modern "struct oid". We can also
drop some of the magic numbers in favor of GIT_SHA1_HEXSZ,
along with some descriptive comments.

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

diff_unique_abbrev: rename to diff_aligned_abbrevJeff King Thu, 20 Oct 2016 06:19:43 +0000 (02:19 -0400)

diff_unique_abbrev: rename to diff_aligned_abbrev

The word "align" describes how the function actually differs
from find_unique_abbrev, and will make it less confusing
when we add more diff-specific abbrevation functions that do
not do this alignment.

Since this is a globally available function, let's also move
its descriptive comment to the header file, where we
typically document function interfaces.

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

find_unique_abbrev: use 4-buffer ringJeff King Thu, 20 Oct 2016 06:19:19 +0000 (02:19 -0400)

find_unique_abbrev: use 4-buffer ring

Some code paths want to format multiple abbreviated sha1s in
the same output line. Because we use a single static buffer
for our return value, they have to either break their output
into several calls or allocate their own arrays and use
find_unique_abbrev_r().

Intead, let's mimic sha1_to_hex() and use a ring of several
buffers, so that the return value stays valid through
multiple calls. This shortens some of the callers, and makes
it harder to for them to make a silly mistake.

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

test-*-cache-tree: setup git dirJeff King Thu, 20 Oct 2016 06:16:59 +0000 (02:16 -0400)

test-*-cache-tree: setup git dir

These test helper programs access the index, but do not ever
setup_git_directory(), meaning we just blindly looked in
".git/index". This happened to work for the purposes of our
tests (which do not run from subdirectories, nor in
non-repos), but it's a bad habit.

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

read info/{attributes,exclude} only when in repositoryJeff King Thu, 20 Oct 2016 06:16:41 +0000 (02:16 -0400)

read info/{attributes,exclude} only when in repository

The low-level attribute and gitignore code will try to look
in $GIT_DIR/info for any repo-level configuration files,
even if we have not actually determined that we are in a
repository (e.g., running "git grep --no-index"). In such a
case they end up looking for ".git/info/attributes", etc.

This is generally harmless, as such a file is unlikely to
exist outside of a repository, but it's still conceptually
the wrong thing to do.

Let's detect this situation explicitly and skip reading the
file (i.e., the same behavior we'd get if we were in a
repository and the file did not exist).

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

Eleventh batch for 2.11Junio C Hamano Wed, 26 Oct 2016 20:28:47 +0000 (13:28 -0700)

Eleventh batch for 2.11

There still are a few topics that need to go in before -rc0 which
would make the shape of the upcoming release clearer, but here is
the final batch before it happens.

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

Merge branch 'ex/deprecate-empty-pathspec-as-match... Junio C Hamano Wed, 26 Oct 2016 20:14:56 +0000 (13:14 -0700)

Merge branch 'ex/deprecate-empty-pathspec-as-match-all'

An empty string used as a pathspec element has always meant
'everything matches', but it is too easy to write a script that
finds a path to remove in $path and run 'git rm "$paht"', which
ends up removing everything. Start warning about this use of an
empty string used for 'everything matches' and ask users to use a
more explicit '.' for that instead.

The hope is that existing users will not mind this change, and
eventually the warning can be turned into a hard error, upgrading
the deprecation into removal of this (mis)feature.

* ex/deprecate-empty-pathspec-as-match-all:
pathspec: warn on empty strings as pathspec

Merge branch 'po/fix-doc-merge-base-illustration'Junio C Hamano Wed, 26 Oct 2016 20:14:55 +0000 (13:14 -0700)

Merge branch 'po/fix-doc-merge-base-illustration'

Some AsciiDoc formatter mishandles a displayed illustration with
tabs in it. Adjust a few of them in merge-base documentation to
work around them.

* po/fix-doc-merge-base-illustration:
doc: fix the 'revert a faulty merge' ASCII art tab spacing
doc: fix merge-base ASCII art tab spacing

Merge branch 'jk/tap-verbose-fix'Junio C Hamano Wed, 26 Oct 2016 20:14:54 +0000 (13:14 -0700)

Merge branch 'jk/tap-verbose-fix'

The Travis CI configuration we ship ran the tests with --verbose
option but this risks non-TAP output that happens to be "ok" to be
misinterpreted as TAP signalling a test that passed. This resulted
in unnecessary failure. This has been corrected by introducing a
new mode to run our tests in the test harness to send the verbose
output separately to the log file.

* jk/tap-verbose-fix:
test-lib: bail out when "-v" used under "prove"
travis: use --verbose-log test option
test-lib: add --verbose-log option
test-lib: handle TEST_OUTPUT_DIRECTORY with spaces

Merge branch 'mm/send-email-cc-cruft-after-address'Junio C Hamano Wed, 26 Oct 2016 20:14:53 +0000 (13:14 -0700)

Merge branch 'mm/send-email-cc-cruft-after-address'

"git send-email" attempts to pick up valid e-mails from the
trailers, but people in real world write non-addresses there, like
"Cc: Stable <add@re.ss> # 4.8+", which broke the output depending
on the availability and vintage of Mail::Address perl module.

* mm/send-email-cc-cruft-after-address:
Git.pm: add comment pointing to t9000
t9000-addresses: update expected results after fix
parse_mailboxes: accept extra text after <...> address

Merge branch 'yk/git-tag-remove-mention-of-old-layout... Junio C Hamano Wed, 26 Oct 2016 20:14:52 +0000 (13:14 -0700)

Merge branch 'yk/git-tag-remove-mention-of-old-layout-in-doc'

Shorten description of auto-following in "git tag" by removing a
mention of historical remotes layout which is not relevant to the
main topic.

* yk/git-tag-remove-mention-of-old-layout-in-doc:
doc: remove reference to the traditional layout in git-tag.txt

Merge branch 'pt/gitgui-updates'Junio C Hamano Wed, 26 Oct 2016 20:14:51 +0000 (13:14 -0700)

Merge branch 'pt/gitgui-updates'

A new version of git-gui, now at its 0.21.0 tag.

* pt/gitgui-updates: (22 commits)
git-gui: set version 0.21
git-gui: Mark 'All' in remote.tcl for translation
git-gui i18n: Updated Bulgarian translation (565,0f,0u)
git-gui: avoid persisting modified author identity
git-gui: handle the encoding of Git's output correctly
git-gui: unicode file name support on windows
git-gui: Update Russian translation
git-gui: maintain backwards compatibility for merge syntax
git-gui i18n: mark string in lib/error.tcl for translation
git-gui: fix incorrect use of Tcl append command
git-gui i18n: mark "usage:" strings for translation
git-gui i18n: internationalize use of colon punctuation
git-gui: ensure the file in the diff pane is in the list of selected files
git-gui: support for $FILENAMES in tool definitions
git-gui: fix initial git gui message encoding
git-gui/po/glossary/txt-to-pot.sh: use the $( ... ) construct for command substitution
git-gui (Windows): use git-gui.exe in `Create Desktop Shortcut`
git-gui: fix detection of Cygwin
Amend tab ordering and text widget border and highlighting.
Allow keyboard control to work in the staging widgets.
...

Merge branch 'jk/diff-submodule-diff-inline'Junio C Hamano Wed, 26 Oct 2016 20:14:51 +0000 (13:14 -0700)

Merge branch 'jk/diff-submodule-diff-inline'

A recently graduated topic regressed "git rev-list --header"
output, breaking "gitweb". This has been fixed.

* jk/diff-submodule-diff-inline:
rev-list: use hdr_termination instead of a always using a newline

Merge branch 'tg/add-chmod+x-fix'Junio C Hamano Wed, 26 Oct 2016 20:14:50 +0000 (13:14 -0700)

Merge branch 'tg/add-chmod+x-fix'

A hot-fix for a test added by a recent topic that went to both
'master' and 'maint' already.

* tg/add-chmod+x-fix:
t3700: fix broken test under !SANITY

Merge branch 'bw/submodule-branch-dot-doc'Junio C Hamano Wed, 26 Oct 2016 20:14:49 +0000 (13:14 -0700)

Merge branch 'bw/submodule-branch-dot-doc'

Recent git allows submodule.<name>.branch to use a special token
"." instead of the branch name; the documentation has been updated
to describe it.

* bw/submodule-branch-dot-doc:
submodules doc: update documentation for "." used for submodule branches

Merge branch 'pb/test-parse-options-expect'Junio C Hamano Wed, 26 Oct 2016 20:14:48 +0000 (13:14 -0700)

Merge branch 'pb/test-parse-options-expect'

Test clean-up.

* pb/test-parse-options-expect:
t0040: convert all possible tests to use `test-parse-options --expect`

Merge branch 'jk/tighten-alloc'Junio C Hamano Wed, 26 Oct 2016 20:14:48 +0000 (13:14 -0700)

Merge branch 'jk/tighten-alloc'

Protect our code from over-eager compilers.

* jk/tighten-alloc:
inline xalloc_flex() into FLEXPTR_ALLOC_MEM
avoid pointer arithmetic involving NULL in FLEX_ALLOC_MEM

Merge branch 'va/i18n'Junio C Hamano Wed, 26 Oct 2016 20:14:47 +0000 (13:14 -0700)

Merge branch 'va/i18n'

More i18n.

* va/i18n:
i18n: diff: mark warnings for translation
i18n: credential-cache--daemon: mark advice for translation
i18n: convert mark error messages for translation
i18n: apply: mark error message for translation
i18n: apply: mark error messages for translation
i18n: apply: mark info messages for translation
i18n: apply: mark plural string for translation

Merge branch 'jk/fetch-quick-tag-following'Junio C Hamano Wed, 26 Oct 2016 20:14:47 +0000 (13:14 -0700)

Merge branch 'jk/fetch-quick-tag-following'

When fetching from a remote that has many tags that are irrelevant
to branches we are following, we used to waste way too many cycles
when checking if the object pointed at by a tag (that we are not
going to fetch!) exists in our repository too carefully.

* jk/fetch-quick-tag-following:
fetch: use "quick" has_sha1_file for tag following

Merge branch 'jk/merge-base-fork-point-without-reflog'Junio C Hamano Wed, 26 Oct 2016 20:14:46 +0000 (13:14 -0700)

Merge branch 'jk/merge-base-fork-point-without-reflog'

"git rebase" immediately after "git clone" failed to find the fork
point from the upstream.

* jk/merge-base-fork-point-without-reflog:
merge-base: handle --fork-point without reflog

Merge branch 'jk/ambiguous-short-object-names'Junio C Hamano Wed, 26 Oct 2016 20:14:46 +0000 (13:14 -0700)

Merge branch 'jk/ambiguous-short-object-names'

A test fixup to recently graduated topic.

* jk/ambiguous-short-object-names:
t1512: become resilient to GETTEXT_POISON build

Merge branch 'jk/upload-pack-use-prio-queue'Junio C Hamano Wed, 26 Oct 2016 20:14:46 +0000 (13:14 -0700)

Merge branch 'jk/upload-pack-use-prio-queue'

Code clean-up and performance improvement to reduce use of
timestamp-ordered commit-list by replacing it with a priority
queue.

* jk/upload-pack-use-prio-queue:
upload-pack: use priority queue in reachable() check

Merge branch 'ab/gitweb-abbrev-links'Junio C Hamano Wed, 26 Oct 2016 20:14:45 +0000 (13:14 -0700)

Merge branch 'ab/gitweb-abbrev-links'

In addition to purely abbreviated commit object names, "gitweb"
learned to turn "git describe" output (e.g. v2.9.3-599-g2376d31787)
into clickable links in its output.

* ab/gitweb-abbrev-links:
gitweb: link to "git describe"'d commits in log messages
gitweb: link to 7-char+ SHA-1s, not only 8-char+
gitweb: fix a typo in a comment

Merge branch 'dk/worktree-dup-checkout-with-bare-is-ok'Junio C Hamano Wed, 26 Oct 2016 20:14:45 +0000 (13:14 -0700)

Merge branch 'dk/worktree-dup-checkout-with-bare-is-ok'

In a worktree connected to a repository elsewhere, created via "git
worktree", "git checkout" attempts to protect users from confusion
by refusing to check out a branch that is already checked out in
another worktree. However, this also prevented checking out a
branch, which is designated as the primary branch of a bare
reopsitory, in a worktree that is connected to the bare
repository. The check has been corrected to allow it.

* dk/worktree-dup-checkout-with-bare-is-ok:
worktree: allow the main brach of a bare repository to be checked out

Merge branch 'mg/gpg-richer-status'Junio C Hamano Wed, 26 Oct 2016 20:14:45 +0000 (13:14 -0700)

Merge branch 'mg/gpg-richer-status'

The GPG verification status shown in "%G?" pretty format specifier
was not rich enough to differentiate a signature made by an expired
key, a signature made by a revoked key, etc. New output letters
have been assigned to express them.

* mg/gpg-richer-status:
gpg-interface: use more status letters

Merge branch 'jc/cocci-xstrdup-or-null'Junio C Hamano Wed, 26 Oct 2016 20:14:45 +0000 (13:14 -0700)

Merge branch 'jc/cocci-xstrdup-or-null'

Code cleanup.

* jc/cocci-xstrdup-or-null:
cocci: refactor common patterns to use xstrdup_or_null()

Merge branch 'mm/credential-libsecret'Junio C Hamano Wed, 26 Oct 2016 20:14:45 +0000 (13:14 -0700)

Merge branch 'mm/credential-libsecret'

A new credential helper that talks via "libsecret" with
implementations of XDG Secret Service API has been added to
contrib/credential/.

* mm/credential-libsecret:
contrib: add credential helper for libsecret

Merge branch 'bw/ls-files-recurse-submodules'Junio C Hamano Wed, 26 Oct 2016 20:14:44 +0000 (13:14 -0700)

Merge branch 'bw/ls-files-recurse-submodules'

"git ls-files" learned "--recurse-submodules" option that can be
used to get a listing of tracked files across submodules (i.e. this
only works with "--cached" option, not for listing untracked or
ignored files). This would be a useful tool to sit on the upstream
side of a pipe that is read with xargs to work on all working tree
files from the top-level superproject.

* bw/ls-files-recurse-submodules:
ls-files: add pathspec matching for submodules
ls-files: pass through safe options for --recurse-submodules
ls-files: optionally recurse into submodules
git: make super-prefix option

Merge branch 'js/libify-require-clean-work-tree'Junio C Hamano Wed, 26 Oct 2016 20:14:44 +0000 (13:14 -0700)

Merge branch 'js/libify-require-clean-work-tree'

The require_clean_work_tree() helper was recreated in C when "git
pull" was rewritten from shell; the helper is now made available to
other callers in preparation for upcoming "rebase -i" work.

* js/libify-require-clean-work-tree:
wt-status: begin error messages with lower-case
wt-status: teach has_{unstaged,uncommitted}_changes() about submodules
wt-status: export also the has_un{staged,committed}_changes() functions
wt-status: make the require_clean_work_tree() function reusable
pull: make code more similar to the shell script again
pull: drop confusing prefix parameter of die_on_unclean_work_tree()

Merge branch 'jc/ws-error-highlight'Junio C Hamano Wed, 26 Oct 2016 20:14:43 +0000 (13:14 -0700)

Merge branch 'jc/ws-error-highlight'

"git diff/log --ws-error-highlight=<kind>" lacked the corresponding
configuration variable to set it by default.

* jc/ws-error-highlight:
diff: introduce diff.wsErrorHighlight option
diff.c: move ws-error-highlight parsing helpers up
diff.c: refactor parse_ws_error_highlight()
t4015: split out the "setup" part of ws-error-highlight test

Merge branch 'jc/diff-unique-abbrev-comments'Junio C Hamano Wed, 26 Oct 2016 20:14:42 +0000 (13:14 -0700)

Merge branch 'jc/diff-unique-abbrev-comments'

A bit more comments in a tricky code.

* jc/diff-unique-abbrev-comments:
diff_unique_abbrev(): document its assumption and limitation

hex: make wraparound of the index into ring-buffer... René Scharfe Sun, 23 Oct 2016 17:57:30 +0000 (19:57 +0200)

hex: make wraparound of the index into ring-buffer explicit

Overflow is defined for unsigned integers, but not for signed ones.

We could make the ring-buffer index in sha1_to_hex() and
get_pathname() unsigned to be on the safe side to resolve this, but
let's make it explicit that we are wrapping around at whatever the
number of elements the ring-buffer has. The compiler is smart enough
to turn modulus into bitmask for these codepaths that use
ring-buffers of a size that is a power of 2.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: allow stashes to be referenced by index onlyAaron M Watson Mon, 24 Oct 2016 23:40:13 +0000 (19:40 -0400)

stash: allow stashes to be referenced by index only

Instead of referencing "stash@{n}" explicitly, make it possible to
simply reference as "n". Most users only reference stashes by their
position in the stash stack (what I refer to as the "index" here).

The syntax for the typical stash (stash@{n}) is slightly annoying and
easy to forget, and sometimes difficult to escape properly in a
script. Because of this the capability to do things with the stash by
simply referencing the index is desirable.

This patch includes the superior implementation provided by Øsse Walle
(thanks for that), with a slight change to fix a broken test in the test
suite. I also merged the test scripts as suggested by Jeff King, and
un-wrapped the documentation as suggested by Junio Hamano.

Signed-off-by: Aaron M Watson <watsona4@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>

t0060: sidestep surprising path mangling results on... Johannes Sixt Tue, 18 Oct 2016 20:06:07 +0000 (22:06 +0200)

t0060: sidestep surprising path mangling results on Windows

When an MSYS program (such as the bash that drives the test suite)
invokes git on Windows, absolute Unix style paths are transformed into
Windows native absolute paths (drive letter form). However, this
transformation also includes some simplifications that are not just
straight-forward textual substitutions:

- When the path ends in "/.", then the dot is stripped, but not the
directory separator.

- When the path contains "..", then it is optimized away if possible,
e.g., "/c/dir/foo/../bar" becomes "c:/dir/bar".

These additional transformations violate the assumptions of some
submodule path tests. We can avoid them when the input is already a
Windows native path, because then MSYS leaves the path unmolested.

Convert the uses of $PWD to $(pwd); the latter returns a native Windows
path.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-cache: make sure file handles are not inherited... Lars Schneider Mon, 24 Oct 2016 18:03:00 +0000 (20:03 +0200)

read-cache: make sure file handles are not inherited by child processes

This fixes "convert: add filter.<driver>.process option" (edcc8581) on
Windows.

Consider the case of a file that requires filtering and is present in
branch A but not in branch B. If A is the current HEAD and we checkout B
then the following happens:

1. ce_compare_data() opens the file
2. index_fd() detects that the file requires to run a clean filter and
calls index_stream_convert_blob()
4. index_stream_convert_blob() calls convert_to_git_filter_fd()
5. convert_to_git_filter_fd() calls apply_filter() which creates a
new long running filter process (in case it is the first file
of this kind to be filtered)
6. The new filter process inherits all file handles. This is the
default on Linux/OSX and is explicitly defined in the
`CreateProcessW` call in `mingw.c` on Windows.
7. ce_compare_data() closes the file
8. Git unlinks the file as it is not present in B

The unlink operation does not work on Windows because the filter process
has still an open handle to the file. On Linux/OSX the unlink operation
succeeds but the file descriptors still leak into the child process.

Fix this problem by opening files in read-cache with the O_CLOEXEC flag
to ensure that the file descriptor does not remain open in a newly
spawned process similar to 05d1ed6148 ("mingw: ensure temporary file
handles are not inherited by child processes", 2016-08-22).

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: open window into packfiles with O_CLOEXECLars Schneider Mon, 24 Oct 2016 18:02:59 +0000 (20:02 +0200)

sha1_file: open window into packfiles with O_CLOEXEC

All processes that the Git main process spawns inherit the open file
descriptors of the main process. These leaked file descriptors can
cause problems.

Use the O_CLOEXEC flag similar to 05d1ed61 to fix the leaked file
descriptors.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_file: rename git_open_noatime() to git_open()Lars Schneider Mon, 24 Oct 2016 18:02:59 +0000 (20:02 +0200)

sha1_file: rename git_open_noatime() to git_open()

This function is meant to be used when reading from files in the
object store, and the original objective was to avoid smudging atime
of loose object files too often, hence its name. Because we'll be
extending its role in the next commit to also arrange the file
descriptors they return auto-closed in the child processes, rename
it to lose "noatime" part that is too specific.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: fix the 'revert a faulty merge' ASCII art tab... Philip Oakley Mon, 24 Oct 2016 21:54:32 +0000 (22:54 +0100)

doc: fix the 'revert a faulty merge' ASCII art tab spacing

The asciidoctor doc-tool stack does not always respect the 'tab = 8 spaces' rule
expectation, particularly for the Git-for-Windows generated html pages. This
follows on from the 'doc: fix merge-base ASCII art tab spacing' fix.

Use just spaces within the block of the ascii art.

All other *.txt ascii art containing three dashes has been checked.
Asciidoctor correctly formats the other art blocks that do contain tabs.

Signed-off-by: Philip Oakley <philipoakley@iee.org
Signed-off-by: Junio C Hamano <gitster@pobox.com>