gitweb.git
Merge branch 'js/icase-wt-detection'Junio C Hamano Thu, 15 Oct 2015 22:43:39 +0000 (15:43 -0700)

Merge branch 'js/icase-wt-detection'

On a case insensitive filesystems, setting GIT_WORK_TREE variable
using a random cases that does not agree with what the filesystem
thinks confused Git that it wasn't inside the working tree.

* js/icase-wt-detection:
setup: fix "inside work tree" detection on case-insensitive filesystems

Merge branch 'kn/for-each-branch'Junio C Hamano Thu, 15 Oct 2015 22:43:38 +0000 (15:43 -0700)

Merge branch 'kn/for-each-branch'

Update "git branch" that list existing branches, using the
ref-filter API that is shared with "git tag" and "git
for-each-ref".

* kn/for-each-branch:
branch: add '--points-at' option
branch.c: use 'ref-filter' APIs
branch.c: use 'ref-filter' data structures
branch: drop non-commit error reporting
branch: move 'current' check down to the presentation layer
branch: roll show_detached HEAD into regular ref_list
branch: bump get_head_description() to the top
branch: refactor width computation

Merge branch 'sb/perf-without-installed-git'Junio C Hamano Thu, 15 Oct 2015 22:43:37 +0000 (15:43 -0700)

Merge branch 'sb/perf-without-installed-git'

Performance-measurement tests did not work without an installed Git.

* sb/perf-without-installed-git:
t/perf: make runner work even if Git is not installed

Merge branch 'sb/http-flaky-test-fix'Junio C Hamano Thu, 15 Oct 2015 22:43:35 +0000 (15:43 -0700)

Merge branch 'sb/http-flaky-test-fix'

A test script for the HTTP service had a timing dependent bug,
which was fixed.

* sb/http-flaky-test-fix:
t5561: get rid of racy appending to logfile

Merge branch 'jc/fsck-dropped-errors'Junio C Hamano Thu, 15 Oct 2015 22:43:35 +0000 (15:43 -0700)

Merge branch 'jc/fsck-dropped-errors'

There were some classes of errors that "git fsck" diagnosed to its
standard error that did not cause it to exit with non-zero status.

* jc/fsck-dropped-errors:
fsck: exit with non-zero when problems are found

Merge branch 'ls/p4-translation-failure'Junio C Hamano Thu, 15 Oct 2015 22:43:34 +0000 (15:43 -0700)

Merge branch 'ls/p4-translation-failure'

Work around "git p4" failing when the P4 depot records the contents
in UTF-16 without UTF-16 BOM.

* ls/p4-translation-failure:
git-p4: handle "Translation of file content failed"
git-p4: add test case for "Translation of file content failed" error

Merge branch 'nd/gc-auto-background-fix'Junio C Hamano Thu, 15 Oct 2015 22:43:32 +0000 (15:43 -0700)

Merge branch 'nd/gc-auto-background-fix'

When "git gc --auto" is backgrounded, its diagnosis message is
lost. Save it to a file in $GIT_DIR and show it next time the "gc
--auto" is run.

* nd/gc-auto-background-fix:
gc: save log from daemonized gc --auto and print it next time

Merge branch 'mk/submodule-gitdir-path'Junio C Hamano Thu, 15 Oct 2015 22:43:31 +0000 (15:43 -0700)

Merge branch 'mk/submodule-gitdir-path'

The submodule code has been taught to work better with separate
work trees created via "git worktree add".

* mk/submodule-gitdir-path:
path: implement common_dir handling in git_pathdup_submodule()
submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()

Third batch for 2.7Junio C Hamano Wed, 14 Oct 2015 21:31:23 +0000 (14:31 -0700)

Third batch for 2.7

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

Merge branch 'pt/pull-builtin'Junio C Hamano Wed, 14 Oct 2015 21:30:20 +0000 (14:30 -0700)

Merge branch 'pt/pull-builtin'

* pt/pull-builtin:
merge: grammofix in please-commit-before-merge message

Merge branch 'nd/ls-remote-does-not-have-u-option'Junio C Hamano Wed, 14 Oct 2015 21:30:19 +0000 (14:30 -0700)

Merge branch 'nd/ls-remote-does-not-have-u-option'

* nd/ls-remote-does-not-have-u-option:
ls-remote.txt: delete unsupported option

Merge branch 'jk/asciidoctor-section-heading-markup... Junio C Hamano Wed, 14 Oct 2015 21:30:17 +0000 (14:30 -0700)

Merge branch 'jk/asciidoctor-section-heading-markup-fix'

* jk/asciidoctor-section-heading-markup-fix:
Documentation: fix section header mark-up

Merge branch 'tk/typofix-connect-unknown-proto-error'Junio C Hamano Wed, 14 Oct 2015 21:30:16 +0000 (14:30 -0700)

Merge branch 'tk/typofix-connect-unknown-proto-error'

* tk/typofix-connect-unknown-proto-error:
connect: fix typo in result string of prot_name()

Merge branch 'jk/notes-dwim-doc'Junio C Hamano Wed, 14 Oct 2015 21:30:15 +0000 (14:30 -0700)

Merge branch 'jk/notes-dwim-doc'

The way how --ref/--notes to specify the notes tree reference are
DWIMmed was not clearly documented.

* jk/notes-dwim-doc:
notes: correct documentation of DWIMery for notes references

git-multimail: update to release 1.2.0Matthieu Moy Sun, 11 Oct 2015 18:43:20 +0000 (20:43 +0200)

git-multimail: update to release 1.2.0

The changes are described in CHANGES.

Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Contributions-by: Elijah Newren <newren@palantir.com>
Contributions-by: Edward d'Auvergne <edward@nmr-relax.com>
Contributions-by: Vadim Zeitlin <vadim@zeitlins.org>
Contributions-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Contributions-by: Michael Haggerty <mhagger@alum.mit.edu>
Contributions-by: Elijah Newren <newren@gmail.com>
Contributions-by: Richard Hansen <rhansen@rhansen.org>
Contributions-by: Job Snijders <job@instituut.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Second batch for 2.7Junio C Hamano Wed, 7 Oct 2015 20:38:43 +0000 (13:38 -0700)

Second batch for 2.7

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

Merge branch 'ls/p4-path-encoding'Junio C Hamano Wed, 7 Oct 2015 20:38:19 +0000 (13:38 -0700)

Merge branch 'ls/p4-path-encoding'

"git p4" learned to reencode the pathname it uses to communicate
with the p4 depot with a new option.

* ls/p4-path-encoding:
git-p4: use replacement character for non UTF-8 characters in paths
git-p4: improve path encoding verbose output
git-p4: add config git-p4.pathEncoding

Merge branch 'gb/filter-branch-progress'Junio C Hamano Wed, 7 Oct 2015 20:38:18 +0000 (13:38 -0700)

Merge branch 'gb/filter-branch-progress'

Give progress meter to "git filter-branch".

* gb/filter-branch-progress:
filter-branch: make report-progress more readable
filter-branch: add passed/remaining seconds on progress

Merge branch 'nd/ignore-then-not-ignore'Junio C Hamano Wed, 7 Oct 2015 20:38:17 +0000 (13:38 -0700)

Merge branch 'nd/ignore-then-not-ignore'

Allow a later "!/abc/def" to override an earlier "/abc" that
appears in the same .gitignore file to make it easier to express
"everything in /abc directory is ignored, except for ...".

* nd/ignore-then-not-ignore:
dir.c: don't exclude whole dir prematurely if neg pattern may match
dir.c: make last_exclude_matching_from_list() run til the end

Merge branch 'ti/glibc-stdio-mutex-from-signal-handler'Junio C Hamano Wed, 7 Oct 2015 20:38:16 +0000 (13:38 -0700)

Merge branch 'ti/glibc-stdio-mutex-from-signal-handler'

Allocation related functions and stdio are unsafe things to call
inside a signal handler, and indeed killing the pager can cause
glibc to deadlock waiting on allocation mutex as our signal handler
tries to free() some data structures in wait_for_pager(). Reduce
these unsafe calls.

* ti/glibc-stdio-mutex-from-signal-handler:
pager: don't use unsafe functions in signal handlers

Start cycle toward 2.7Junio C Hamano Mon, 5 Oct 2015 19:58:10 +0000 (12:58 -0700)

Start cycle toward 2.7

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

Sync with 2.6.1Junio C Hamano Mon, 5 Oct 2015 19:46:27 +0000 (12:46 -0700)

Sync with 2.6.1

Merge branch 'mm/keyid-docs'Junio C Hamano Mon, 5 Oct 2015 19:30:26 +0000 (12:30 -0700)

Merge branch 'mm/keyid-docs'

Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line). Add notice to documentation of each and
every one of them.

* mm/keyid-docs:
Documentation: explain optional arguments better
Documentation/grep: fix documentation of -O
Documentation: use 'keyid' consistently, not 'key-id'

Merge branch 'bb/remote-get-url'Junio C Hamano Mon, 5 Oct 2015 19:30:25 +0000 (12:30 -0700)

Merge branch 'bb/remote-get-url'

"git remote" learned "get-url" subcommand to show the URL for a
given remote name used for fetching and pushing.

* bb/remote-get-url:
remote: add get-url subcommand

Merge branch 'jk/blame-first-parent'Junio C Hamano Mon, 5 Oct 2015 19:30:24 +0000 (12:30 -0700)

Merge branch 'jk/blame-first-parent'

"git blame --first-parent v1.0..v2.0" was not rejected but did not
limit the blame to commits on the first parent chain.

* jk/blame-first-parent:
blame: handle --first-parent

Merge branch 'jw/make-arflags-customizable'Junio C Hamano Mon, 5 Oct 2015 19:30:23 +0000 (12:30 -0700)

Merge branch 'jw/make-arflags-customizable'

The Makefile always runs the library archiver with hardcoded "crs"
options, which was inconvenient for exotic platforms on which
people want to use programs with totally different set of command
line options.

* jw/make-arflags-customizable:
Makefile: allow $(ARFLAGS) specified from the command line

Merge branch 'jk/rebase-no-autostash'Junio C Hamano Mon, 5 Oct 2015 19:30:21 +0000 (12:30 -0700)

Merge branch 'jk/rebase-no-autostash'

There was no way to defeat a configured rebase.autostash variable
from the command line, as "git rebase --no-autostash" was missing.

* jk/rebase-no-autostash:
Documentation/git-rebase: fix --no-autostash formatting
rebase: support --no-autostash

Merge branch 'jk/make-findstring-makeflags-fix'Junio C Hamano Mon, 5 Oct 2015 19:30:20 +0000 (12:30 -0700)

Merge branch 'jk/make-findstring-makeflags-fix'

Customization to change the behaviour with "make -w" and "make -s"
in our Makefile was broken when they were used together.

* jk/make-findstring-makeflags-fix:
Makefile: fix MAKEFLAGS tests with multiple flags

Merge branch 'sb/submodule-helper'Junio C Hamano Mon, 5 Oct 2015 19:30:19 +0000 (12:30 -0700)

Merge branch 'sb/submodule-helper'

The infrastructure to rewrite "git submodule" in C is being built
incrementally. Let's polish these early parts well enough and make
them graduate to 'next' and 'master', so that the more involved
follow-up can start cooking on a solid ground.

* sb/submodule-helper:
submodule: rewrite `module_clone` shell function in C
submodule: rewrite `module_name` shell function in C
submodule: rewrite `module_list` shell function in C

Merge branch 'kn/for-each-tag'Junio C Hamano Mon, 5 Oct 2015 19:30:18 +0000 (12:30 -0700)

Merge branch 'kn/for-each-tag'

The "ref-filter" code was taught about many parts of what "tag -l"
does and then "tag -l" is being reimplemented in terms of "ref-filter".

* kn/for-each-tag:
tag.c: implement '--merged' and '--no-merged' options
tag.c: implement '--format' option
tag.c: use 'ref-filter' APIs
tag.c: use 'ref-filter' data structures
ref-filter: add option to match literal pattern
ref-filter: add support to sort by version
ref-filter: add support for %(contents:lines=X)
ref-filter: add option to filter out tags, branches and remotes
ref-filter: implement an `align` atom
ref-filter: introduce match_atom_name()
ref-filter: introduce handler function for each atom
utf8: add function to align a string into given strbuf
ref-filter: introduce ref_formatting_state and ref_formatting_stack
ref-filter: move `struct atom_value` to ref-filter.c
strtoul_ui: reject negative values

Merge branch 'jk/test-lint-forbid-when-finished-in... Junio C Hamano Mon, 5 Oct 2015 19:30:17 +0000 (12:30 -0700)

Merge branch 'jk/test-lint-forbid-when-finished-in-subshell'

Because "test_when_finished" in our test framework queues the
clean-up tasks to be done in a shell variable, it should not be
used inside a subshell. Add a mechanism to allow 'bash' to catch
such uses, and fix the ones that were found.

* jk/test-lint-forbid-when-finished-in-subshell:
test-lib-functions: detect test_when_finished in subshell
t7800: don't use test_config in a subshell
test-lib-functions: support "test_config -C <dir> ..."
t5801: don't use test_when_finished in a subshell
t7610: don't use test_config in a subshell

Merge branch 'jk/interpret-trailers-outside-a-repository'Junio C Hamano Mon, 5 Oct 2015 19:30:16 +0000 (12:30 -0700)

Merge branch 'jk/interpret-trailers-outside-a-repository'

Allow "git interpret-trailers" to run outside of a Git repository.

* jk/interpret-trailers-outside-a-repository:
interpret-trailers: allow running outside a repository

Merge branch 'as/subtree-with-spaces'Junio C Hamano Mon, 5 Oct 2015 19:30:15 +0000 (12:30 -0700)

Merge branch 'as/subtree-with-spaces'

Update "git subtree" (in contrib/) so that it can take whitespaces
in the pathnames, not only in the in-tree pathname but the name of
the directory that the repository is in.

* as/subtree-with-spaces:
contrib/subtree: respect spaces in a repository path
t7900-subtree: test the "space in a subdirectory name" case

Merge branch 'jk/connect-clear-env'Junio C Hamano Mon, 5 Oct 2015 19:30:14 +0000 (12:30 -0700)

Merge branch 'jk/connect-clear-env'

The ssh transport, just like any other transport over the network,
did not clear GIT_* environment variables, but it is possible to
use SendEnv and AcceptEnv to leak them to the remote invocation of
Git, which is not a good idea at all. Explicitly clear them just
like we do for the local transport.

* jk/connect-clear-env:
git_connect: clarify conn->use_shell flag
git_connect: clear GIT_* environment for ssh

Merge branch 'jk/date-local'Junio C Hamano Mon, 5 Oct 2015 19:30:12 +0000 (12:30 -0700)

Merge branch 'jk/date-local'

"git log --date=local" used to only show the normal (default)
format in the local timezone. The command learned to take 'local'
as an instruction to use the local timezone with other formats,
e.g. "git show --date=rfc-local".

* jk/date-local:
t6300: add tests for "-local" date formats
t6300: make UTC and local dates different
date: make "local" orthogonal to date format
date: check for "local" before anything else
t6300: add test for "raw" date format
t6300: introduce test_date() helper
fast-import: switch crash-report date to iso8601
Documentation/rev-list: don't list date formats
Documentation/git-for-each-ref: don't list date formats
Documentation/config: don't list date formats
Documentation/blame-options: don't list date formats

Merge branch 'dt/refs-bisection'Junio C Hamano Mon, 5 Oct 2015 19:30:11 +0000 (12:30 -0700)

Merge branch 'dt/refs-bisection'

Move the refs used during a "git bisect" session to per-worktree
hierarchy refs/worktree/* so that independent bisect sessions can
be done in different worktrees.

* dt/refs-bisection:
refs: make refs/bisect/* per-worktree
path: optimize common dir checking
refs: clean up common_list

Merge branch 'nk/stash-show-config'Junio C Hamano Mon, 5 Oct 2015 19:30:10 +0000 (12:30 -0700)

Merge branch 'nk/stash-show-config'

Users who are too busy to type three extra keystrokes to ask for
"git stash show -p" can now set stash.showPatch configuration
varible to true to always see the actual patch, not just the list
of paths affected with feel for the extent of damage via diffstat.

* nk/stash-show-config:
stash: allow "stash show" diff output configurable

Merge branch 'jk/async-pkt-line'Junio C Hamano Mon, 5 Oct 2015 19:30:09 +0000 (12:30 -0700)

Merge branch 'jk/async-pkt-line'

The debugging infrastructure for pkt-line based communication has
been improved to mark the side-band communication specifically.

* jk/async-pkt-line:
pkt-line: show packets in async processes as "sideband"
run-command: provide in_async query function

Merge branch 'jh/quiltimport-explicit-series-file'Junio C Hamano Mon, 5 Oct 2015 19:30:08 +0000 (12:30 -0700)

Merge branch 'jh/quiltimport-explicit-series-file'

"quiltimport" allows to specify the series file by honoring the
$QUILT_SERIES environment and also --series command line option.

* jh/quiltimport-explicit-series-file:
git-quiltimport: add commandline option --series <file>

Merge branch 'ld/p4-import-labels'Junio C Hamano Mon, 5 Oct 2015 19:30:07 +0000 (12:30 -0700)

Merge branch 'ld/p4-import-labels'

Correct "git p4 --detect-labels" so that it does not fail to create
a tag that points at a commit that is also being imported.

* ld/p4-import-labels:
git-p4: fix P4 label import for unprocessed commits
git-p4: do not terminate creating tag for unknown commit
git-p4: failing test for ignoring invalid p4 labels

Merge branch 'ad/bisect-terms'Junio C Hamano Mon, 5 Oct 2015 19:30:06 +0000 (12:30 -0700)

Merge branch 'ad/bisect-terms'

The use of 'good/bad' in "git bisect" made it confusing to use when
hunting for a state change that is not a regression (e.g. bugfix).
The command learned 'old/new' and then allows the end user to
say e.g. "bisect start --term-old=fast --term=new=slow" to find a
performance regression.

Michael's idea to make 'good/bad' more intelligent does have
certain attractiveness ($gname/272867), and makes some of the work
on this topic a moot point.

* ad/bisect-terms:
bisect: allow setting any user-specified in 'git bisect start'
bisect: add 'git bisect terms' to view the current terms
bisect: add the terms old/new
bisect: sanity check on terms

Merge branch 'jc/rerere'Junio C Hamano Mon, 5 Oct 2015 19:30:04 +0000 (12:30 -0700)

Merge branch 'jc/rerere'

Code clean-up and minor fixes.

* jc/rerere: (21 commits)
rerere: un-nest merge() further
rerere: use "struct rerere_id" instead of "char *" for conflict ID
rerere: call conflict-ids IDs
rerere: further clarify do_rerere_one_path()
rerere: further de-dent do_plain_rerere()
rerere: refactor "replay" part of do_plain_rerere()
rerere: explain the remainder
rerere: explain "rerere forget" codepath
rerere: explain the primary codepath
rerere: explain MERGE_RR management helpers
rerere: fix benign off-by-one non-bug and clarify code
rerere: explain the rerere I/O abstraction
rerere: do not leak mmfile[] for a path with multiple stage #1 entries
rerere: stop looping unnecessarily
rerere: drop want_sp parameter from is_cmarker()
rerere: report autoupdated paths only after actually updating them
rerere: write out each record of MERGE_RR in one go
rerere: lift PATH_MAX limitation
rerere: plug conflict ID leaks
rerere: handle conflicts with multiple stage #1 entries
...

Merge branch 'kn/for-each-tag-branch'Junio C Hamano Mon, 5 Oct 2015 19:30:02 +0000 (12:30 -0700)

Merge branch 'kn/for-each-tag-branch'

Some features from "git tag -l" and "git branch -l" have been made
available to "git for-each-ref" so that eventually the unified
implementation can be shared across all three, in a follow-up
series or two.

* kn/for-each-tag-branch:
for-each-ref: add '--contains' option
ref-filter: implement '--contains' option
parse-options.h: add macros for '--contains' option
parse-option: rename parse_opt_with_commit()
for-each-ref: add '--merged' and '--no-merged' options
ref-filter: implement '--merged' and '--no-merged' options
ref-filter: add parse_opt_merge_filter()
for-each-ref: add '--points-at' option
ref-filter: implement '--points-at' option
tag: libify parse_opt_points_at()
t6302: for-each-ref tests for ref-filter APIs

merge: grammofix in please-commit-before-merge messageAlex Henrie Fri, 2 Oct 2015 04:25:33 +0000 (22:25 -0600)

merge: grammofix in please-commit-before-merge message

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

Git 2.6.1 v2.6.1Junio C Hamano Tue, 29 Sep 2015 02:19:27 +0000 (19:19 -0700)

Git 2.6.1

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

Sync with v2.5.4Junio C Hamano Tue, 29 Sep 2015 02:16:54 +0000 (19:16 -0700)

Sync with v2.5.4

Git 2.5.4 v2.5.4Junio C Hamano Mon, 28 Sep 2015 22:26:49 +0000 (15:26 -0700)

Git 2.5.4

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

Sync with 2.4.10Junio C Hamano Mon, 28 Sep 2015 22:33:56 +0000 (15:33 -0700)

Sync with 2.4.10

Git 2.4.10 v2.4.10Junio C Hamano Mon, 28 Sep 2015 22:29:54 +0000 (15:29 -0700)

Git 2.4.10

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

Sync with 2.3.10Junio C Hamano Mon, 28 Sep 2015 22:28:26 +0000 (15:28 -0700)

Sync with 2.3.10

Git 2.3.10 v2.3.10Junio C Hamano Mon, 28 Sep 2015 22:00:37 +0000 (15:00 -0700)

Git 2.3.10

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

Merge branch 'jk/xdiff-memory-limits' into maint-2.3Junio C Hamano Mon, 28 Sep 2015 21:59:28 +0000 (14:59 -0700)

Merge branch 'jk/xdiff-memory-limits' into maint-2.3

merge-file: enforce MAX_XDIFF_SIZE on incoming filesJeff King Fri, 25 Sep 2015 21:58:09 +0000 (17:58 -0400)

merge-file: enforce MAX_XDIFF_SIZE on incoming files

The previous commit enforces MAX_XDIFF_SIZE at the
interfaces to xdiff: xdi_diff (which calls xdl_diff) and
ll_xdl_merge (which calls xdl_merge).

But we have another direct call to xdl_merge in
merge-file.c. If it were written today, this probably would
just use the ll_merge machinery. But it predates that code,
and uses slightly different options to xdl_merge (e.g.,
ZEALOUS_ALNUM).

We could try to abstract out an xdi_merge to match the
existing xdi_diff, but even that is difficult. Rather than
simply report error, we try to treat large files as binary,
and that distinction would happen outside of xdi_merge.

The simplest fix is to just replicate the MAX_XDIFF_SIZE
check in merge-file.c.

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

xdiff: reject files larger than ~1GBJeff King Thu, 24 Sep 2015 23:12:45 +0000 (19:12 -0400)

xdiff: reject files larger than ~1GB

The xdiff code is not prepared to handle extremely large
files. It uses "int" in many places, which can overflow if
we have a very large number of lines or even bytes in our
input files. This can cause us to produce incorrect diffs,
with no indication that the output is wrong. Or worse, we
may even underallocate a buffer whose size is the result of
an overflowing addition.

We're much better off to tell the user that we cannot diff
or merge such a large file. This patch covers both cases,
but in slightly different ways:

1. For merging, we notice the large file and cleanly fall
back to a binary merge (which is effectively "we cannot
merge this").

2. For diffing, we make the binary/text distinction much
earlier, and in many different places. For this case,
we'll use the xdi_diff as our choke point, and reject
any diff there before it hits the xdiff code.

This means in most cases we'll die() immediately after.
That's not ideal, but in practice we shouldn't
generally hit this code path unless the user is trying
to do something tricky. We already consider files
larger than core.bigfilethreshold to be binary, so this
code would only kick in when that is circumvented
(either by bumping that value, or by using a
.gitattribute to mark a file as diffable).

In other words, we can avoid being "nice" here, because
there is already nice code that tries to do the right
thing. We are adding the suspenders to the nice code's
belt, so notice when it has been worked around (both to
protect the user from malicious inputs, and because it
is better to die() than generate bogus output).

The maximum size was chosen after experimenting with feeding
large files to the xdiff code. It's just under a gigabyte,
which leaves room for two obvious cases:

- a diff3 merge conflict result on files of maximum size X
could be 3*X plus the size of the markers, which would
still be only about 3G, which fits in a 32-bit int.

- some of the diff code allocates arrays of one int per
record. Even if each file consists only of blank lines,
then a file smaller than 1G will have fewer than 1G
records, and therefore the int array will fit in 4G.

Since the limit is arbitrary anyway, I chose to go under a
gigabyte, to leave a safety margin (e.g., we would not want
to overflow by allocating "(records + 1) * sizeof(int)" or
similar.

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

react to errors in xdi_diffJeff King Thu, 24 Sep 2015 23:12:23 +0000 (19:12 -0400)

react to errors in xdi_diff

When we call into xdiff to perform a diff, we generally lose
the return code completely. Typically by ignoring the return
of our xdi_diff wrapper, but sometimes we even propagate
that return value up and then ignore it later. This can
lead to us silently producing incorrect diffs (e.g., "git
log" might produce no output at all, not even a diff header,
for a content-level diff).

In practice this does not happen very often, because the
typical reason for xdiff to report failure is that it
malloc() failed (it uses straight malloc, and not our
xmalloc wrapper). But it could also happen when xdiff
triggers one our callbacks, which returns an error (e.g.,
outf() in builtin/rerere.c tries to report a write failure
in this way). And the next patch also plans to add more
failure modes.

Let's notice an error return from xdiff and react
appropriately. In most of the diff.c code, we can simply
die(), which matches the surrounding code (e.g., that is
what we do if we fail to load a file for diffing in the
first place). This is not that elegant, but we are probably
better off dying to let the user know there was a problem,
rather than simply generating bogus output.

We could also just die() directly in xdi_diff, but the
callers typically have a bit more context, and can provide a
better message (and if we do later decide to pass errors up,
we're one step closer to doing so).

There is one interesting case, which is in diff_grep(). Here
if we cannot generate the diff, there is nothing to match,
and we silently return "no hits". This is actually what the
existing code does already, but we make it a little more
explicit.

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

Merge branch 'jk/transfer-limit-redirection' into maint-2.3Junio C Hamano Mon, 28 Sep 2015 21:46:05 +0000 (14:46 -0700)

Merge branch 'jk/transfer-limit-redirection' into maint-2.3

Merge branch 'jk/transfer-limit-protocol' into maint-2.3Junio C Hamano Mon, 28 Sep 2015 21:33:27 +0000 (14:33 -0700)

Merge branch 'jk/transfer-limit-protocol' into maint-2.3

Git 2.6 v2.6.0Junio C Hamano Mon, 28 Sep 2015 20:18:01 +0000 (13:18 -0700)

Git 2.6

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

ls-remote.txt: delete unsupported optionNguyễn Thái Ngọc Duy Mon, 28 Sep 2015 12:30:17 +0000 (19:30 +0700)

ls-remote.txt: delete unsupported option

-u <exec> has never been supported, but it was mentioned since
0a2bb55 (git ls-remote: make usage string match manpage -
2008-11-11). Nobody has complained about it for seven years, it's
probably safe to say nobody cares. So let's remove "-u" in documents
instead of adding code to support it.

While at there, fix --upload-pack syntax too.

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

setup: fix "inside work tree" detection on case-insensi... Johannes Schindelin Mon, 28 Sep 2015 16:12:18 +0000 (18:12 +0200)

setup: fix "inside work tree" detection on case-insensitive filesystems

Git has a config variable to indicate that it is operating on a file
system that is case-insensitive: core.ignoreCase. But the
`dir_inside_of()` function did not respect that. As a result, if Git's
idea of the current working directory disagreed in its upper/lower case
with the `GIT_WORK_TREE` variable (e.g. `C:\test` vs `c:\test`) the
user would be greeted by the error message

fatal: git-am cannot be used without a working tree.

when trying to run a rebase.

This fixes https://github.com/git-for-windows/git/issues/402 (reported by
Daniel Harding).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: limit redirection depthBlake Burkhart Tue, 22 Sep 2015 22:06:20 +0000 (18:06 -0400)

http: limit redirection depth

By default, libcurl will follow circular http redirects
forever. Let's put a cap on this so that somebody who can
trigger an automated fetch of an arbitrary repository (e.g.,
for CI) cannot convince git to loop infinitely.

The value chosen is 20, which is the same default that
Firefox uses.

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

http: limit redirection to protocol-whitelistBlake Burkhart Tue, 22 Sep 2015 22:06:04 +0000 (18:06 -0400)

http: limit redirection to protocol-whitelist

Previously, libcurl would follow redirection to any protocol
it was compiled for support with. This is desirable to allow
redirection from HTTP to HTTPS. However, it would even
successfully allow redirection from HTTP to SFTP, a protocol
that git does not otherwise support at all. Furthermore
git's new protocol-whitelisting could be bypassed by
following a redirect within the remote helper, as it was
only enforced at transport selection time.

This patch limits redirects within libcurl to HTTP, HTTPS,
FTP and FTPS. If there is a protocol-whitelist present, this
list is limited to those also allowed by the whitelist. As
redirection happens from within libcurl, it is impossible
for an HTTP redirect to a protocol implemented within
another remote helper.

When the curl version git was compiled with is too old to
support restrictions on protocol redirection, we warn the
user if GIT_ALLOW_PROTOCOL restrictions were requested. This
is a little inaccurate, as even without that variable in the
environment, we would still restrict SFTP, etc, and we do
not warn in that case. But anything else means we would
literally warn every time git accesses an http remote.

This commit includes a test, but it is not as robust as we
would hope. It redirects an http request to ftp, and checks
that curl complained about the protocol, which means that we
are relying on curl's specific error message to know what
happened. Ideally we would redirect to a working ftp server
and confirm that we can clone without protocol restrictions,
and not with them. But we do not have a portable way of
providing an ftp server, nor any other protocol that curl
supports (https is the closest, but we would have to deal
with certificates).

[jk: added test and version warning]

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

transport: refactor protocol whitelist codeJeff King Tue, 22 Sep 2015 22:03:49 +0000 (18:03 -0400)

transport: refactor protocol whitelist code

The current callers only want to die when their transport is
prohibited. But future callers want to query the mechanism
without dying.

Let's break out a few query functions, and also save the
results in a static list so we don't have to re-parse for
each query.

Based-on-a-patch-by: Blake Burkhart <bburky@bburky.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: fix section header mark-upJohn Keeping Fri, 25 Sep 2015 12:59:35 +0000 (13:59 +0100)

Documentation: fix section header mark-up

Asciidoctor is stricter than AsciiDoc when deciding if underlining
is a section title or the start of preformatted text. Make the
length of the underlining match the text to ensure that it renders
correctly in all implementations.

Signed-off-by: John Keeping <john@keeping.me.uk>
[jc: squashed in git-bisect one noticed by Michael J Gruber]
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/perf: make runner work even if Git is not installedStephan Beyer Fri, 25 Sep 2015 00:31:37 +0000 (02:31 +0200)

t/perf: make runner work even if Git is not installed

aggregate.perl did not work when Git.pm is not installed to a directory
contained in the default Perl library path list or PERLLIB.
This commit prepends the Perl library path of the current Git source
tree to enable this.

Note that this commit adds a hard-coded relative path

use lib '../../perl/blib/lib';

instead of the flexible environment-based variant

use lib (split(/:/, $ENV{GITPERLLIB}));

which is used in tests written in Perl.
The hard-coded variant is used because the whole performance test
framework does it that way (and GITPERLLIB is not set there).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: fix typo in result string of prot_name()Tobias Klauser Thu, 24 Sep 2015 12:44:49 +0000 (14:44 +0200)

connect: fix typo in result string of prot_name()

Replace 'unkown' with 'unknown'.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: add '--points-at' optionKarthik Nayak Wed, 23 Sep 2015 18:11:13 +0000 (23:41 +0530)

branch: add '--points-at' option

Add the '--points-at' option provided by 'ref-filter'. The option lets
the user to list only branches which points at the given object.

Add documentation and tests for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch.c: use 'ref-filter' APIsKarthik Nayak Wed, 23 Sep 2015 18:11:12 +0000 (23:41 +0530)

branch.c: use 'ref-filter' APIs

Make 'branch.c' use 'ref-filter' APIs for iterating through refs
sorting. This removes most of the code used in 'branch.c' replacing it
with calls to the 'ref-filter' library.

Make 'branch.c' use the 'filter_refs()' function provided by 'ref-filter'
to filter out tags based on the options set.

We provide a sorting option provided for 'branch.c' by using the
sorting options provided by 'ref-filter'. Also by default, we sort by
'refname'. Since 'HEAD' is alphabatically before 'refs/...' we end up
with an array consisting of the 'HEAD' ref then the local branches and
finally the remote-tracking branches.

Also remove the 'ignore' variable from ref_array_item as it was
previously used for the '--merged' option and now that is handled by
ref-filter.

Modify some of the tests in t1430 to check the stderr for a warning
regarding the broken ref. This is done as ref-filter throws a warning
for broken refs rather than directly printing them.

Add tests and documentation for the same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch.c: use 'ref-filter' data structuresKarthik Nayak Wed, 23 Sep 2015 18:11:11 +0000 (23:41 +0530)

branch.c: use 'ref-filter' data structures

Make 'branch.c' use 'ref-filter' data structures and make changes to
support the new data structures. This is a part of the process of
porting 'branch.c' to use 'ref-filter' APIs.

This is a temporary step before porting 'branch.c' to use 'ref-filter'
completely. As this is a temporary step, most of the code introduced
here will be removed when 'branch.c' is ported over to use
'ref-filter' APIs.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: drop non-commit error reportingKarthik Nayak Thu, 24 Sep 2015 18:09:08 +0000 (23:39 +0530)

branch: drop non-commit error reporting

Remove the error "branch '%s' does not point at a commit" in
append_ref(), which reports branch refs which do not point to
commits. Also remove the error "some refs could not be read" in
print_ref_list() which is triggered as a consequence of the first
error.

The purpose of these codepaths is not to diagnose and report a
repository corruption. If we care about such a corruption, we
should report it from fsck instead, which we already do.

This also helps in a smooth port of branch.c to use ref-filter APIs
over the following patches. On the other hand, ref-filter ignores refs
which do not point at commits silently.

Based-on-patch-by: Jeff King <peff@peff.net>
Helped-by: Junio C Hamano <gitster@pobox.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5561: get rid of racy appending to logfileStephan Beyer Thu, 24 Sep 2015 18:12:22 +0000 (20:12 +0200)

t5561: get rid of racy appending to logfile

The definition of log_div() appended information to the web server's
logfile to make the test more readable. However, log_div() was called
right after a request is served (which is done by git-http-backend);
the web server waits for the git-http-backend process to exit before
it writes to the log file. When the duration between serving a request
and exiting was long, the log_div() output was written before the last
request's log, and the test failed. (This duration could become
especially long for PROFILE=GEN builds.)

To get rid of this behavior, we should not change the logfile at all.
This commit removes log_div() and its calls. The additional information
is kept in the test (for readability reasons) but filtered out before
comparing it to the actual logfile.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: exit with non-zero when problems are foundJunio C Hamano Wed, 23 Sep 2015 20:46:39 +0000 (13:46 -0700)

fsck: exit with non-zero when problems are found

After finding some problems (e.g. a ref refs/heads/X points at an
object that is not a commit) and issuing an error message, the
program failed to signal the fact that it found an error by a
non-zero exit status.

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

branch: move 'current' check down to the presentation... Karthik Nayak Wed, 23 Sep 2015 18:11:09 +0000 (23:41 +0530)

branch: move 'current' check down to the presentation layer

We check if given ref is the current branch in print_ref_list(). Move
this check to print_ref_item() where it is checked right before
printing. This enables a smooth transition to using ref-filter APIs,
as we can later replace the current check while printing to just check
for FILTER_REFS_DETACHED instead.

Based-on-patch-by: Jeff King <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: roll show_detached HEAD into regular ref_listKarthik Nayak Wed, 23 Sep 2015 18:11:08 +0000 (23:41 +0530)

branch: roll show_detached HEAD into regular ref_list

Remove show_detached() and make detached HEAD to be rolled into
regular ref_list by adding REF_DETACHED_HEAD as a kind of branch and
supporting the same in append_ref(). This eliminates the need for an
extra function and helps in easier porting of branch.c to use
ref-filter APIs.

Before show_detached() used to check if the HEAD branch satisfies the
'--contains' option, now that is taken care by append_ref().

Based-on-patch-by: Jeff King <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: bump get_head_description() to the topKarthik Nayak Wed, 23 Sep 2015 18:11:07 +0000 (23:41 +0530)

branch: bump get_head_description() to the top

This is a preperatory patch for 'roll show_detached HEAD into regular
ref_list'. This patch moves get_head_description() to the top so that
it can be used in print_ref_item().

Based-on-patch-by: Jeff King <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: refactor width computationKarthik Nayak Wed, 23 Sep 2015 18:11:06 +0000 (23:41 +0530)

branch: refactor width computation

Remove unnecessary variables from ref_list and ref_item which were
used for width computation. This is to make ref_item similar to
ref-filter's ref_array_item. This will ensure a smooth port of
branch.c to use ref-filter APIs in further patches.

Previously the maxwidth was computed when inserting the refs into the
ref_list. Now, we obtain the entire ref_list and then compute
maxwidth.

Based-on-patch-by: Jeff King <peff@peff.net>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: allow only certain protocols for submodule... Jeff King Wed, 16 Sep 2015 17:13:12 +0000 (13:13 -0400)

submodule: allow only certain protocols for submodule fetches

Some protocols (like git-remote-ext) can execute arbitrary
code found in the URL. The URLs that submodules use may come
from arbitrary sources (e.g., .gitmodules files in a remote
repository). Let's restrict submodules to fetching from a
known-good subset of protocols.

Note that we apply this restriction to all submodule
commands, whether the URL comes from .gitmodules or not.
This is more restrictive than we need to be; for example, in
the tests we run:

git submodule add ext::...

which should be trusted, as the URL comes directly from the
command line provided by the user. But doing it this way is
simpler, and makes it much less likely that we would miss a
case. And since such protocols should be an exception
(especially because nobody who clones from them will be able
to update the submodules!), it's not likely to inconvenience
anyone in practice.

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

transport: add a protocol-whitelist environment variableJeff King Wed, 16 Sep 2015 17:12:52 +0000 (13:12 -0400)

transport: add a protocol-whitelist environment variable

If we are cloning an untrusted remote repository into a
sandbox, we may also want to fetch remote submodules in
order to get the complete view as intended by the other
side. However, that opens us up to attacks where a malicious
user gets us to clone something they would not otherwise
have access to (this is not necessarily a problem by itself,
but we may then act on the cloned contents in a way that
exposes them to the attacker).

Ideally such a setup would sandbox git entirely away from
high-value items, but this is not always practical or easy
to set up (e.g., OS network controls may block multiple
protocols, and we would want to enable some but not others).

We can help this case by providing a way to restrict
particular protocols. We use a whitelist in the environment.
This is more annoying to set up than a blacklist, but
defaults to safety if the set of protocols git supports
grows). If no whitelist is specified, we continue to default
to allowing all protocols (this is an "unsafe" default, but
since the minority of users will want this sandboxing
effect, it is the only sensible one).

A note on the tests: ideally these would all be in a single
test file, but the git-daemon and httpd test infrastructure
is an all-or-nothing proposition rather than a test-by-test
prerequisite. By putting them all together, we would be
unable to test the file-local code on machines without
apache.

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

notes: correct documentation of DWIMery for notes refer... Jacob Keller Tue, 22 Sep 2015 22:15:03 +0000 (15:15 -0700)

notes: correct documentation of DWIMery for notes references

expand_notes_ref is used by --ref from git-notes(1) and --notes from the
git log to find the full refname of a notes reference. Previously the
documentation of these options was not clear about what sorts of
expansions would be performed. Fix the documentation to clearly and
accurately describe the behavior of the expansions.

Add a test for this expansion when using git notes get-ref in order to
prevent future patches from changing this behavior.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: handle "Translation of file content failed"Lars Schneider Mon, 21 Sep 2015 10:01:41 +0000 (12:01 +0200)

git-p4: handle "Translation of file content failed"

A P4 repository can get into a state where it contains a file with
type UTF-16 that does not contain a valid UTF-16 BOM. If git-p4
attempts to retrieve the file then the process crashes with a
"Translation of file content failed" error.

More info here: http://answers.perforce.com/articles/KB/3117

Fix this by detecting this error and retrieving the file as binary
instead. The result in Git is the same.

Known issue: This works only if git-p4 is executed in verbose mode.
In normal mode no exceptions are thrown and git-p4 just exits.

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

git-p4: add test case for "Translation of file content... Lars Schneider Mon, 21 Sep 2015 10:01:40 +0000 (12:01 +0200)

git-p4: add test case for "Translation of file content failed" error

A P4 repository can get into a state where it contains a file with
type UTF-16 that does not contain a valid UTF-16 BOM. If git-p4
attempts to retrieve the file then the process crashes with a
"Translation of file content failed" error.

More info here: http://answers.perforce.com/articles/KB/3117

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

filter-branch: make report-progress more readableJunio C Hamano Mon, 21 Sep 2015 22:16:20 +0000 (15:16 -0700)

filter-branch: make report-progress more readable

The name of some variables that are used very locally in this
function were overly long; they were making the lines harder to read
and the longer names didn't add much more information.

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

filter-branch: add passed/remaining seconds on progressGabor Bernat Mon, 7 Sep 2015 13:52:08 +0000 (15:52 +0200)

filter-branch: add passed/remaining seconds on progress

adds seconds progress and estimated seconds time if getting the current
timestamp is supported by the date +%s command

Signed-off-by: Gabor Bernat <gabor.bernat@gravityrd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.6-rc3 v2.6.0-rc3Junio C Hamano Mon, 21 Sep 2015 20:26:13 +0000 (13:26 -0700)

Git 2.6-rc3

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

git-p4: use replacement character for non UTF-8 charact... Lars Schneider Mon, 21 Sep 2015 08:49:18 +0000 (10:49 +0200)

git-p4: use replacement character for non UTF-8 characters in paths

If non UTF-8 characters are detected in paths then replace them with
a placeholder instead of throwing a UnicodeDecodeError
exception. This restores the original (implicit) implementation that
was broken in 00a9403.

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

Merge branch 'rj/mailmap-ramsay'Junio C Hamano Mon, 21 Sep 2015 19:58:35 +0000 (12:58 -0700)

Merge branch 'rj/mailmap-ramsay'

* rj/mailmap-ramsay:
mailmap: update my entry with new email address

Merge branch 'bn/send-email-smtp-auth-error-message... Junio C Hamano Mon, 21 Sep 2015 19:27:15 +0000 (12:27 -0700)

Merge branch 'bn/send-email-smtp-auth-error-message-fix'

Fix a minor regression brought in to "git send-email" by a recent
addition of the "--smtp-auth" option.

* bn/send-email-smtp-auth-error-message-fix:
send-email: fix uninitialized var warning for $smtp_auth

dir.c: don't exclude whole dir prematurely if neg patte... Nguyễn Thái Ngọc Duy Mon, 21 Sep 2015 09:56:15 +0000 (16:56 +0700)

dir.c: don't exclude whole dir prematurely if neg pattern may match

If there is a pattern "!foo/bar", this patch makes it not exclude "foo"
right away. This gives us a chance to examine "foo" and re-include
"foo/bar".

In order for it to detect that the directory under examination should
not be excluded right away, in other words it is a parent directory of a
negative pattern, the "directory path" of the negative pattern must be
literal. Patterns like "!f?o/bar" can't stop "foo" from being excluded.

Basename matching (i.e. "no slashes in the pattern") or must-be-dir
matching (i.e. "trailing slash in the pattern") does not work well with
this. For example, if we descend in "foo" and are examining "foo/abc",
current code for "foo/" pattern will check if path "foo/abc", not "foo",
is a directory. The same problem with basename matching. These may need
big code reorg to make it work.

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

dir.c: make last_exclude_matching_from_list() run til... Nguyễn Thái Ngọc Duy Mon, 21 Sep 2015 09:56:14 +0000 (16:56 +0700)

dir.c: make last_exclude_matching_from_list() run til the end

The next patch adds some post processing to the result value before it's
returned to the caller. Keep all branches reach the end of the function,
so we can do it all in one place.

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

Merge tag 'l10n-2.6.0-rnd2+de' of git://github.com... Junio C Hamano Mon, 21 Sep 2015 17:54:07 +0000 (10:54 -0700)

Merge tag 'l10n-2.6.0-rnd2+de' of git://github.com/git-l10n/git-po

l10n-2.6.0-rnd2 plus de

* tag 'l10n-2.6.0-rnd2+de' of git://github.com/git-l10n/git-po: (25 commits)
l10n: de.po: better language for one string
l10n: de.po: translate 2 messages
l10n: Update and review Vietnamese translation (2440t)
l10n: fr.po v2.6.0 round 2 (2440t)
l10n: zh_CN: for git v2.6.0 l10n round 2
l10n: ca.po: update translation
l10n: git.pot: v2.6.0 round 2 (3 improvements)
l10n: de.po: translate 123 new messages
l10n: fr.po v2.6.0 round 1 (2441t)
l10n: sv.po: Update Swedish translation (2441t0f0u)
l10n: zh_CN: for git v2.6.0 l10n round 1
l10n: Updated Vietnamese translation (2441t)
l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)
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
...

send-email: fix uninitialized var warning for $smtp_authBrian Norris Fri, 18 Sep 2015 22:12:50 +0000 (15:12 -0700)

send-email: fix uninitialized var warning for $smtp_auth

On the latest version of git-send-email, I see this error just before
running SMTP auth (I didn't provide any --smtp-auth= parameter):

Use of uninitialized value $smtp_auth in pattern match (m//) at \
/home/briannorris/git/git/git-send-email.perl line 1139.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: explain optional arguments betterMatthieu Moy Sat, 19 Sep 2015 07:47:50 +0000 (09:47 +0200)

Documentation: explain optional arguments better

Improve the documentation of commands taking optional arguments in two
ways:

* Documents the behavior of '-O' (for grep) and '-S' (for commands
creating commits) when used without the optional argument.

* Document the syntax of these options.

For the second point, the behavior is documented in gitcli(7), but it is
easy for users to miss, and hard for the same user to understand why e.g.
"git status -u no" does not work.

Document this explicitly in the documentation of each short option having
an optional argument: they are the most error prone since there is no '='
sign between the option and its argument.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/grep: fix documentation of -OMatthieu Moy Sat, 19 Sep 2015 07:47:49 +0000 (09:47 +0200)

Documentation/grep: fix documentation of -O

Since the argument of -O, --open-file-in-pager is optional, it must be
stuck to the command. Reflect this in the documentation.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: use 'keyid' consistently, not 'key-id'Matthieu Moy Sat, 19 Sep 2015 07:47:48 +0000 (09:47 +0200)

Documentation: use 'keyid' consistently, not 'key-id'

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gc: save log from daemonized gc --auto and print it... Nguyễn Thái Ngọc Duy Sat, 19 Sep 2015 05:13:23 +0000 (12:13 +0700)

gc: save log from daemonized gc --auto and print it next time

While commit 9f673f9 (gc: config option for running --auto in
background - 2014-02-08) helps reduce some complaints about 'gc
--auto' hogging the terminal, it creates another set of problems.

The latest in this set is, as the result of daemonizing, stderr is
closed and all warnings are lost. This warning at the end of cmd_gc()
is particularly important because it tells the user how to avoid "gc
--auto" running repeatedly. Because stderr is closed, the user does
not know, naturally they complain about 'gc --auto' wasting CPU.

Daemonized gc now saves stderr to $GIT_DIR/gc.log. Following gc --auto
will not run and gc.log printed out until the user removes gc.log.

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

l10n: de.po: better language for one stringPhillip Sz Thu, 17 Sep 2015 15:50:32 +0000 (17:50 +0200)

l10n: de.po: better language for one string

Just one string I think we could translate better.

Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

l10n: de.po: translate 2 messagesRalf Thielow Wed, 16 Sep 2015 17:28:07 +0000 (19:28 +0200)

l10n: de.po: translate 2 messages

Translate 2 messages came from git.pot update in e447091
(l10n: git.pot: v2.6.0 round 2 (3 improvements)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>

l10n: Update and review Vietnamese translation (2440t)Tran Ngoc Quan Tue, 15 Sep 2015 00:17:53 +0000 (07:17 +0700)

l10n: Update and review Vietnamese translation (2440t)

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

l10n: fr.po v2.6.0 round 2 (2440t)Jean-Noel Avila Tue, 15 Sep 2015 18:22:52 +0000 (20:22 +0200)

l10n: fr.po v2.6.0 round 2 (2440t)

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

l10n: zh_CN: for git v2.6.0 l10n round 2Jiang Xin Tue, 15 Sep 2015 13:51:26 +0000 (21:51 +0800)

l10n: zh_CN: for git v2.6.0 l10n round 2

Update 2 translations (2440t0f0u) for git v2.6.0-rc2.

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