gitweb.git
doc: do not use `rm .git/index` when normalizing line... Andreas Heiduk Wed, 14 Jun 2017 06:51:39 +0000 (08:51 +0200)

doc: do not use `rm .git/index` when normalizing line endings

When illustrating how to normalize the line endings, the
documentation in gitattributes tells the user to `rm .git/index`.

This is incorrect for two reasons:

- Users shouldn't be instructed to mess around with the internal
implementation of Git using raw file system tools like `rm`.

- Within a submodule or an additional working tree `.git` is just a
file containing a `gitdir: <path>` pointer into the real `.git`
directory. Therefore `rm .git/index` does not work.

The purpose of the `rm .git/index` instruction is to remove all entries
from the index without touching the working tree. The way to do this
with Git is to use `read-tree --empty`.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t: move "git add submodule" into test blocksJeff King Wed, 14 Jun 2017 10:58:25 +0000 (06:58 -0400)

t: move "git add submodule" into test blocks

Some submodule tests do some setup outside of a test_expect
block. This is bad because we won't actually check the
outcome of those commands. But it's doubly so because "git
add submodule" now produces a warning to stderr, which is
not suppressed by the test scripts in non-verbose mode.

This patch does the minimal to fix the annoying warnings.
All three of these scripts could use more cleanup of related
setup.

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

add: warn when adding an embedded repositoryJeff King Wed, 14 Jun 2017 10:58:22 +0000 (06:58 -0400)

add: warn when adding an embedded repository

It's an easy mistake to add a repository inside another
repository, like:

git clone $url
git add .

The resulting entry is a gitlink, but there's no matching
.gitmodules entry. Trying to use "submodule init" (or clone
with --recursive) doesn't do anything useful. Prior to
v2.13, such an entry caused git-submodule to barf entirely.
In v2.13, the entry is considered "inactive" and quietly
ignored. Either way, no clone of your repository can do
anything useful with the gitlink without the user manually
adding the submodule config.

In most cases, the user probably meant to either add a real
submodule, or they forgot to put the embedded repository in
their .gitignore file.

Let's issue a warning when we see this case. There are a few
things to note:

- the warning will go in the git-add porcelain; anybody
wanting to do low-level manipulation of the index is
welcome to create whatever funny states they want.

- we detect the case by looking for a newly added gitlink;
updates via "git add submodule" are perfectly reasonable,
and this avoids us having to investigate .gitmodules
entirely

- there's a command-line option to suppress the warning.
This is needed for git-submodule itself (which adds the
entry before adding any submodule config), but also
provides a mechanism for other scripts doing
submodule-like things.

We could make this a hard error instead of a warning.
However, we do add lots of sub-repos in our test suite. It's
not _wrong_ to do so. It just creates a state where users
may be surprised. Pointing them in the right direction with
a gentle hint is probably the best option.

There is a config knob that can disable the (long) hint. But
I intentionally omitted a config knob to disable the warning
entirely. Whether the warning is sensible or not is
generally about context, not about the user's preferences.
If there's a tool or workflow that adds gitlinks without
matching .gitmodules, it should probably be taught about the
new command-line option, rather than blanket-disabling the
warning.

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

git-svn: document special options for commit-diffAndreas Heiduk Wed, 14 Jun 2017 09:31:38 +0000 (11:31 +0200)

git-svn: document special options for commit-diff

Some options specific for `git svn commit-diff` where not documented
so far.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>

Sync with maintJunio C Hamano Tue, 13 Jun 2017 20:52:53 +0000 (13:52 -0700)

Sync with maint

Eighth batch for 2.14Junio C Hamano Tue, 13 Jun 2017 20:52:29 +0000 (13:52 -0700)

Eighth batch for 2.14

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

Merge branch 'jk/pack-idx-corruption-safety'Junio C Hamano Tue, 13 Jun 2017 20:47:10 +0000 (13:47 -0700)

Merge branch 'jk/pack-idx-corruption-safety'

A flaky test has been corrected.

* jk/pack-idx-corruption-safety:
t5313: make extended-table test more deterministic

Merge branch 'nd/fopen-errors'Junio C Hamano Tue, 13 Jun 2017 20:47:09 +0000 (13:47 -0700)

Merge branch 'nd/fopen-errors'

We often try to open a file for reading whose existence is
optional, and silently ignore errors from open/fopen; report such
errors if they are not due to missing files.

* nd/fopen-errors:
mingw_fopen: report ENOENT for invalid file names
mingw: verify that paths are not mistaken for remote nicknames
log: fix memory leak in open_next_file()
rerere.c: move error_errno() closer to the source system call
print errno when reporting a system call error
wrapper.c: make warn_on_inaccessible() static
wrapper.c: add and use fopen_or_warn()
wrapper.c: add and use warn_on_fopen_errors()
config.mak.uname: set FREAD_READS_DIRECTORIES for Darwin, too
config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and FreeBSD
clone: use xfopen() instead of fopen()
use xfopen() in more places
git_fopen: fix a sparse 'not declared' warning

Merge branch 'rf/completion'Junio C Hamano Tue, 13 Jun 2017 20:47:09 +0000 (13:47 -0700)

Merge branch 'rf/completion'

Completion updates.

* rf/completion:
completion: add git config credentialCache.ignoreSIGHUP
completion: add git config credential completions
completion: add git config advice completions
completion: add git config am.threeWay completion
completion: add git config core completions
completion: add git config gc completions

Merge branch 'jc/diff-tree-stale-comment'Junio C Hamano Tue, 13 Jun 2017 20:47:08 +0000 (13:47 -0700)

Merge branch 'jc/diff-tree-stale-comment'

Comment fix.

* jc/diff-tree-stale-comment:
diff-tree: update stale in-code comments

Merge branch 'sb/submodule-blanket-recursive'Junio C Hamano Tue, 13 Jun 2017 20:47:07 +0000 (13:47 -0700)

Merge branch 'sb/submodule-blanket-recursive'

Many commands learned to pay attention to submodule.recurse
configuration.

* sb/submodule-blanket-recursive:
builtin/fetch.c: respect 'submodule.recurse' option
builtin/push.c: respect 'submodule.recurse' option
builtin/grep.c: respect 'submodule.recurse' option
Introduce 'submodule.recurse' option for worktree manipulators
submodule loading: separate code path for .gitmodules and config overlay
reset/checkout/read-tree: unify config callback for submodule recursion
submodule test invocation: only pass additional arguments
submodule recursing: do not write a config variable twice

Merge branch 'jc/noent-notdir'Junio C Hamano Tue, 13 Jun 2017 20:47:06 +0000 (13:47 -0700)

Merge branch 'jc/noent-notdir'

Our code often opens a path to an optional file, to work on its
contents when we can successfully open it. We can ignore a failure
to open if such an optional file does not exist, but we do want to
report a failure in opening for other reasons (e.g. we got an I/O
error, or the file is there, but we lack the permission to open).

The exact errors we need to ignore are ENOENT (obviously) and
ENOTDIR (less obvious). Instead of repeating comparison of errno
with these two constants, introduce a helper function to do so.

* jc/noent-notdir:
treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked
compat-util: is_missing_file_error()

Prepare for 2.13.2Junio C Hamano Tue, 13 Jun 2017 20:30:16 +0000 (13:30 -0700)

Prepare for 2.13.2

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

Merge branch 'ad/pull-remote-doc' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:06 +0000 (13:27 -0700)

Merge branch 'ad/pull-remote-doc' into maint

Docfix.

* ad/pull-remote-doc:
docs: fix formatting and grammar

Merge branch 'jk/drop-free-refspecs' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:06 +0000 (13:27 -0700)

Merge branch 'jk/drop-free-refspecs' into maint

Code clean-up.

* jk/drop-free-refspecs:
remote: drop free_refspecs() function

Merge branch 'jk/connect-symref-info-leak-fix' into... Junio C Hamano Tue, 13 Jun 2017 20:27:05 +0000 (13:27 -0700)

Merge branch 'jk/connect-symref-info-leak-fix' into maint

Leakfix.

* jk/connect-symref-info-leak-fix:
connect.c: fix leak in parse_one_symref_info()

Merge branch 'rf/completion-config-commit' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:05 +0000 (13:27 -0700)

Merge branch 'rf/completion-config-commit' into maint

Completion update.

* rf/completion-config-commit:
completion: add completions for git config commit

Merge branch 'ab/t3070-test-dedup' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:04 +0000 (13:27 -0700)

Merge branch 'ab/t3070-test-dedup' into maint

Test cleanup.

* ab/t3070-test-dedup:
wildmatch test: remove redundant duplicate test

Merge branch 'jh/memihash-opt' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:03 +0000 (13:27 -0700)

Merge branch 'jh/memihash-opt' into maint

perf-test update.

* jh/memihash-opt:
p0004: don't error out if test repo is too small
p0004: don't abort if multi-threaded is too slow
p0004: use test_perf
p0004: avoid using pipes
p0004: simplify calls of test-lazy-init-name-hash

Merge branch 'tb/pull-ff-rebase-autostash' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:03 +0000 (13:27 -0700)

Merge branch 'tb/pull-ff-rebase-autostash' into maint

"git pull --rebase --autostash" didn't auto-stash when the local history
fast-forwards to the upstream.

* tb/pull-ff-rebase-autostash:
pull: ff --rebase --autostash works in dirty repo

Merge branch 'jh/close-index-before-stat' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:02 +0000 (13:27 -0700)

Merge branch 'jh/close-index-before-stat' into maint

The timestamp of the index file is now taken after the file is
closed, to help Windows, on which a stale timestamp is reported by
fstat() on a file that is opened for writing and data was written
but not yet closed.

* jh/close-index-before-stat:
read-cache: close index.lock in do_write_index

Merge branch 'sl/clean-d-ignored-fix' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:01 +0000 (13:27 -0700)

Merge branch 'sl/clean-d-ignored-fix' into maint

"git clean -d" used to clean directories that has ignored files,
even though the command should not lose ignored ones without "-x".
"git status --ignored" did not list ignored and untracked files
without "-uall". These have been corrected.

* sl/clean-d-ignored-fix:
clean: teach clean -d to preserve ignored paths
dir: expose cmp_name() and check_contains()
dir: hide untracked contents of untracked dirs
dir: recurse into untracked dirs for ignored files
t7061: status --ignored should search untracked dirs
t7300: clean -d should skip dirs with ignored files

Merge branch 'dk/send-email-avoid-net-smtp-ssl-when... Junio C Hamano Tue, 13 Jun 2017 20:27:01 +0000 (13:27 -0700)

Merge branch 'dk/send-email-avoid-net-smtp-ssl-when-able' into maint

A hotfix to a topic in 'master'.

* dk/send-email-avoid-net-smtp-ssl-when-able:
send-email: Net::SMTP::starttls was introduced in v2.34
send-email: Net::SMTP::SSL is obsolete, use only when necessary

Merge branch 'jc/skip-test-in-the-middle' into maintJunio C Hamano Tue, 13 Jun 2017 20:27:00 +0000 (13:27 -0700)

Merge branch 'jc/skip-test-in-the-middle' into maint

A recent update to t5545-push-options.sh started skipping all the
tests in the script when a web server testing is disabled or
unavailable, not just the ones that require a web server. Non HTTP
tests have been salvaged to always run in this script.

* jc/skip-test-in-the-middle:
t5545: enhance test coverage when no http server is installed
test: allow skipping the remainder

Merge branch 'bw/forking-and-threading' into maintJunio C Hamano Tue, 13 Jun 2017 20:26:59 +0000 (13:26 -0700)

Merge branch 'bw/forking-and-threading' into maint

The "run-command" API implementation has been made more robust
against dead-locking in a threaded environment.

* bw/forking-and-threading:
usage.c: drop set_error_handle()
run-command: restrict PATH search to executable files
run-command: expose is_executable function
run-command: block signals between fork and execve
run-command: add note about forking and threading
run-command: handle dup2 and close errors in child
run-command: eliminate calls to error handling functions in child
run-command: don't die in child when duping /dev/null
run-command: prepare child environment before forking
string-list: add string_list_remove function
run-command: use the async-signal-safe execv instead of execvp
run-command: prepare command before forking
t0061: run_command executes scripts without a #! line
t5550: use write_script to generate post-update hook

Merge branch 'jk/bug-to-abort' into maintJunio C Hamano Tue, 13 Jun 2017 20:26:59 +0000 (13:26 -0700)

Merge branch 'jk/bug-to-abort' into maint

Introduce the BUG() macro to improve die("BUG: ...").

* jk/bug-to-abort:
usage: add NORETURN to BUG() function definitions
config: complain about --local outside of a git repo
setup_git_env: convert die("BUG") to BUG()
usage.c: add BUG() function

Merge branch 'sb/checkout-recurse-submodules' into... Junio C Hamano Tue, 13 Jun 2017 20:26:59 +0000 (13:26 -0700)

Merge branch 'sb/checkout-recurse-submodules' into maint

"git checkout --recurse-submodules" did not quite work with a
submodule that itself has submodules.

* sb/checkout-recurse-submodules:
submodule: properly recurse for read-tree and checkout
submodule: avoid auto-discovery in new working tree manipulator code
submodule_move_head: reuse child_process structure for futher commands

ls-files: factor out tag calculationBrandon Williams Mon, 12 Jun 2017 22:14:08 +0000 (15:14 -0700)

ls-files: factor out tag calculation

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: factor out debug info into a functionBrandon Williams Mon, 12 Jun 2017 22:14:07 +0000 (15:14 -0700)

ls-files: factor out debug info into a function

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert show_files to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:06 +0000 (15:14 -0700)

ls-files: convert show_files to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert show_ce_entry to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:05 +0000 (15:14 -0700)

ls-files: convert show_ce_entry to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert prune_cache to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:04 +0000 (15:14 -0700)

ls-files: convert prune_cache to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert ce_excluded to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:03 +0000 (15:14 -0700)

ls-files: convert ce_excluded to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert show_ru_info to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:02 +0000 (15:14 -0700)

ls-files: convert show_ru_info to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert show_other_files to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:01 +0000 (15:14 -0700)

ls-files: convert show_other_files to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert show_killed_files to take an indexBrandon Williams Mon, 12 Jun 2017 22:14:00 +0000 (15:14 -0700)

ls-files: convert show_killed_files to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert write_eolinfo to take an indexBrandon Williams Mon, 12 Jun 2017 22:13:59 +0000 (15:13 -0700)

ls-files: convert write_eolinfo to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: convert overlay_tree_on_cache to take an... Brandon Williams Mon, 12 Jun 2017 22:13:58 +0000 (15:13 -0700)

ls-files: convert overlay_tree_on_cache to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree: convert read_tree to take an index parameterBrandon Williams Mon, 12 Jun 2017 22:13:57 +0000 (15:13 -0700)

tree: convert read_tree to take an index parameter

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: convert renormalize_buffer to take an indexBrandon Williams Mon, 12 Jun 2017 22:13:56 +0000 (15:13 -0700)

convert: convert renormalize_buffer to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: convert convert_to_git to take an indexBrandon Williams Mon, 12 Jun 2017 22:13:55 +0000 (15:13 -0700)

convert: convert convert_to_git to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: convert convert_to_git_filter_fd to take an... Brandon Williams Mon, 12 Jun 2017 22:13:54 +0000 (15:13 -0700)

convert: convert convert_to_git_filter_fd to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: convert crlf_to_git to take an indexBrandon Williams Mon, 12 Jun 2017 22:13:53 +0000 (15:13 -0700)

convert: convert crlf_to_git to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

convert: convert get_cached_convert_stats_ascii to... Brandon Williams Mon, 12 Jun 2017 22:13:52 +0000 (15:13 -0700)

convert: convert get_cached_convert_stats_ascii to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Configure Git contribution guidelines for github.comLars Schneider Tue, 13 Jun 2017 08:18:07 +0000 (10:18 +0200)

Configure Git contribution guidelines for github.com

Many open source projects use github.com for their contribution process.
Although we mirror the Git core repository to github.com [1] we do not
use any other github.com service. This is unknown/unexpected to a
number of (potential) contributors and consequently they create Pull
Requests against our mirror with their contributions. These Pull
Requests become stale. This is frustrating to them as they think we
ignore them and it is also unsatisfactory for us as we miss potential
code improvements and/or new contributors.

GitHub contribution guidelines and a GitHub Pull Request template that
is visible to every Pull Request creator can be configured with special
files in a Git repository [2]. Let's make use of this!

[1] https://github.com/git/git
[2] https://help.github.com/articles/creating-a-pull-request-template-for-your-repository/

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-stash: fix pushing stash with pathspec from subdirPatrick Steinhardt Tue, 13 Jun 2017 11:38:34 +0000 (13:38 +0200)

git-stash: fix pushing stash with pathspec from subdir

The `git stash push` command recently gained the ability to get a
pathspec as its argument to only stash matching files. Calling this
command from a subdirectory does not work, though, as one of the first
things we do is changing to the top level directory without keeping
track of the prefix from which the command is being run.

Fix the shortcoming by storing the prefix previous to the call to
`cd_to_toplevel` and then subsequently using `git rev-parse --prefix` to
correctly resolve the pathspec. Add a test to catch future breakage of
this usecase.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3200: add test for single parameter passed to -m optionSahil Dua Tue, 13 Jun 2017 10:47:22 +0000 (10:47 +0000)

t3200: add test for single parameter passed to -m option

Add a test for the case when only one parameter is passed to '-m'
(move/rename) option.

For example - if 'git branch -m bbb' is run while checked out on aaa
branch, it should rename the currently checked out branch to bbb.
There was no test for this particular case with only one parameter
for -m option. However, there's one similar test case for -M option.

Add test for making sure HEAD points to the bbb (new branch name). Also
add a test for making sure the reflog that is moved to 'bbb' retains
entries created for the currently checked out branch. Note that since
the topmost entry on reflog for bbb will be about branch creation, we
compare bbb@{1} (instead of bbb@{0}) with aaa@{0} to make sure the
reflog for bbb retains entries from aaa.

Signed-off-by: Sahil Dua <sahildua2305@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision.c: use skip_prefix() in handle_revision_pseudo... SZEDER Gábor Fri, 9 Jun 2017 18:17:33 +0000 (20:17 +0200)

revision.c: use skip_prefix() in handle_revision_pseudo_opt()

Instead of starts_with() and a bunch of magic numbers.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision.c: use skip_prefix() in handle_revision_opt()SZEDER Gábor Fri, 9 Jun 2017 18:17:32 +0000 (20:17 +0200)

revision.c: use skip_prefix() in handle_revision_opt()

Instead of starts_with() and a bunch of magic numbers.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision.c: stricter parsing of '--early-output'SZEDER Gábor Fri, 9 Jun 2017 18:17:31 +0000 (20:17 +0200)

revision.c: stricter parsing of '--early-output'

The parsing of '--early-output' with or without its optional integer
argument allowed bogus options like '--early-output-foobarbaz' to slip
through and be ignored.

Fix it by parsing '--early-output' in the same way as other options
with an optional argument are parsed. Furthermore, use strtoul_ui()
to parse the optional integer argument and to refuse negative numbers.

While at it, use skip_prefix() instead of starts_with() and magic
numbers.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision.c: stricter parsing of '--no-{min,max}-parents'SZEDER Gábor Fri, 9 Jun 2017 18:17:30 +0000 (20:17 +0200)

revision.c: stricter parsing of '--no-{min,max}-parents'

These two options are parsed using starts_with(), allowing things like
'git log --no-min-parents-foobarbaz' to succeed.

Use strcmp() instead.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision.h: turn rev_info.early_output back into an... SZEDER Gábor Sat, 10 Jun 2017 11:41:01 +0000 (13:41 +0200)

revision.h: turn rev_info.early_output back into an unsigned int

rev_info.early_output started out as an unsigned int in cdcefbc97 (Add
"--early-output" log flag for interactive GUI use, 2007-11-03), but
later it was turned into a single bit in a bit field in cc243c3ce
(show: --ignore-missing, 2011-05-18) without explanation, though the
code using it still expects it to be a regular integer type and uses
it as a counter. Consequently, any even number given via
'--early-output=<N>', or indeed a plain '--early-output' defaulting to
100 effectively disabled the feature.

Turn rev_info.early_output back into its origin unsigned int data
type, making '--early-output' work again.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir: create function count_slashes()Prathamesh Chavan Thu, 8 Jun 2017 18:08:12 +0000 (23:38 +0530)

dir: create function count_slashes()

Similar functions exist in apply.c and builtin/show-branch.c for
counting the number of slashes in a string. Also in the later
patches, we introduce a third caller for the same. Hence, we unify
it now by cleaning the existing functions and declaring a common
function count_slashes in dir.h and implementing it in dir.c to
remove this code duplication.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Prathamesh Chavan <pc44800@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

lock_packed_refs(): fix cache validity checkMichael Haggerty Mon, 12 Jun 2017 08:06:13 +0000 (10:06 +0200)

lock_packed_refs(): fix cache validity check

Commit 28ed9830b1 (get_packed_ref_cache(): assume "packed-refs" won't
change while locked, 2017-05-22) assumes that the "packed-refs" file
cannot change while we hold the lock. That assumption is
justified *if* the lock has been held the whole time since the
"packed-refs" file was last read.

But in `lock_packed_refs()`, we ourselves lock the "packed-refs" file
and then call `get_packed_ref_cache()` to ensure that the cache agrees
with the file. The intent is to guard against the possibility that
another process changed the "packed-refs" file the moment before we
locked it.

This check was defeated because `get_packed_ref_cache()` saw that the
file was locked, and therefore didn't do the `stat_validity_check()`
that we want.

The mistake was compounded with a misleading comment in
`lock_packed_refs()` claiming that it was doing the right thing. That
comment came from an earlier draft of the mh/packed-ref-store-prep
patch series when the commits were in a different order.

So instead:

* Extract a function `validate_packed_ref_cache()` that does the
validity check independent of whether the lock is held.

* Change `get_packed_ref_cache()` to call the new function, but only
if the lock *isn't* held.

* Change `lock_packed_refs()` to call the new function in any case
before calling `get_packed_ref_cache()`.

* Fix the comment in `lock_packed_refs()`.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: increase the default pack depth to 50Mike Hommey Thu, 8 Jun 2017 05:34:36 +0000 (14:34 +0900)

fast-import: increase the default pack depth to 50

In 618e613a70, 10 years ago, the default for pack depth used for
git-pack-objects and git-repack was changed from 10 to 50, while
leaving fast-import's default to 10.

There doesn't seem to be a reason besides oversight for the change not
having happened in fast-import as well.

Interestingly, fast-import uses pack.depth when it's set, and the
git-config manual says the default for pack.depth is 50. While the
git-fast-import manual does say the default depth is 10, the
inconsistency is also confusing.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: add [--] to usageAndreas Heiduk Sat, 10 Jun 2017 08:54:45 +0000 (10:54 +0200)

filter-branch: add [--] to usage

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: add `--setup` stepAndreas Heiduk Sat, 10 Jun 2017 08:54:44 +0000 (10:54 +0200)

filter-branch: add `--setup` step

A `--setup` step in `git filter-branch` makes it much easier to
define the initial values of variables used in the real filters.
Also sourcing/defining utility functions here instead of
`--env-filter` improves performance and minimizes clogging the
output in case of errors.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5100: add some more mailinfo testsKyle J. McKay Wed, 31 May 2017 10:26:10 +0000 (03:26 -0700)

t5100: add some more mailinfo tests

Add some more simple mailinfo tests including a few that
produce:

fatal: `pos + len' is too far after the end of the buffer

Mark those as 'test_expect_failure'.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://bogomips.org/git-svnJunio C Hamano Sat, 10 Jun 2017 05:29:26 +0000 (14:29 +0900)

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

* 'master' of git://bogomips.org/git-svn:
doc: describe git svn init --ignore-refs

t4005: modernize style and drop hard coded sha1Stefan Beller Wed, 7 Jun 2017 02:18:05 +0000 (19:18 -0700)

t4005: modernize style and drop hard coded sha1

Use modern style in the test t4005. Remove hard coded sha1 values.
Combine test prep work and the actual test. Rename the first
test to contain the word "setup".

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

doc: describe git svn init --ignore-refsAndreas Heiduk Wed, 7 Jun 2017 18:32:14 +0000 (20:32 +0200)

doc: describe git svn init --ignore-refs

Add the missing documentation for `git svn init --ignore-refs`.

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>

Sync with maintJunio C Hamano Wed, 7 Jun 2017 00:32:04 +0000 (09:32 +0900)

Sync with maint

* maint:
sha1dc: update from upstream
sha1dc: ignore indent-with-non-tab whitespace violations

Merge branch 'ab/sha1dc-maint' into maintJunio C Hamano Wed, 7 Jun 2017 00:31:53 +0000 (09:31 +0900)

Merge branch 'ab/sha1dc-maint' into maint

* ab/sha1dc-maint:
sha1dc: update from upstream
sha1dc: ignore indent-with-non-tab whitespace violations

sha1dc: update from upstreamÆvar Arnfjörð Bjarmason Tue, 6 Jun 2017 15:12:29 +0000 (15:12 +0000)

sha1dc: update from upstream

Update sha1dc from the latest version by the upstream
maintainer[1].

See commit a0103914c2 ("sha1dc: update from upstream", 2017-05-20) for
the latest update. That update was done sans some whitespace changes
by upstream, which is why the diff here isn't the same as the upstream
cc46554..e139984.

It also brings in a change[2] upstream made which should hopefully
address the breakage in 2.13.1 on Cygwin, see [3]. Cygwin defines both
_BIG_ENDIAN and _LITTLE_ENDIAN.

Adam Dinwoodie reports on the mailing list that that upstream commit
fixes the issue on Cygwin[4].

1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/e1399840b501a68ac6c8d7ed9a5cb1455480200e
2. https://github.com/cr-marcstevens/sha1collisiondetection/commit/a24eef58c0684078405f8c7a89f9b78271432005
3. <20170606100355.GC25777@dinwoodie.org> (https://public-inbox.org/git/20170606100355.GC25777@dinwoodie.org/)
4. <20170606124323.GD25777@dinwoodie.org> (https://public-inbox.org/git/20170606124323.GD25777@dinwoodie.org/)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1dc: ignore indent-with-non-tab whitespace violationsJeff King Tue, 6 Jun 2017 19:01:11 +0000 (15:01 -0400)

sha1dc: ignore indent-with-non-tab whitespace violations

The upstream sha1dc code indents some lines with spaces.
While this doesn't match Git's coding guidelines, it's better
to leave this imported code untouched than to try to make it
match our style. However, we can use .gitattributes to tell
"diff --check" and "git am" not to bother us about it.

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

t5313: make extended-table test more deterministicJeff King Mon, 5 Jun 2017 19:15:25 +0000 (15:15 -0400)

t5313: make extended-table test more deterministic

Commit a1283866b (t5313: test bounds-checks of
corrupted/malicious pack/idx files, 2016-02-25) added a test
that requires our corrupted pack index to have two objects.
The entry for the first one remains untouched, but we
corrupt the entry for second one. Since the index stores the
entries in sha1-sorted order, this means that the test must
make sure that the sha1 of the object we expect to be
corrupted ("$object") sorts after the other placeholder
object.

That commit used the HEAD commit as the placeholder, but the
script never calls test_tick. That means that the commit
object (and thus its sha1) depends on the timestamp when the
test script is run. This usually works in practice, because
the sha1 of $object starts with "fff". The commit object
will sort after that only 1 in 4096 times, but when it does
the test will fail.

One obvious solution is to add the test_tick call to get a
deterministic commit sha1. But since we're relying on the
sort order for the test to function, let's make that very
explicit by just generating a second blob with a known sha1.

Reported-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0012: test "-h" with builtinsJeff King Tue, 30 May 2017 05:19:30 +0000 (01:19 -0400)

t0012: test "-h" with builtins

Since commit 99caeed05 (Let 'git <command> -h' show usage
without a git dir, 2009-11-09), the git wrapper handles "-h"
specially, skipping any repository setup but still calling
the builtin's cmd_foo() function. This means that every
cmd_foo() must be ready to handle this case, but we don't
have any systematic tests. This led to "git am -h" being
broken for some time without anybody noticing.

This patch just tests that "git foo -h" works for every
builtin, where we see a 129 exit code (the normal code for
our usage() helper), and that the word "usage" appears in
the output.

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

git: add hidden --list-builtins optionJeff King Tue, 30 May 2017 05:18:43 +0000 (01:18 -0400)

git: add hidden --list-builtins option

It can be useful in the test suite to be able to iterate
over the list of builtins. We could do this with some
Makefile magic. But since the authoritative list is in the
commands array inside git.c, and since this could also be
handy for debugging, let's add a hidden command-line option
to dump that list.

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

version: convert to parse-optionsJeff King Tue, 30 May 2017 05:17:42 +0000 (01:17 -0400)

version: convert to parse-options

The "git version" command didn't traditionally accept any
options, and in fact ignores any you give it. When we added
simple option parsing for "--build-options" in 6b9c38e14, we
didn't improve this; we just loop over the arguments and
pick out the one we recognize.

Instead, let's move to a real parsing loop, complain about
nonsense options, and recognize conventions like "-h".

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

diff- and log- family: handle "git cmd -h" earlyJunio C Hamano Thu, 1 Jun 2017 04:38:16 +0000 (13:38 +0900)

diff- and log- family: handle "git cmd -h" early

"git $builtin -h" bypasses the usual repository setup and calls the
cmd_$builtin() function, expecting it to show the help text.

Unfortunately the commands in the log- and the diff- family want to
call into the revisions machinery, which by definition needs to have
a repository already discovered. Strictly speaking, they may not
need a repository only for parsing "-h", but it is a good discipline
to future-proof codepath to ensure that setup_revisions() is called
after we know that a repository is there.

Handle the "git $builtin -h" special case very early in these
commands to work around potential issues.

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

diff: rename diff_fill_sha1_info to diff_fill_oid_infoBrandon Williams Tue, 30 May 2017 17:31:09 +0000 (10:31 -0700)

diff: rename diff_fill_sha1_info to diff_fill_oid_info

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-rename: use is_empty_blob_oidBrandon Williams Tue, 30 May 2017 17:31:08 +0000 (10:31 -0700)

diffcore-rename: use is_empty_blob_oid

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree-diff: convert path_appendnew to object_idBrandon Williams Tue, 30 May 2017 17:31:07 +0000 (10:31 -0700)

tree-diff: convert path_appendnew to object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree-diff: convert diff_tree_paths to struct object_idBrandon Williams Tue, 30 May 2017 17:31:06 +0000 (10:31 -0700)

tree-diff: convert diff_tree_paths to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tree-diff: convert try_to_follow_renames to struct... Brandon Williams Tue, 30 May 2017 17:31:05 +0000 (10:31 -0700)

tree-diff: convert try_to_follow_renames to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/diff-tree: cleanup references to sha1Brandon Williams Tue, 30 May 2017 17:31:04 +0000 (10:31 -0700)

builtin/diff-tree: cleanup references to sha1

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-tree: convert diff_tree_sha1 to struct object_idBrandon Williams Tue, 30 May 2017 17:31:03 +0000 (10:31 -0700)

diff-tree: convert diff_tree_sha1 to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes-merge: convert write_note_to_worktree to struct... Brandon Williams Tue, 30 May 2017 17:31:02 +0000 (10:31 -0700)

notes-merge: convert write_note_to_worktree to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes-merge: convert verify_notes_filepair to struct... Brandon Williams Tue, 30 May 2017 17:31:01 +0000 (10:31 -0700)

notes-merge: convert verify_notes_filepair to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes-merge: convert find_notes_merge_pair_ps to struct... Brandon Williams Tue, 30 May 2017 17:31:00 +0000 (10:31 -0700)

notes-merge: convert find_notes_merge_pair_ps to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes-merge: convert merge_from_diffs to struct object_idBrandon Williams Tue, 30 May 2017 17:30:59 +0000 (10:30 -0700)

notes-merge: convert merge_from_diffs to struct object_id

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes-merge: convert notes_merge* to struct object_idBrandon Williams Tue, 30 May 2017 17:30:58 +0000 (10:30 -0700)

notes-merge: convert notes_merge* to struct object_id

Convert notes_merge and notes_merge_commit to use struct object_id.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

perf: work around the tested repo having an index.lockÆvar Arnfjörð Bjarmason Fri, 2 Jun 2017 10:33:30 +0000 (10:33 +0000)

perf: work around the tested repo having an index.lock

When the tested repo has an index.lock file it should be removed. This
file may be present if e.g. git-status previously crashed in that
repo, and it will make a lot of git commands fail. Let's try harder
and remove the lock.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with v2.13.1Junio C Hamano Mon, 5 Jun 2017 00:33:16 +0000 (09:33 +0900)

Sync with v2.13.1

Seventh batch for 2.14Junio C Hamano Mon, 5 Jun 2017 00:32:25 +0000 (09:32 +0900)

Seventh batch for 2.14

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

Merge branch 'ad/pull-remote-doc'Junio C Hamano Mon, 5 Jun 2017 00:18:13 +0000 (09:18 +0900)

Merge branch 'ad/pull-remote-doc'

Docfix.

* ad/pull-remote-doc:
docs: fix formatting and grammar

Merge branch 'tb/pull-ff-rebase-autostash'Junio C Hamano Mon, 5 Jun 2017 00:18:13 +0000 (09:18 +0900)

Merge branch 'tb/pull-ff-rebase-autostash'

"git pull --rebase --autostash" didn't auto-stash when the local history
fast-forwards to the upstream.

* tb/pull-ff-rebase-autostash:
pull: ff --rebase --autostash works in dirty repo

Merge branch 'jk/drop-free-refspecs'Junio C Hamano Mon, 5 Jun 2017 00:18:13 +0000 (09:18 +0900)

Merge branch 'jk/drop-free-refspecs'

Code clean-up.

* jk/drop-free-refspecs:
remote: drop free_refspecs() function

Merge branch 'jk/connect-symref-info-leak-fix'Junio C Hamano Mon, 5 Jun 2017 00:18:12 +0000 (09:18 +0900)

Merge branch 'jk/connect-symref-info-leak-fix'

Leakfix.

* jk/connect-symref-info-leak-fix:
connect.c: fix leak in parse_one_symref_info()

Merge branch 'js/blame-lib'Junio C Hamano Mon, 5 Jun 2017 00:18:11 +0000 (09:18 +0900)

Merge branch 'js/blame-lib'

The internal logic used in "git blame" has been libified to make it
easier to use by cgit.

* js/blame-lib: (29 commits)
blame: move entry prepend to libgit
blame: move scoreboard setup to libgit
blame: move scoreboard-related methods to libgit
blame: move fake-commit-related methods to libgit
blame: move origin-related methods to libgit
blame: move core structures to header
blame: create entry prepend function
blame: create scoreboard setup function
blame: create scoreboard init function
blame: rework methods that determine 'final' commit
blame: wrap blame_sort and compare_blame_final
blame: move progress updates to a scoreboard callback
blame: make sanity_check use a callback in scoreboard
blame: move no_whole_file_rename flag to scoreboard
blame: move xdl_opts flags to scoreboard
blame: move show_root flag to scoreboard
blame: move reverse flag to scoreboard
blame: move contents_from to scoreboard
blame: move copy/move thresholds to scoreboard
blame: move stat counters to scoreboard
...

Merge branch 'mh/packed-ref-store-prep'Junio C Hamano Mon, 5 Jun 2017 00:18:11 +0000 (09:18 +0900)

Merge branch 'mh/packed-ref-store-prep'

The implementation of "ref" API around the "packed refs" have been
cleaned up, in preparation for further changes.

* mh/packed-ref-store-prep: (25 commits)
cache_ref_iterator_begin(): avoid priming unneeded directories
ref-filter: limit traversal to prefix
create_ref_entry(): remove `check_name` option
refs_ref_iterator_begin(): handle `GIT_REF_PARANOIA`
read_packed_refs(): report unexpected fopen() failures
read_packed_refs(): do more of the work of reading packed refs
get_packed_ref_cache(): assume "packed-refs" won't change while locked
should_pack_ref(): new function, extracted from `files_pack_refs()`
ref_update_reject_duplicates(): add a sanity check
ref_update_reject_duplicates(): use `size_t` rather than `int`
ref_update_reject_duplicates(): expose function to whole refs module
ref_transaction_prepare(): new optional step for reference updates
ref_transaction_commit(): check for valid `transaction->state`
files_transaction_cleanup(): new helper function
files_ref_store: put the packed files lock directly in this struct
files-backend: move `lock` member to `files_ref_store`
lockfile: add a new method, is_lock_file_locked()
ref_store: take a `msg` parameter when deleting references
refs: use `size_t` indexes when iterating over ref transaction updates
refs_ref_iterator_begin(): don't check prefixes redundantly
...

Merge branch 'mb/diff-default-to-indent-heuristics'Junio C Hamano Mon, 5 Jun 2017 00:18:10 +0000 (09:18 +0900)

Merge branch 'mb/diff-default-to-indent-heuristics'

Make the "indent" heuristics the default in "diff" and diff.indentHeuristics
configuration variable an escape hatch for those who do no want it.

* mb/diff-default-to-indent-heuristics:
add--interactive: drop diff.indentHeuristic handling
diff: enable indent heuristic by default
diff: have the diff-* builtins configure diff before initializing revisions
diff: make the indent heuristic part of diff's basic configuration

Merge branch 'jh/close-index-before-stat'Junio C Hamano Mon, 5 Jun 2017 00:18:10 +0000 (09:18 +0900)

Merge branch 'jh/close-index-before-stat'

The timestamp of the index file is now taken after the file is
closed, to help Windows, on which a stale timestamp is reported by
fstat() on a file that is opened for writing and data was written
but not yet closed.

* jh/close-index-before-stat:
read-cache: close index.lock in do_write_index

Git 2.13.1 v2.13.1Junio C Hamano Mon, 5 Jun 2017 00:05:38 +0000 (09:05 +0900)

Git 2.13.1

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

Merge branch 'ah/doc-rev-parse-short-default' into... Junio C Hamano Mon, 5 Jun 2017 00:03:23 +0000 (09:03 +0900)

Merge branch 'ah/doc-rev-parse-short-default' into maint

Doc update.

* ah/doc-rev-parse-short-default:
doc: rewrite description for rev-parse --short

Merge branch 'ah/doc-filter-branch-export-env' into... Junio C Hamano Mon, 5 Jun 2017 00:03:22 +0000 (09:03 +0900)

Merge branch 'ah/doc-filter-branch-export-env' into maint

Docfix.

* ah/doc-filter-branch-export-env:
doc: filter-branch does not require re-export of vars

Merge branch 'sd/t3200-typofix' into maintJunio C Hamano Mon, 5 Jun 2017 00:03:22 +0000 (09:03 +0900)

Merge branch 'sd/t3200-typofix' into maint

Test fix.

* sd/t3200-typofix:
branch test: fix invalid config key access

Merge branch 'sb/t5531-update-desc' into maintJunio C Hamano Mon, 5 Jun 2017 00:03:21 +0000 (09:03 +0900)

Merge branch 'sb/t5531-update-desc' into maint

The description strings for a few tests have been updated.

* sb/t5531-update-desc:
t5531: fix test description

Merge branch 'ah/doc-pretty-format-fix' into maintJunio C Hamano Mon, 5 Jun 2017 00:03:20 +0000 (09:03 +0900)

Merge branch 'ah/doc-pretty-format-fix' into maint

Documentation fix.

* ah/doc-pretty-format-fix:
Documentation: fix formatting typo in pretty-formats.txt

Merge branch 'ah/doc-interpret-trailers-ifexists' into... Junio C Hamano Mon, 5 Jun 2017 00:03:19 +0000 (09:03 +0900)

Merge branch 'ah/doc-interpret-trailers-ifexists' into maint

Documentation fix.

* ah/doc-interpret-trailers-ifexists:
Documentation: fix reference to ifExists for interpret-trailers