gitweb.git
Merge branch 'js/mingw-o-append'Junio C Hamano Mon, 20 Aug 2018 18:33:52 +0000 (11:33 -0700)

Merge branch 'js/mingw-o-append'

Among the three codepaths we use O_APPEND to open a file for
appending, one used for writing GIT_TRACE output requires O_APPEND
implementation that behaves sensibly when multiple processes are
writing to the same file. POSIX emulation used in the Windows port
has been updated to improve in this area.

* js/mingw-o-append:
mingw: enable atomic O_APPEND

Merge branch 'jk/for-each-object-iteration'Junio C Hamano Mon, 20 Aug 2018 18:33:52 +0000 (11:33 -0700)

Merge branch 'jk/for-each-object-iteration'

The API to iterate over all objects learned to optionally list
objects in the order they appear in packfiles, which helps locality
of access if the caller accesses these objects while as objects are
enumerated.

* jk/for-each-object-iteration:
for_each_*_object: move declarations to object-store.h
cat-file: use a single strbuf for all output
cat-file: split batch "buf" into two variables
cat-file: use oidset check-and-insert
cat-file: support "unordered" output for --batch-all-objects
cat-file: rename batch_{loose,packed}_object callbacks
t1006: test cat-file --batch-all-objects with duplicates
for_each_packed_object: support iterating in pack-order
for_each_*_object: give more comprehensive docstrings
for_each_*_object: take flag arguments as enum
for_each_*_object: store flag definitions in a single location

Merge branch 'ab/fetch-tags-noclobber'Junio C Hamano Mon, 20 Aug 2018 18:33:52 +0000 (11:33 -0700)

Merge branch 'ab/fetch-tags-noclobber'

Test and doc clean-ups.

* ab/fetch-tags-noclobber:
pull doc: fix a long-standing grammar error
fetch tests: correct a comment "remove it" -> "remove them"
push tests: assert re-pushing annotated tags
push tests: add more testing for forced tag pushing
push tests: fix logic error in "push" test assertion
push tests: remove redundant 'git push' invocation
fetch tests: change "Tag" test tag to "testTag"

Merge branch 'ng/mergetool-lose-final-prompt'Junio C Hamano Mon, 20 Aug 2018 18:33:51 +0000 (11:33 -0700)

Merge branch 'ng/mergetool-lose-final-prompt'

"git mergetool" stopped and gave an extra prompt to continue after
the last path has been handled, which did not make much sense.

* ng/mergetool-lose-final-prompt:
mergetool: don't suggest to continue after last file

Merge branch 'jt/commit-graph-per-object-store'Junio C Hamano Mon, 20 Aug 2018 18:33:51 +0000 (11:33 -0700)

Merge branch 'jt/commit-graph-per-object-store'

Test update.

* jt/commit-graph-per-object-store:
t5318: avoid unnecessary command substitutions

Merge branch 'ds/commit-graph-fsck'Junio C Hamano Mon, 20 Aug 2018 18:33:51 +0000 (11:33 -0700)

Merge branch 'ds/commit-graph-fsck'

Test fix.

* ds/commit-graph-fsck:
t5318: use 'test_cmp_bin' to compare commit-graph files

Merge branch 'jt/fetch-negotiator-skipping'Junio C Hamano Mon, 20 Aug 2018 18:33:51 +0000 (11:33 -0700)

Merge branch 'jt/fetch-negotiator-skipping'

Test fix.

* jt/fetch-negotiator-skipping:
t5552: suppress upload-pack trace output

Merge branch 'jc/gpg-status'Junio C Hamano Mon, 20 Aug 2018 18:33:50 +0000 (11:33 -0700)

Merge branch 'jc/gpg-status'

"git verify-tag" and "git verify-commit" have been taught to use
the exit status of underlying "gpg --verify" to signal bad or
untrusted signature they found.

* jc/gpg-status:
gpg-interface: propagate exit status from gpg back to the callers

Merge branch 'jc/update-index-doc'Junio C Hamano Mon, 20 Aug 2018 18:33:50 +0000 (11:33 -0700)

Merge branch 'jc/update-index-doc'

Doc update.

* jc/update-index-doc:
update-index: there no longer is `apply --index-info`

Merge branch 'en/update-index-doc'Junio C Hamano Mon, 20 Aug 2018 18:33:50 +0000 (11:33 -0700)

Merge branch 'en/update-index-doc'

Doc update.

* en/update-index-doc:
git-update-index.txt: reword possibly confusing example

Merge branch 'js/typofixes'Junio C Hamano Mon, 20 Aug 2018 18:33:50 +0000 (11:33 -0700)

Merge branch 'js/typofixes'

Comment update.

* js/typofixes:
remote-curl: remove spurious period
git-compat-util.h: fix typo

Merge branch 'sk/instaweb-rh-update'Junio C Hamano Mon, 20 Aug 2018 18:33:49 +0000 (11:33 -0700)

Merge branch 'sk/instaweb-rh-update'

"git instaweb" has been adjusted to run better with newer Apache on
RedHat based distros.

* sk/instaweb-rh-update:
git-instaweb: fix apache2 config with apache >= 2.4
git-instaweb: support Fedora/Red Hat apache module path

Merge branch 'en/t7406-fixes'Junio C Hamano Mon, 20 Aug 2018 18:33:48 +0000 (11:33 -0700)

Merge branch 'en/t7406-fixes'

Test fixes.

* en/t7406-fixes:
t7406: avoid using test_must_fail for commands other than git
t7406: prefer test_* helper functions to test -[feds]
t7406: avoid having git commands upstream of a pipe
t7406: simplify by using diff --name-only instead of diff --raw
t7406: fix call that was failing for the wrong reason

Merge branch 'js/rebase-merges-exec-fix'Junio C Hamano Mon, 20 Aug 2018 18:33:48 +0000 (11:33 -0700)

Merge branch 'js/rebase-merges-exec-fix'

The "--exec" option to "git rebase --rebase-merges" placed the exec
commands at wrong places, which has been corrected.

* js/rebase-merges-exec-fix:
rebase --exec: make it work with --rebase-merges
t3430: demonstrate what -r, --autosquash & --exec should do

Merge branch 'ab/test-must-be-empty-for-master'Junio C Hamano Mon, 20 Aug 2018 18:33:48 +0000 (11:33 -0700)

Merge branch 'ab/test-must-be-empty-for-master'

Test updates.

* ab/test-must-be-empty-for-master:
tests: make use of the test_must_be_empty function

Merge branch 'ab/newhash-is-sha256'Junio C Hamano Mon, 20 Aug 2018 18:33:48 +0000 (11:33 -0700)

Merge branch 'ab/newhash-is-sha256'

Documentation update.

* ab/newhash-is-sha256:
doc hash-function-transition: pick SHA-256 as NewHash
doc hash-function-transition: note the lack of a changelog

Seventh batch for 2.19 cycleJunio C Hamano Fri, 17 Aug 2018 20:15:06 +0000 (13:15 -0700)

Seventh batch for 2.19 cycle

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

Merge branch 'nd/complete-config-vars'Junio C Hamano Fri, 17 Aug 2018 20:09:59 +0000 (13:09 -0700)

Merge branch 'nd/complete-config-vars'

Build fix.

* nd/complete-config-vars:
Makefile: add missing dependency for command-list.h

Merge branch 'ar/t4150-am-scissors-test-fix'Junio C Hamano Fri, 17 Aug 2018 20:09:59 +0000 (13:09 -0700)

Merge branch 'ar/t4150-am-scissors-test-fix'

Test fix.

* ar/t4150-am-scissors-test-fix:
t4150: fix broken test for am --scissors

Merge branch 'js/pull-rebase-type-shorthand'Junio C Hamano Fri, 17 Aug 2018 20:09:59 +0000 (13:09 -0700)

Merge branch 'js/pull-rebase-type-shorthand'

"git pull --rebase=interactive" learned "i" as a short-hand for
"interactive".

* js/pull-rebase-type-shorthand:
pull --rebase=<type>: allow single-letter abbreviations for the type

Merge branch 'jk/diff-rendered-docs'Junio C Hamano Fri, 17 Aug 2018 20:09:58 +0000 (13:09 -0700)

Merge branch 'jk/diff-rendered-docs'

The end result of documentation update has been made to be
inspected more easily to help developers.

* jk/diff-rendered-docs:
add a script to diff rendered documentation

Merge branch 'hn/config-in-code-comment'Junio C Hamano Fri, 17 Aug 2018 20:09:58 +0000 (13:09 -0700)

Merge branch 'hn/config-in-code-comment'

Header update.

* hn/config-in-code-comment:
config: document git config getter return value

Merge branch 'nd/config-blame-sort'Junio C Hamano Fri, 17 Aug 2018 20:09:58 +0000 (13:09 -0700)

Merge branch 'nd/config-blame-sort'

Doc fix.

* nd/config-blame-sort:
config.txt: reorder blame stuff to keep config keys sorted

Merge branch 'en/t3031-title-fix'Junio C Hamano Fri, 17 Aug 2018 20:09:58 +0000 (13:09 -0700)

Merge branch 'en/t3031-title-fix'

Test fix.

* en/t3031-title-fix:
t3031: update test description to mention desired behavior

Merge branch 'sb/indent-heuristic-optim'Junio C Hamano Fri, 17 Aug 2018 20:09:57 +0000 (13:09 -0700)

Merge branch 'sb/indent-heuristic-optim'

"git diff --indent-heuristic" had a bad corner case performance.

* sb/indent-heuristic-optim:
xdiff: reduce indent heuristic overhead

Merge branch 'en/abort-df-conflict-fixes'Junio C Hamano Fri, 17 Aug 2018 20:09:57 +0000 (13:09 -0700)

Merge branch 'en/abort-df-conflict-fixes'

"git merge --abort" etc. did not clean things up properly when
there were conflicted entries in the index in certain order that
are involved in D/F conflicts. This has been corrected.

* en/abort-df-conflict-fixes:
read-cache: fix directory/file conflict handling in read_index_unmerged()
t1015: demonstrate directory/file conflict recovery failures

Merge branch 'mk/http-backend-content-length'Junio C Hamano Fri, 17 Aug 2018 20:09:57 +0000 (13:09 -0700)

Merge branch 'mk/http-backend-content-length'

The http-backend (used for smart-http transport) used to slurp the
whole input until EOF, without paying attention to CONTENT_LENGTH
that is supplied in the environment and instead expecting the Web
server to close the input stream. This has been fixed.

* mk/http-backend-content-length:
t5562: avoid non-portable "export FOO=bar" construct
http-backend: respect CONTENT_LENGTH for receive-pack
http-backend: respect CONTENT_LENGTH as specified by rfc3875
http-backend: cleanup writing to child process

Merge branch 'ot/ref-filter-object-info'Junio C Hamano Fri, 17 Aug 2018 20:09:57 +0000 (13:09 -0700)

Merge branch 'ot/ref-filter-object-info'

A few atoms like %(objecttype) and %(objectsize) in the format
specifier of "for-each-ref --format=<format>" can be filled without
getting the full contents of the object, but just with the object
header. These cases have been optimized by calling
oid_object_info() API (instead of reading and inspecting the data).

* ot/ref-filter-object-info:
ref-filter: use oid_object_info() to get object
ref-filter: merge get_obj and get_object
ref-filter: initialize eaten variable
ref-filter: fill empty fields with empty values
ref-filter: add info_source to valid_atom

Merge branch 'nd/no-extern'Junio C Hamano Fri, 17 Aug 2018 20:09:56 +0000 (13:09 -0700)

Merge branch 'nd/no-extern'

Noiseword "extern" has been removed from function decls in the
header files.

* nd/no-extern:
submodule.h: drop extern from function declaration
revision.h: drop extern from function declaration
repository.h: drop extern from function declaration
rerere.h: drop extern from function declaration
line-range.h: drop extern from function declaration
diff.h: remove extern from function declaration
diffcore.h: drop extern from function declaration
convert.h: drop 'extern' from function declaration
cache-tree.h: drop extern from function declaration
blame.h: drop extern on func declaration
attr.h: drop extern from function declaration
apply.h: drop extern on func declaration

Merge branch 'es/want-color-fd-defensive'Junio C Hamano Fri, 17 Aug 2018 20:09:56 +0000 (13:09 -0700)

Merge branch 'es/want-color-fd-defensive'

Futureproofing a helper function that can easily be misused.

* es/want-color-fd-defensive:
color: protect against out-of-bounds reads and writes

Merge branch 'ab/sha1dc'Junio C Hamano Fri, 17 Aug 2018 20:09:56 +0000 (13:09 -0700)

Merge branch 'ab/sha1dc'

AIX portability update for the SHA1DC hash, imported from upstream.

* ab/sha1dc:
sha1dc: update from upstream

Merge branch 'rs/parse-opt-lithelp'Junio C Hamano Fri, 17 Aug 2018 20:09:56 +0000 (13:09 -0700)

Merge branch 'rs/parse-opt-lithelp'

The parse-options machinery learned to refrain from enclosing
placeholder string inside a "<bra" and "ket>" pair automatically
without PARSE_OPT_LITERAL_ARGHELP. Existing help text for option
arguments that are not formatted correctly have been identified and
fixed.

* rs/parse-opt-lithelp:
parse-options: automatically infer PARSE_OPT_LITERAL_ARGHELP
shortlog: correct option help for -w
send-pack: specify --force-with-lease argument help explicitly
pack-objects: specify --index-version argument help explicitly
difftool: remove angular brackets from argument help
add, update-index: fix --chmod argument help
push: use PARSE_OPT_LITERAL_ARGHELP instead of unbalanced brackets

Merge branch 'ab/fetch-nego'Junio C Hamano Fri, 17 Aug 2018 20:09:55 +0000 (13:09 -0700)

Merge branch 'ab/fetch-nego'

Update to a few other topics around 'git fetch'.

* ab/fetch-nego:
fetch doc: cross-link two new negotiation options
negotiator: unknown fetch.negotiationAlgorithm should error out

Merge branch 'jt/refspec-dwim-precedence-fix'Junio C Hamano Fri, 17 Aug 2018 20:09:55 +0000 (13:09 -0700)

Merge branch 'jt/refspec-dwim-precedence-fix'

"git fetch $there refs/heads/s" ought to fetch the tip of the
branch 's', but when "refs/heads/refs/heads/s", i.e. a branch whose
name is "refs/heads/s" exists at the same time, fetched that one
instead by mistake. This has been corrected to honor the usual
disambiguation rules for abbreviated refnames.

* jt/refspec-dwim-precedence-fix:
remote: make refspec follow the same disambiguation rule as local refs

Merge branch 'jk/merge-subtree-heuristics'Junio C Hamano Fri, 17 Aug 2018 20:09:55 +0000 (13:09 -0700)

Merge branch 'jk/merge-subtree-heuristics'

The automatic tree-matching in "git merge -s subtree" was broken 5
years ago and nobody has noticed since then, which is now fixed.

* jk/merge-subtree-heuristics:
score_trees(): fix iteration over trees with missing entries

Merge branch 'ab/test-must-be-empty'Junio C Hamano Fri, 17 Aug 2018 20:09:54 +0000 (13:09 -0700)

Merge branch 'ab/test-must-be-empty'

Test updates.

* ab/test-must-be-empty:
tests: make use of the test_must_be_empty function

Merge branch 'es/rebase-i-author-script-fix'Junio C Hamano Fri, 17 Aug 2018 20:09:54 +0000 (13:09 -0700)

Merge branch 'es/rebase-i-author-script-fix'

The "author-script" file "git rebase -i" creates got broken when
we started to move the command away from shell script, which is
getting fixed now.

* es/rebase-i-author-script-fix:
sequencer: don't die() on bogus user-edited timestamp
sequencer: fix "rebase -i --root" corrupting author header timestamp
sequencer: fix "rebase -i --root" corrupting author header timezone
sequencer: fix "rebase -i --root" corrupting author header

Merge branch 'ab/fsck-transfer-updates'Junio C Hamano Fri, 17 Aug 2018 20:09:54 +0000 (13:09 -0700)

Merge branch 'ab/fsck-transfer-updates'

The test performed at the receiving end of "git push" to prevent
bad objects from entering repository can be customized via
receive.fsck.* configuration variables; we now have gained a
counterpart to do the same on the "git fetch" side, with
fetch.fsck.* configuration variables.

* ab/fsck-transfer-updates:
fsck: test and document unknown fsck.<msg-id> values
fsck: add stress tests for fsck.skipList
fsck: test & document {fetch,receive}.fsck.* config fallback
fetch: implement fetch.fsck.*
transfer.fsckObjects tests: untangle confusing setup
config doc: elaborate on fetch.fsckObjects security
config doc: elaborate on what transfer.fsckObjects does
config doc: unify the description of fsck.* and receive.fsck.*
config doc: don't describe *.fetchObjects twice
receive.fsck.<msg-id> tests: remove dead code

Sixth batch for 2.19 cycleJunio C Hamano Wed, 15 Aug 2018 22:13:39 +0000 (15:13 -0700)

Sixth batch for 2.19 cycle

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

Merge branch 'jt/connectivity-check-after-unshallow'Junio C Hamano Wed, 15 Aug 2018 22:08:28 +0000 (15:08 -0700)

Merge branch 'jt/connectivity-check-after-unshallow'

"git fetch" sometimes failed to update the remote-tracking refs,
which has been corrected.

* jt/connectivity-check-after-unshallow:
fetch-pack: unify ref in and out param

Merge branch 'sg/travis-retrieve-trash-upon-failure'Junio C Hamano Wed, 15 Aug 2018 22:08:28 +0000 (15:08 -0700)

Merge branch 'sg/travis-retrieve-trash-upon-failure'

The Travis CI scripts were taught to ship back the test data from
failed tests.

* sg/travis-retrieve-trash-upon-failure:
travis-ci: include the trash directories of failed tests in the trace log

Merge branch 'rs/remote-mv-leakfix'Junio C Hamano Wed, 15 Aug 2018 22:08:28 +0000 (15:08 -0700)

Merge branch 'rs/remote-mv-leakfix'

Leakfix.

* rs/remote-mv-leakfix:
remote: clear string_list after use in mv()

Merge branch 'es/mw-to-git-chain-fix'Junio C Hamano Wed, 15 Aug 2018 22:08:27 +0000 (15:08 -0700)

Merge branch 'es/mw-to-git-chain-fix'

Test fix.

* es/mw-to-git-chain-fix:
mw-to-git/t9360: fix broken &&-chain

Merge branch 'ms/http-proto-doc'Junio C Hamano Wed, 15 Aug 2018 22:08:27 +0000 (15:08 -0700)

Merge branch 'ms/http-proto-doc'

Doc fix.

* ms/http-proto-doc:
doc: fix want-capability separator

Merge branch 'nd/pack-objects-threading-doc'Junio C Hamano Wed, 15 Aug 2018 22:08:27 +0000 (15:08 -0700)

Merge branch 'nd/pack-objects-threading-doc'

Doc fix.

* nd/pack-objects-threading-doc:
pack-objects: document about thread synchronization

Merge branch 'jn/subtree-test-fixes'Junio C Hamano Wed, 15 Aug 2018 22:08:27 +0000 (15:08 -0700)

Merge branch 'jn/subtree-test-fixes'

Test fix.

* jn/subtree-test-fixes:
subtree test: simplify preparation of expected results
subtree test: add missing && to &&-chain

Merge branch 'cb/p4-pre-submit-hook'Junio C Hamano Wed, 15 Aug 2018 22:08:27 +0000 (15:08 -0700)

Merge branch 'cb/p4-pre-submit-hook'

"git p4 submit" learns to ask its own pre-submit hook if it should
continue with submitting.

* cb/p4-pre-submit-hook:
git-p4: add the `p4-pre-submit` hook

Merge branch 'js/vscode'Junio C Hamano Wed, 15 Aug 2018 22:08:26 +0000 (15:08 -0700)

Merge branch 'js/vscode'

Add a script (in contrib/) to help users of VSCode work better with
our codebase.

* js/vscode:
vscode: let cSpell work on commit messages, too
vscode: add a dictionary for cSpell
vscode: use 8-space tabs, no trailing ws, etc for Git's source code
vscode: wrap commit messages at column 72 by default
vscode: only overwrite C/C++ settings
mingw: define WIN32 explicitly
cache.h: extract enum declaration from inside a struct declaration
vscode: hard-code a couple defines
contrib: add a script to initialize VS Code configuration

Merge branch 'bb/redecl-enum-fix'Junio C Hamano Wed, 15 Aug 2018 22:08:26 +0000 (15:08 -0700)

Merge branch 'bb/redecl-enum-fix'

Compilation fix.

* bb/redecl-enum-fix:
packfile: ensure that enum object_type is defined

Merge branch 'jk/banned-function'Junio C Hamano Wed, 15 Aug 2018 22:08:26 +0000 (15:08 -0700)

Merge branch 'jk/banned-function'

It is too easy to misuse system API functions such as strcat();
these selected functions are now forbidden in this codebase and
will cause a compilation failure.

* jk/banned-function:
banned.h: mark strncpy() as banned
banned.h: mark sprintf() as banned
banned.h: mark strcat() as banned
automatically ban strcpy()

Merge branch 'en/merge-recursive-skip-fix'Junio C Hamano Wed, 15 Aug 2018 22:08:25 +0000 (15:08 -0700)

Merge branch 'en/merge-recursive-skip-fix'

When the sparse checkout feature is in use, "git cherry-pick" and
other mergy operations lost the skip_worktree bit when a path that
is excluded from checkout requires content level merge, which is
resolved as the same as the HEAD version, without materializing the
merge result in the working tree, which made the path appear as
deleted. This has been corrected by preserving the skip_worktree
bit (and not materializing the file in the working tree).

* en/merge-recursive-skip-fix:
merge-recursive: preserve skip_worktree bit when necessary
t3507: add a testcase showing failure with sparse checkout

Merge branch 'jt/tag-following-with-proto-v2-fix'Junio C Hamano Wed, 15 Aug 2018 22:08:25 +0000 (15:08 -0700)

Merge branch 'jt/tag-following-with-proto-v2-fix'

The wire-protocol v2 relies on the client to send "ref prefixes" to
limit the bandwidth spent on the initial ref advertisement. "git
fetch $remote branch:branch" that asks tags that point into the
history leading to the "branch" automatically followed sent to
narrow prefix and broke the tag following, which has been fixed.

* jt/tag-following-with-proto-v2-fix:
fetch: send "refs/tags/" prefix upon CLI refspecs
t5702: test fetch with multiple refspecs at a time

Merge branch 'jk/size-t'Junio C Hamano Wed, 15 Aug 2018 22:08:25 +0000 (15:08 -0700)

Merge branch 'jk/size-t'

Code clean-up to use size_t/ssize_t when they are the right type.

* jk/size-t:
strbuf_humanise: use unsigned variables
pass st.st_size as hint for strbuf_readlink()
strbuf_readlink: use ssize_t
strbuf: use size_t for length in intermediate variables
reencode_string: use size_t for string lengths
reencode_string: use st_add/st_mult helpers

Merge branch 'sg/coccicheck-updates'Junio C Hamano Wed, 15 Aug 2018 22:08:25 +0000 (15:08 -0700)

Merge branch 'sg/coccicheck-updates'

Update the way we use Coccinelle to find out-of-style code that
need to be modernised.

* sg/coccicheck-updates:
coccinelle: extract dedicated make target to clean Coccinelle's results
coccinelle: put sane filenames into output patches
coccinelle: exclude sha1dc source files from static analysis
coccinelle: use $(addsuffix) in 'coccicheck' make target
coccinelle: mark the 'coccicheck' make target as .PHONY

Merge branch 'sb/histogram-less-memory'Junio C Hamano Wed, 15 Aug 2018 22:08:25 +0000 (15:08 -0700)

Merge branch 'sb/histogram-less-memory'

"git diff --histogram" had a bad memory usage pattern, which has
been rearranged to reduce the peak usage.

* sb/histogram-less-memory:
xdiff/histogram: remove tail recursion
xdiff/xhistogram: move index allocation into find_lcs
xdiff/xhistogram: factor out memory cleanup into free_index()
xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diff

Merge branch 'nd/i18n'Junio C Hamano Wed, 15 Aug 2018 22:08:23 +0000 (15:08 -0700)

Merge branch 'nd/i18n'

Many more strings are prepared for l10n.

* nd/i18n: (23 commits)
transport-helper.c: mark more strings for translation
transport.c: mark more strings for translation
sha1-file.c: mark more strings for translation
sequencer.c: mark more strings for translation
replace-object.c: mark more strings for translation
refspec.c: mark more strings for translation
refs.c: mark more strings for translation
pkt-line.c: mark more strings for translation
object.c: mark more strings for translation
exec-cmd.c: mark more strings for translation
environment.c: mark more strings for translation
dir.c: mark more strings for translation
convert.c: mark more strings for translation
connect.c: mark more strings for translation
config.c: mark more strings for translation
commit-graph.c: mark more strings for translation
builtin/replace.c: mark more strings for translation
builtin/pack-objects.c: mark more strings for translation
builtin/grep.c: mark strings for translation
builtin/config.c: mark more strings for translation
...

Merge branch 'hs/gpgsm'Junio C Hamano Wed, 15 Aug 2018 22:08:23 +0000 (15:08 -0700)

Merge branch 'hs/gpgsm'

Teach "git tag -s" etc. a few configuration variables (gpg.format
that can be set to "openpgp" or "x509", and gpg.<format>.program
that is used to specify what program to use to deal with the format)
to allow x.509 certs with CMS via "gpgsm" to be used instead of
openpgp via "gnupg".

* hs/gpgsm:
gpg-interface t: extend the existing GPG tests with GPGSM
gpg-interface: introduce new signature format "x509" using gpgsm
gpg-interface: introduce new config to select per gpg format program
gpg-interface: do not hardcode the key string len anymore
gpg-interface: introduce an abstraction for multiple gpg formats
t/t7510: check the validation of the new config gpg.format
gpg-interface: add new config to select how to sign a commit

Merge branch 'bw/clone-ref-prefixes'Junio C Hamano Wed, 15 Aug 2018 22:08:23 +0000 (15:08 -0700)

Merge branch 'bw/clone-ref-prefixes'

The wire-protocol v2 relies on the client to send "ref prefixes" to
limit the bandwidth spent on the initial ref advertisement. "git
clone" when learned to speak v2 forgot to do so, which has been
corrected.

* bw/clone-ref-prefixes:
clone: send ref-prefixes when using protocol v2

Merge branch 'jk/core-use-replace-refs'Junio C Hamano Wed, 15 Aug 2018 22:08:22 +0000 (15:08 -0700)

Merge branch 'jk/core-use-replace-refs'

A new configuration variable core.usereplacerefs has been added,
primarily to help server installations that want to ignore the
replace mechanism altogether.

* jk/core-use-replace-refs:
add core.usereplacerefs config option
check_replace_refs: rename to read_replace_refs
check_replace_refs: fix outdated comment

Merge branch 'jh/json-writer'Junio C Hamano Wed, 15 Aug 2018 22:08:22 +0000 (15:08 -0700)

Merge branch 'jh/json-writer'

Preparatory code to later add json output for telemetry data.

* jh/json-writer:
json_writer: new routines to create JSON data

Merge branch 'bb/make-developer-pedantic'Junio C Hamano Wed, 15 Aug 2018 22:08:22 +0000 (15:08 -0700)

Merge branch 'bb/make-developer-pedantic'

"make DEVELOPER=1 DEVOPTS=pedantic" allows developers to compile
with -pedantic option, which may catch more problematic program
constructs and potential bugs.

* bb/make-developer-pedantic:
Makefile: add a DEVOPTS flag to get pedantic compilation

Merge branch 'es/diff-color-moved-fix'Junio C Hamano Wed, 15 Aug 2018 22:08:22 +0000 (15:08 -0700)

Merge branch 'es/diff-color-moved-fix'

One of the "diff --color-moved" mode "dimmed_zebra" that was named
in an unusual way has been deprecated and replaced by
"dimmed-zebra".

* es/diff-color-moved-fix:
diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"

Merge branch 'bw/protocol-v2'Junio C Hamano Wed, 15 Aug 2018 22:08:21 +0000 (15:08 -0700)

Merge branch 'bw/protocol-v2'

Doc update.

* bw/protocol-v2:
pack-protocol: mention and point to docs for protocol v2

Merge branch 'sg/travis-cocci-diagnose-failure'Junio C Hamano Wed, 15 Aug 2018 22:08:21 +0000 (15:08 -0700)

Merge branch 'sg/travis-cocci-diagnose-failure'

Update the way we run static analysis tool at TravisCI to make it
easier to use its findings.

* sg/travis-cocci-diagnose-failure:
travis-ci: fail if Coccinelle static analysis found something to transform
travis-ci: run Coccinelle static analysis with two parallel jobs

Merge branch 'js/t7406-recursive-submodule-update-order... Junio C Hamano Wed, 15 Aug 2018 22:08:21 +0000 (15:08 -0700)

Merge branch 'js/t7406-recursive-submodule-update-order-fix'

Test fix.

* js/t7406-recursive-submodule-update-order-fix:
t7406: avoid failures solely due to timing issues

Merge branch 'bw/fetch-pack-i18n'Junio C Hamano Wed, 15 Aug 2018 22:08:20 +0000 (15:08 -0700)

Merge branch 'bw/fetch-pack-i18n'

i18n updates.

* bw/fetch-pack-i18n:
fetch-pack: mark die strings for translation

Merge branch 'sg/fast-import-dump-refs-on-checkpoint... Junio C Hamano Wed, 15 Aug 2018 22:08:20 +0000 (15:08 -0700)

Merge branch 'sg/fast-import-dump-refs-on-checkpoint-fix'

Test update.

* sg/fast-import-dump-refs-on-checkpoint-fix:
t9300: wait for background fast-import process to die after killing it

Merge branch 'sb/trailers-docfix'Junio C Hamano Wed, 15 Aug 2018 22:08:19 +0000 (15:08 -0700)

Merge branch 'sb/trailers-docfix'

Doc update.

* sb/trailers-docfix:
Documentation/git-interpret-trailers: explain possible values

Merge branch 'jk/ui-color-always-to-auto'Junio C Hamano Wed, 15 Aug 2018 22:08:19 +0000 (15:08 -0700)

Merge branch 'jk/ui-color-always-to-auto'

Doc formatting fix.

* jk/ui-color-always-to-auto:
Documentation: fix --color option formatting

for_each_*_object: move declarations to object-store.hJeff King Tue, 14 Aug 2018 18:21:18 +0000 (14:21 -0400)

for_each_*_object: move declarations to object-store.h

The for_each_loose_object() and for_each_packed_object()
functions are meant to be part of a unified interface: they
use the same set of for_each_object_flags, and it's not
inconceivable that we might one day add a single
for_each_object() wrapper around them.

Let's put them together in a single file, so we can avoid
awkwardness like saying "the flags for this function are
over in cache.h". Moving the loose functions to packfile.h
is silly. Moving the packed functions to cache.h works, but
makes the "cache.h is a kitchen sink" problem worse. The
best place is the recently-created object-store.h, since
these are quite obviously related to object storage.

The for_each_*_in_objdir() functions do not use the same
flags, but they are logically part of the same interface as
for_each_loose_object(), and share callback signatures. So
we'll move those, as well, as they also make sense in
object-store.h.

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

cat-file: use a single strbuf for all outputJeff King Tue, 14 Aug 2018 18:20:22 +0000 (14:20 -0400)

cat-file: use a single strbuf for all output

When we're in batch mode, we end up in batch_object_write()
for each object, which allocates its own strbuf for each
call. Instead, we can provide a single "scratch" buffer that
gets reused for each output. When running:

git cat-file --batch-all-objects --batch-check='%(objectname)'

on git.git, my best-of-five time drops from:

real 0m0.171s
user 0m0.159s
sys 0m0.012s

to:

real 0m0.133s
user 0m0.121s
sys 0m0.012s

Note that we could do this just by putting the "scratch"
pointer into "struct expand_data", but I chose instead to
add an extra parameter to the callstack. That's more
verbose, but it makes it a bit more obvious what is going
on, which in turn makes it easy to see where we need to be
releasing the string in the caller (right after the loop
which uses it in each case).

Based-on-a-patch-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cat-file: split batch "buf" into two variablesJeff King Tue, 14 Aug 2018 18:18:06 +0000 (14:18 -0400)

cat-file: split batch "buf" into two variables

We use the "buf" strbuf for two things: to read incoming
lines, and as a scratch space for test-expanding the
user-provided format. Let's split this into two variables
with descriptive names, which makes their purpose and
lifetime more clear.

It will also help in a future patch when we start using the
"output" buffer for more expansions.

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

cat-file: use oidset check-and-insertJeff King Tue, 14 Aug 2018 18:14:27 +0000 (14:14 -0400)

cat-file: use oidset check-and-insert

We don't need to check if the oidset has our object before
we insert it; that's done as part of the insertion. We can
just rely on the return value from oidset_insert(), which
saves one hash lookup per object.

This measurable speedup is tiny and within the run-to-run
noise, but the result is simpler to read, too.

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

mingw: enable atomic O_APPENDJohannes Sixt Mon, 13 Aug 2018 19:02:50 +0000 (21:02 +0200)

mingw: enable atomic O_APPEND

The Windows CRT implements O_APPEND "manually": on write() calls, the
file pointer is set to EOF before the data is written. Clearly, this is
not atomic. And in fact, this is the root cause of failures observed in
t5552-skipping-fetch-negotiator.sh and t5503-tagfollow.sh, where
different processes write to the same trace file simultanously; it also
occurred in t5400-send-pack.sh, but there it was worked around in
71406ed4d6 ("t5400: avoid concurrent writes into a trace file",
2017-05-18).

Fortunately, Windows does support atomic O_APPEND semantics using the
file access mode FILE_APPEND_DATA. Provide an implementation that does.

This implementation is minimal in such a way that it only implements
the open modes that are actually used in the Git code base. Emulation
for other modes can be added as necessary later. To become aware of
the necessity early, the unusal error ENOSYS is reported if an
unsupported mode is encountered.

Diagnosed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Jeff Hostetler <git@jeffhostetler.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cat-file: support "unordered" output for --batch-all... Jeff King Fri, 10 Aug 2018 23:24:57 +0000 (19:24 -0400)

cat-file: support "unordered" output for --batch-all-objects

If you're going to access the contents of every object in a
packfile, it's generally much more efficient to do so in
pack order, rather than in hash order. That increases the
locality of access within the packfile, which in turn is
friendlier to the delta base cache, since the packfile puts
related deltas next to each other. By contrast, hash order
is effectively random, since the sha1 has no discernible
relationship to the content.

This patch introduces an "--unordered" option to cat-file
which iterates over packs in pack-order under the hood. You
can see the results when dumping all of the file content:

$ time ./git cat-file --batch-all-objects --buffer --batch | wc -c
6883195596

real 0m44.491s
user 0m42.902s
sys 0m5.230s

$ time ./git cat-file --unordered \
--batch-all-objects --buffer --batch | wc -c
6883195596

real 0m6.075s
user 0m4.774s
sys 0m3.548s

Same output, different order, way faster. The same speed-up
applies even if you end up accessing the object content in a
different process, like:

git cat-file --batch-all-objects --buffer --batch-check |
grep blob |
git cat-file --batch='%(objectname) %(rest)' |
wc -c

Adding "--unordered" to the first command drops the runtime
in git.git from 24s to 3.5s.

Side note: there are actually further speedups available
for doing it all in-process now. Since we are outputting
the object content during the actual pack iteration, we
know where to find the object and could skip the extra
lookup done by oid_object_info(). This patch stops short
of that optimization since the underlying API isn't ready
for us to make those sorts of direct requests.

So if --unordered is so much better, why not make it the
default? Two reasons:

1. We've promised in the documentation that --batch-all-objects
outputs in hash order. Since cat-file is plumbing,
people may be relying on that default, and we can't
change it.

2. It's actually _slower_ for some cases. We have to
compute the pack revindex to walk in pack order. And
our de-duplication step uses an oidset, rather than a
sort-and-dedup, which can end up being more expensive.
If we're just accessing the type and size of each
object, for example, like:

git cat-file --batch-all-objects --buffer --batch-check

my best-of-five warm cache timings go from 900ms to
1100ms using --unordered. Though it's possible in a
cold-cache or under memory pressure that we could do
better, since we'd have better locality within the
packfile.

And one final question: why is it "--unordered" and not
"--pack-order"? The answer is again two-fold:

1. "pack order" isn't a well-defined thing across the
whole set of objects. We're hitting loose objects, as
well as objects in multiple packs, and the only
ordering we're promising is _within_ a single pack. The
rest is apparently random.

2. The point here is optimization. So we don't want to
promise any particular ordering, but only to say that
we will choose an ordering which is likely to be
efficient for accessing the object content. That leaves
the door open for further changes in the future without
having to add another compatibility option.

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

cat-file: rename batch_{loose,packed}_object callbacksJeff King Fri, 10 Aug 2018 23:17:14 +0000 (19:17 -0400)

cat-file: rename batch_{loose,packed}_object callbacks

We're not really doing the batch-show operation in these
callbacks, but just collecting the set of objects. That
distinction will become more important in a future patch, so
let's rename them now to avoid cluttering that diff.

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

t1006: test cat-file --batch-all-objects with duplicatesJeff King Fri, 10 Aug 2018 23:16:40 +0000 (19:16 -0400)

t1006: test cat-file --batch-all-objects with duplicates

The test for --batch-all-objects in t1006 covers a variety
of object storage situations, but one thing it doesn't cover
is that we avoid mentioning duplicate objects. We won't have
any because running "git repack -ad" will have packed them
all and deleted the loose ones.

This does work (because we sort and de-dup the output list),
but it's good to include it in our test. And doubly so for
when we add an unordered mode which has to de-dup in a
different way.

Note that we cannot just re-create one of the objects, as
Git will omit the write of an object that is already
present. However, we can create a new pack with one of the
objects, which forces the duplication.

One alternative would be to just use "git repack -a" instead
of "-ad". But then _every_ object would be duplicated as
loose and packed, and we might miss a bug that omits packed
objects (because we'd show their loose counterparts).

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

for_each_packed_object: support iterating in pack-orderJeff King Fri, 10 Aug 2018 23:15:49 +0000 (19:15 -0400)

for_each_packed_object: support iterating in pack-order

We currently iterate over objects within a pack in .idx
order, which uses the object hashes. That means that it
is effectively random with respect to the location of the
object within the pack. If you're going to access the actual
object data, there are two reasons to move linearly through
the pack itself:

1. It improves the locality of access in the packfile. In
the cold-cache case, this may mean fewer disk seeks, or
better usage of disk cache.

2. We store related deltas together in the packfile. Which
means that the delta base cache can operate much more
efficiently if we visit all of those related deltas in
sequence, as the earlier items are likely to still be
in the cache. Whereas if we visit the objects in
random order, our cache entries are much more likely to
have been evicted by unrelated deltas in the meantime.

So in general, if you're going to access the object contents
pack order is generally going to end up more efficient.

But if you're simply generating a list of object names, or
if you're going to end up sorting the result anyway, you're
better off just using the .idx order, as finding the pack
order means generating the in-memory pack-revindex.
According to the numbers in 8b8dfd5132 (pack-revindex:
radix-sort the revindex, 2013-07-11), that takes about 200ms
for linux.git, and 20ms for git.git (those numbers are a few
years old but are still a good ballpark).

That makes it a good optimization for some cases (we can
save tens of seconds in git.git by having good locality of
delta access, for a 20ms cost), but a bad one for others
(e.g., right now "cat-file --batch-all-objects
--batch-check="%(objectname)" is 170ms in git.git, so adding
20ms to that is noticeable).

Hence this patch makes it an optional flag. You can't
actually do any interesting timings yet, as it's not plumbed
through to any user-facing tools like cat-file. That will
come in a later patch.

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

for_each_*_object: give more comprehensive docstringsJeff King Fri, 10 Aug 2018 23:11:14 +0000 (19:11 -0400)

for_each_*_object: give more comprehensive docstrings

We already mention the local/alternate behavior of these
functions, but we can help clarify a few other behaviors:

- there's no need to mention LOCAL_ONLY specifically, since
we already reference the flags by type (and as we add
more flags, we don't want to have to mention each)

- clarify that reachability doesn't matter here; this is
all accessible objects

- what ordering/uniqueness guarantees we give

- how pack-specific flags are handled for the loose case

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

for_each_*_object: take flag arguments as enumJeff King Fri, 10 Aug 2018 23:09:44 +0000 (19:09 -0400)

for_each_*_object: take flag arguments as enum

It's not wrong to pass our flags in an "unsigned", as we
know it will be at least as large as the enum. However,
using the enum in the declaration makes it more obvious
where to find the list of flags.

While we're here, let's also drop the "extern" noise-words
from the declarations, per our modern coding style.

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

for_each_*_object: store flag definitions in a single... Jeff King Fri, 10 Aug 2018 23:09:06 +0000 (19:09 -0400)

for_each_*_object: store flag definitions in a single location

These flags were split between cache.h and packfile.h,
because some of the flags apply only to packs. However, they
share a single numeric namespace, since both are respected
for the packed variant. Let's make sure they're defined
together so that nobody accidentally adds a new flag in one
location that duplicates the other.

While we're here, let's also put them in an enum (which
helps debugger visibility) and use "(1<<n)" rather than
counting powers of 2 manually.

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

pull doc: fix a long-standing grammar errorÆvar Arnfjörð Bjarmason Mon, 13 Aug 2018 19:22:49 +0000 (19:22 +0000)

pull doc: fix a long-standing grammar error

It should be "is not an empty string" not "is not empty string". This
fixes wording originally introduced in ab9b31386b ("Documentation:
multi-head fetch.", 2005-08-24).

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

fetch tests: correct a comment "remove it" -> "remove... Ævar Arnfjörð Bjarmason Mon, 13 Aug 2018 19:22:48 +0000 (19:22 +0000)

fetch tests: correct a comment "remove it" -> "remove them"

Correct a comment referring to the removal of just the branch to also
refer to the tag. This should have been changed in my
ca3065e7e7 ("fetch tests: add a tag to be deleted to the pruning
tests", 2018-02-09) when the tag deletion was added, but I missed it
at the time.

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

mergetool: don't suggest to continue after last fileNicholas Guriev Mon, 13 Aug 2018 05:09:29 +0000 (08:09 +0300)

mergetool: don't suggest to continue after last file

Eliminate an unnecessary prompt to continue after failed merger, by
not calling the prompt_after_failed_merge function when only one
iteration remains.

Uses positional parameters to count files in the list to make it
easier to see if we have any more paths to process from within the
loop.

Signed-off-by: Nicholas Guriev <guriev-ns@ya.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5318: avoid unnecessary command substitutionsSZEDER Gábor Mon, 13 Aug 2018 00:30:10 +0000 (02:30 +0200)

t5318: avoid unnecessary command substitutions

Two tests added in dade47c06c (commit-graph: add repo arg to graph
readers, 2018-07-11) prepare the contents of 'expect' files by
'echo'ing the results of command substitutions. That's unncessary,
avoid them by directly saving the output of the commands executed in
those command substitutions.

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

t5318: use 'test_cmp_bin' to compare commit-graph filesSZEDER Gábor Mon, 13 Aug 2018 11:52:43 +0000 (13:52 +0200)

t5318: use 'test_cmp_bin' to compare commit-graph files

The commit-graph files are binary files, so they should not be
compared with 'test_cmp', because that might cause issues like
crashing[1] or infinite loop[2] on Windows, where 'test_cmp' is a
shell function to deal with random LF-CRLF conversions[3].

Use 'test_cmp_bin' instead.

1 - b93e6e3663 (t5000, t5003: do not use test_cmp to compare binary
files, 2014-06-04)
2 - f9f3851b4d (t9300: use test_cmp_bin instead of test_cmp to compare
binary files, 2014-09-12)
3 - 4d715ac05c (Windows: a test_cmp that is agnostic to random LF <>
CRLF conversions, 2013-10-26)

Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5552: suppress upload-pack trace outputJeff King Fri, 10 Aug 2018 14:09:08 +0000 (10:09 -0400)

t5552: suppress upload-pack trace output

The t5552 test script uses GIT_TRACE_PACKET to monitor what
git-fetch sends and receives. However, because we're
accessing a local repository, the child upload-pack also
sends trace output to the same file.

On Linux, this works out OK. We open the trace file with
O_APPEND, so all writes are atomically positioned at the end
of the file. No data can be overwritten or omitted. And
since we prepare our small writes in a strbuf and write them
with a single write(), we should see each line as an atomic
unit. The order of lines between the two processes is
undefined, but the test script greps only for "fetch>" or
"fetch<" lines. So under Linux, the test results are
deterministic.

The test fails intermittently on Windows, however,
reportedly even overwriting bits of the output file (i.e.,
O_APPEND does not seem to give us an atomic position+write).

Since the test only cares about the trace output from fetch,
we can just disable the output from upload-pack. That
doesn't solve the greater question of O_APPEND/trace issues
under Windows, but it easily fixes the flakiness from this
test.

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

gpg-interface: propagate exit status from gpg back... Junio C Hamano Thu, 9 Aug 2018 18:40:27 +0000 (11:40 -0700)

gpg-interface: propagate exit status from gpg back to the callers

When gpg-interface API unified support for signature verification
codepaths for signed tags and signed commits in mid 2015 at around
v2.6.0-rc0~114, we accidentally loosened the GPG signature
verification.

Before that change, signed commits were verified by looking for
"G"ood signature from GPG, while ignoring the exit status of "gpg
--verify" process, while signed tags were verified by simply passing
the exit status of "gpg --verify" through. The unified code we
currently have ignores the exit status of "gpg --verify" and returns
successful verification when the signature matches an unexpired key
regardless of the trust placed on the key (i.e. in addition to "G"ood
ones, we accept "U"ntrusted ones).

Make these commands signal failure with their exit status when
underlying "gpg --verify" (or the custom command specified by
"gpg.program" configuration variable) does so. This essentially
changes their behaviour in a backward incompatible way to reject
signatures that have been made with untrusted keys even if they
correctly verify, as that is how "gpg --verify" behaves.

Note that the code still overrides a zero exit status obtained from
"gpg" (or gpg.program) if the output does not say the signature is
good or computes correctly but made with untrusted keys, to catch
a poorly written wrapper around "gpg" the user may give us.

We could exclude "U"ntrusted support from this fallback code, but
that would be making two backward incompatible changes in a single
commit, so let's avoid that for now. A follow-up change could do so
if desired.

Helped-by: Vojtech Myslivec <vojtech.myslivec@nic.cz>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase --exec: make it work with --rebase-mergesJohannes Schindelin Thu, 9 Aug 2018 09:41:11 +0000 (02:41 -0700)

rebase --exec: make it work with --rebase-merges

The idea of `--exec` is to append an `exec` call after each `pick`.

Since the introduction of fixup!/squash! commits, this idea was extended
to apply to "pick, possibly followed by a fixup/squash chain", i.e. an
exec would not be inserted between a `pick` and any of its corresponding
`fixup` or `squash` lines.

The current implementation uses a dirty trick to achieve that: it
assumes that there are only pick/fixup/squash commands, and then
*inserts* the `exec` lines before any `pick` but the first, and appends
a final one.

With the todo lists generated by `git rebase --rebase-merges`, this
simple implementation shows its problems: it produces the exact wrong
thing when there are `label`, `reset` and `merge` commands.

Let's change the implementation to do exactly what we want: look for
`pick` lines, skip any fixup/squash chains, and then insert the `exec`
line. Lather, rinse, repeat.

Note: we take pains to insert *before* comment lines whenever possible,
as empty commits are represented by commented-out pick lines (and we
want to insert a preceding pick's exec line *before* such a line, not
afterward).

While at it, also add `exec` lines after `merge` commands, because they
are similar in spirit to `pick` commands: they add new commits.

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

update-index: there no longer is `apply --index-info`Junio C Hamano Wed, 8 Aug 2018 21:35:18 +0000 (14:35 -0700)

update-index: there no longer is `apply --index-info`

Back when we removed `git apply --index-info` in 2007, we forgot to
adjust the documentation for update-index that reads its output.

Let's reorder the description of three formats to present the other
two formats that are still generated by git commands before this
format, and stop mentioning `git apply --index-info`.

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

git-update-index.txt: reword possibly confusing exampleElijah Newren Wed, 8 Aug 2018 20:28:07 +0000 (13:28 -0700)

git-update-index.txt: reword possibly confusing example

The following phrase could be interpreted multiple ways:
"To pretend you have a file with mode and sha1 at path"

In particular, I can think of two:
1. Pretend we have some new file, which happens to have a given mode
and sha1
2. Pretend one of the files we are already tracking has a different
mode and sha1 than what it really does

I think people could easily assume either case while reading, but the
example command provided doesn't actually handle the first case, which
caused some minor frustration to at least one user. Modify the example
command so that it correctly handles both cases, and re-order the
wording in a way that makes it more likely folks will assume the first
interpretation. I believe the new example shouldn't pose any obstacles
to those wanting the second interpretation (at worst, they pass an
unnecessary extra flag).

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7406: avoid using test_must_fail for commands other... Elijah Newren Wed, 8 Aug 2018 16:31:07 +0000 (09:31 -0700)

t7406: avoid using test_must_fail for commands other than git

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7406: prefer test_* helper functions to test -[feds]Elijah Newren Wed, 8 Aug 2018 16:31:06 +0000 (09:31 -0700)

t7406: prefer test_* helper functions to test -[feds]

test -e, test -s, etc. do not provide nice error messages when we hit
test failures, so use the test_* helper functions from
test-lib-functions.sh.

Also, add test_path_exists() to test-lib-function.sh while at it, so
that we don't need to worry whether submodule/.git is a file or a
directory. It currently is a file with contents of the form
gitdir: ../.git/modules/submodule
but it could be changed in the future to be a directory; this test
only really cares that it exists.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7406: avoid having git commands upstream of a pipeElijah Newren Wed, 8 Aug 2018 16:31:05 +0000 (09:31 -0700)

t7406: avoid having git commands upstream of a pipe

When a git command is on the left side of a pipe, the pipe will swallow
its exit status, preventing us from detecting failures in said commands.
Restructure the tests to put the output in a temporary file to avoid
this problem.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7406: simplify by using diff --name-only instead of... Elijah Newren Wed, 8 Aug 2018 16:31:04 +0000 (09:31 -0700)

t7406: simplify by using diff --name-only instead of diff --raw

We can get rid of some quoted tabs and make a few tests slightly easier
to read and edit by just asking for the names of the files modified,
since that's all these tests were interested in anyway.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7406: fix call that was failing for the wrong reasonElijah Newren Wed, 8 Aug 2018 16:31:03 +0000 (09:31 -0700)

t7406: fix call that was failing for the wrong reason

A test making use of test_must_fail was failing like this:
fatal: ambiguous argument '|': unknown revision or path not in the working tree.
when the intent was to verify that a specific string was not found
in the output of the git diff command, i.e. that grep returned
non-zero. Fix the test to do that.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: remove spurious periodJohannes Schindelin Wed, 8 Aug 2018 11:50:00 +0000 (04:50 -0700)

remote-curl: remove spurious period

We should not interrupt. sentences in the middle.

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

git-compat-util.h: fix typoJohannes Schindelin Wed, 8 Aug 2018 11:49:58 +0000 (04:49 -0700)

git-compat-util.h: fix typo

The words "save" and "safe" are both very wonderful words, each with
their own set of meanings. Let's not confuse them with one another save
on occasion of a pun.

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

git-instaweb: fix apache2 config with apache >= 2.4Sebastian Kisela Tue, 7 Aug 2018 07:25:48 +0000 (09:25 +0200)

git-instaweb: fix apache2 config with apache >= 2.4

The generated apache2 config fails with apache >= 2.4. The error log
states:

AH00136: Server MUST relinquish startup privileges before accepting
connections. Please ensure mod_unixd or other system security
module is loaded.
AH00016: Configuration Failed

Fix this by loading the unixd module. This works with older httpd as
well, so no IfVersion conditional is needed. (Tested with httpd-2.2.15
on CentOS-6.)

Written with assistance of Todd Zullinger <tmz@pobox.com>

Signed-off-by: Sebastian Kisela <skisela@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-instaweb: support Fedora/Red Hat apache module... Sebastian Kisela Wed, 8 Aug 2018 08:49:18 +0000 (10:49 +0200)

git-instaweb: support Fedora/Red Hat apache module path

On Fedora-derived systems, the apache httpd package installs modules
under /usr/lib{,64}/httpd/modules, depending on whether the system is
32- or 64-bit. A symlink from /etc/httpd/modules is created which
points to the proper module path. Use it to support apache on Fedora,
CentOS, and Red Hat systems.

Written with assistance of Todd Zullinger <tmz@pobox.com> and
Junio C Hamano <gitster@pobox.com>.

Signed-off-by: Sebastian Kisela <skisela@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>