git
6 years agoMerge branch 'nd/rebase-show-current-patch' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:43 +0000 (13:04 -0800)] 
Merge branch 'nd/rebase-show-current-patch' into jch

The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.

* nd/rebase-show-current-patch:
  rebase: introduce and use pseudo-ref REBASE_HEAD
  rebase: add --show-current-patch
  am: add --show-current-patch

6 years agoMerge branch 'pc/submodule-helper-foreach' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)] 
Merge branch 'pc/submodule-helper-foreach' into jch

* pc/submodule-helper-foreach:
  submodule: port submodule subcommand 'foreach' from shell to C
  submodule foreach: document variable '$displaypath'
  submodule foreach: clarify the '$toplevel' variable documentation
  submodule foreach: document '$sm_path' instead of '$path'
  submodule foreach: correct '$path' in nested submodules from a subdirectory

6 years agoMerge branch 'nd/diff-stat-with-summary' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)] 
Merge branch 'nd/diff-stat-with-summary' into jch

* nd/diff-stat-with-summary:
  diff: add --stat-with-summary
  diff.c: refactor pprint_rename() to use strbuf

6 years agoMerge branch 'bw/c-plus-plus' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:41 +0000 (13:04 -0800)] 
Merge branch 'bw/c-plus-plus' into jch

Avoid using identifiers that clash with C++ keywords.  Even though
it is not a goal to compile Git with C++ compilers, changes like
this help use of code analysis tools that targets C++ on our
codebase.

* bw/c-plus-plus: (37 commits)
  replace: rename 'new' variables
  trailer: rename 'template' variables
  tempfile: rename 'template' variables
  wrapper: rename 'template' variables
  environment: rename 'namespace' variables
  diff: rename 'template' variables
  environment: rename 'template' variables
  init-db: rename 'template' variables
  unpack-trees: rename 'new' variables
  trailer: rename 'new' variables
  submodule: rename 'new' variables
  split-index: rename 'new' variables
  remote: rename 'new' variables
  ref-filter: rename 'new' variables
  read-cache: rename 'new' variables
  line-log: rename 'new' variables
  imap-send: rename 'new' variables
  http: rename 'new' variables
  entry: rename 'new' variables
  diffcore-delta: rename 'new' variables
  ...

6 years agoreplace: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:59 +0000 (10:59 -0800)] 
replace: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotrailer: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:58 +0000 (10:59 -0800)] 
trailer: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotempfile: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:57 +0000 (10:59 -0800)] 
tempfile: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agowrapper: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:56 +0000 (10:59 -0800)] 
wrapper: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoenvironment: rename 'namespace' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:55 +0000 (10:59 -0800)] 
environment: rename 'namespace' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodiff: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:54 +0000 (10:59 -0800)] 
diff: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoenvironment: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:53 +0000 (10:59 -0800)] 
environment: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoinit-db: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:52 +0000 (10:59 -0800)] 
init-db: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agounpack-trees: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:51 +0000 (10:59 -0800)] 
unpack-trees: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotrailer: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:50 +0000 (10:59 -0800)] 
trailer: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agosubmodule: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:49 +0000 (10:59 -0800)] 
submodule: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agosplit-index: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:48 +0000 (10:59 -0800)] 
split-index: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoremote: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:47 +0000 (10:59 -0800)] 
remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoref-filter: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:46 +0000 (10:59 -0800)] 
ref-filter: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoread-cache: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:45 +0000 (10:59 -0800)] 
read-cache: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoline-log: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:44 +0000 (10:59 -0800)] 
line-log: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoimap-send: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:43 +0000 (10:59 -0800)] 
imap-send: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agohttp: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:42 +0000 (10:59 -0800)] 
http: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoentry: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:41 +0000 (10:59 -0800)] 
entry: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodiffcore-delta: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:40 +0000 (10:59 -0800)] 
diffcore-delta: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodiff: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:39 +0000 (10:59 -0800)] 
diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodiff-lib: rename 'new' variable
Brandon Williams [Wed, 14 Feb 2018 18:59:38 +0000 (10:59 -0800)] 
diff-lib: rename 'new' variable

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocommit: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:37 +0000 (10:59 -0800)] 
commit: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocombine-diff: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:36 +0000 (10:59 -0800)] 
combine-diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoremote: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:35 +0000 (10:59 -0800)] 
remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoreflog: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:34 +0000 (10:59 -0800)] 
reflog: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agopack-redundant: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:33 +0000 (10:59 -0800)] 
pack-redundant: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agohelp: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:32 +0000 (10:59 -0800)] 
help: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agocheckout: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:31 +0000 (10:59 -0800)] 
checkout: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoapply: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:30 +0000 (10:59 -0800)] 
apply: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoapply: rename 'try' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:29 +0000 (10:59 -0800)] 
apply: rename 'try' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agodiff: rename 'this' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:28 +0000 (10:59 -0800)] 
diff: rename 'this' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'bw/protocol-v2' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:52 +0000 (13:18 -0800)] 
Merge branch 'bw/protocol-v2' into jch

The beginning of the next-gen transfer protocol.

* bw/protocol-v2: (35 commits)
  remote-curl: don't request v2 when pushing
  remote-curl: implement stateless-connect command
  http: don't always add Git-Protocol header
  http: allow providing extra headers for http requests
  remote-curl: store the protocol version the server responded with
  remote-curl: create copy of the service name
  pkt-line: add packet_buf_write_len function
  transport-helper: introduce stateless-connect
  transport-helper: refactor process_connect_service
  transport-helper: remove name parameter
  connect: don't request v2 when pushing
  connect: refactor git_connect to only get the protocol version once
  fetch-pack: support shallow requests
  upload-pack: support shallow requests
  fetch-pack: perform a fetch using v2
  upload-pack: introduce fetch server command
  push: pass ref patterns when pushing
  fetch: pass ref patterns when fetching
  ls-remote: pass ref patterns when requesting a remote's refs
  transport: convert transport_get_remote_refs to take a list of ref patterns
  ...

6 years agoMerge branch 'nd/worktree-move' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)] 
Merge branch 'nd/worktree-move' into jch

"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()

6 years agoMerge branch 'xz/send-email-batch-size' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)] 
Merge branch 'xz/send-email-batch-size' into jch

"git send-email" learned to complain when the batch-size option is
not defined when the relogin-delay option is, since these two are
mutually required.

* xz/send-email-batch-size:
  send-email: error out when relogin delay is missing

6 years agoMerge branch 'cl/send-email-reply-to' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)] 
Merge branch 'cl/send-email-reply-to' into jch

"git send-email" learned "--reply-to=<address>" option.

* cl/send-email-reply-to:
  send-email: support separate "Reply-To" address
  send-email: rename variables for "In-reply-to" to $foo_in_reply_to

6 years agoMerge branch 'sg/travis-build-during-script-phase' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)] 
Merge branch 'sg/travis-build-during-script-phase' into jch

So... what do we want to do with this thing?

* sg/travis-build-during-script-phase:
  travis-ci: build Git during the 'script' phase

6 years agoMerge branch 'jh/status-no-ahead-behind' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:49 +0000 (13:18 -0800)] 
Merge branch 'jh/status-no-ahead-behind' into jch

"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.

At v5; is this ready for 'next'?

* jh/status-no-ahead-behind:
  status: support --no-ahead-behind in long format
  status: update short status to respect --no-ahead-behind
  status: add --[no-]ahead-behind to status and commit for V2 format.
  stat_tracking_info: return +1 when branches not equal

6 years agoMerge branch 'bw/doc-submodule-recurse-config-with-clone' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:48 +0000 (13:18 -0800)] 
Merge branch 'bw/doc-submodule-recurse-config-with-clone' into jch

* bw/doc-submodule-recurse-config-with-clone:
  submodule: indicate that 'submodule.recurse' doesn't apply to clone

6 years ago### match next
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)] 
### match next

6 years agoMerge branch 'nd/am-quit' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)] 
Merge branch 'nd/am-quit' into jch

"git am" has learned "--quit" option, in addition to the existing
"--abort" option; having the pair mirrors a few other commands like
"rebase" and "cherry-pick".

* nd/am-quit:
  am: support --quit

6 years agoMerge branch 'es/worktree-add-post-checkout-hook' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)] 
Merge branch 'es/worktree-add-post-checkout-hook' into jch

"git worktree add" learned to run the post-checkout hook, just like
"git clone" runs it upon the initial checkout.

* es/worktree-add-post-checkout-hook:
  worktree: add: fix 'post-checkout' not knowing new worktree location

6 years agoMerge branch 'sb/status-doc-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)] 
Merge branch 'sb/status-doc-fix' into jch

Docfix.

* sb/status-doc-fix:
  Documentation/git-status: clarify status table for porcelain mode

6 years agoMerge branch 'tk/apply-dev-null-verify-name-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:48 +0000 (12:46 -0800)] 
Merge branch 'tk/apply-dev-null-verify-name-fix' into jch

Many places in "git apply" knew that "/dev/null" that signals
"there is no such file on this side of the diff" can be followed by
whitespace and garbage when parsing a patch, except for one, which
made an otherwise valid patch (e.g. ones from subversion) rejected.

* tk/apply-dev-null-verify-name-fix:
  apply: handle Subversion diffs with /dev/null gracefully
  apply: demonstrate a problem applying svn diffs

6 years agoMerge branch 'gs/test-unset-xdg-cache-home' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:47 +0000 (12:46 -0800)] 
Merge branch 'gs/test-unset-xdg-cache-home' into jch

* gs/test-unset-xdg-cache-home:
  test-lib.sh: unset XDG_CACHE_HOME

6 years agoMerge branch 'tg/worktree-create-tracking' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)] 
Merge branch 'tg/worktree-create-tracking' into jch

Hotfix for a recent topic.

* tg/worktree-create-tracking:
  git-worktree.txt: fix indentation of example and text of 'add' command
  git-worktree.txt: fix missing ")" typo

6 years agoMerge branch 'tz/do-not-clean-spec-file' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)] 
Merge branch 'tz/do-not-clean-spec-file' into jch

We no longer create any *.spec file, so "make clean" should not
remove it.

* tz/do-not-clean-spec-file:
  Makefile: remove *.spec from clean target

6 years agoMerge branch 'jk/push-options-via-transport-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:44 +0000 (12:46 -0800)] 
Merge branch 'jk/push-options-via-transport-fix' into jch

"git push" over http transport did not unquote the push-options
correctly.

* jk/push-options-via-transport-fix:
  remote-curl: unquote incoming push-options
  t5545: factor out http repository setup

6 years agoMerge branch 'bp/fsmonitor' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:43 +0000 (12:46 -0800)] 
Merge branch 'bp/fsmonitor' into jch

Doc update for a recently added feature.

* bp/fsmonitor:
  fsmonitor: update documentation to remove reference to invalid config settings

6 years agoMerge branch 'jk/sq-dequote-on-bogus-input' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:42 +0000 (12:46 -0800)] 
Merge branch 'jk/sq-dequote-on-bogus-input' into jch

Code to unquote single-quoted string (used in the parser for
configuration files, etc.) did not diagnose bogus input correctly
and produced bogus results instead.

* jk/sq-dequote-on-bogus-input:
  sq_dequote: fix extra consumption of source string

6 years agoMerge branch 'jk/test-hashmap-updates' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'jk/test-hashmap-updates' into jch

Code clean-up.

* jk/test-hashmap-updates:
  test-hashmap: use "unsigned int" for hash storage
  test-hashmap: simplify alloc_test_entry
  test-hashmap: use strbuf_getline rather than fgets
  test-hashmap: use xsnprintf rather than snprintf
  test-hashmap: check allocation computation for overflow
  test-hashmap: use ALLOC_ARRAY rather than bare malloc

6 years agoMerge branch 'rd/typofix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'rd/typofix' into jch

Typofix.

* rd/typofix:
  Correct mispellings of ".gitmodule" to ".gitmodules"
  t/: correct obvious typo "detahced"

6 years agoMerge branch 'bc/doc-interpret-trailers-grammofix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'bc/doc-interpret-trailers-grammofix' into jch

Docfix.

* bc/doc-interpret-trailers-grammofix:
  docs/interpret-trailers: fix agreement error

6 years agoMerge branch 'as/ll-i18n' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:40 +0000 (12:46 -0800)] 
Merge branch 'as/ll-i18n' into jch

Some messages in low level start-up codepath have been i18n-ized.

* as/ll-i18n:
  Mark messages for translations

6 years agoMerge branch 'sg/doc-test-must-fail-args' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:39 +0000 (12:46 -0800)] 
Merge branch 'sg/doc-test-must-fail-args' into jch

Devdoc update.

* sg/doc-test-must-fail-args:
  t: document 'test_must_fail ok=<signal-name>'

6 years agoMerge branch 'sb/describe-blob' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:38 +0000 (12:46 -0800)] 
Merge branch 'sb/describe-blob' into jch

"git describe $garbage" stopped giving any errors when the garbage
happens to be a string with 40 hexadecimal letters.

* sb/describe-blob:
  describe: confirm that blobs actually exist

6 years agoMerge branch 'rs/check-ignore-multi' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)] 
Merge branch 'rs/check-ignore-multi' into jch

"git check-ignore" with multiple paths got confused when one is a
file and the other is a directory, which has been fixed.

* rs/check-ignore-multi:
  check-ignore: fix mix of directories and other file types

6 years agoMerge branch 'rj/sparse-updates' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)] 
Merge branch 'rj/sparse-updates' into jch

Devtool update.

* rj/sparse-updates:
  Makefile: suppress a sparse warning for pack-revindex.c
  config.mak.uname: remove SPARSE_FLAGS setting for cygwin

6 years agoMerge branch 'jk/t0002-simplify' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'jk/t0002-simplify' into jch

Code cleanup.

* jk/t0002-simplify:
  t0002: simplify error checking

6 years agoMerge branch 'ab/untracked-cache-invalidation-docs' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'ab/untracked-cache-invalidation-docs' into jch

Doc update to warn against remaining bugs in untracked cache.

* ab/untracked-cache-invalidation-docs:
  update-index doc: note the caveat with "could not open..."
  update-index doc: note a fixed bug in the untracked cache

6 years agoMerge branch 'js/packet-read-line-check-null' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'js/packet-read-line-check-null' into jch

Some low level protocol codepath could crash when they get an
unexpected flush packet, which is now fixed.

* js/packet-read-line-check-null:
  always check for NULL return from packet_read_line()
  correct error messages for NULL packet_read_line()

6 years agoMerge branch 'js/fix-merge-arg-quoting-in-rebase-p' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'js/fix-merge-arg-quoting-in-rebase-p' into jch

"git rebase -p" mangled log messages of a merge commit, which is
now fixed.

* js/fix-merge-arg-quoting-in-rebase-p:
  rebase -p: fix incorrect commit message when calling `git merge`.

6 years agoMerge branch 'jk/gettext-poison' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'jk/gettext-poison' into jch

Test updates.

* jk/gettext-poison:
  git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME
  t0205: drop redundant test

6 years agoMerge branch 'jk/doc-do-not-write-extern' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'jk/doc-do-not-write-extern' into jch

Devdoc update.

* jk/doc-do-not-write-extern:
  CodingGuidelines: mention "static" and "extern"

6 years agoMerge branch 'bp/name-hash-dirname-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:34 +0000 (12:46 -0800)] 
Merge branch 'bp/name-hash-dirname-fix' into jch

"git add" files in the same directory, but spelling the directory
path in different cases on case insensitive filesystem, corrupted
the name hash data structure and led to unexpected results.  This
has been corrected.

* bp/name-hash-dirname-fix:
  name-hash: properly fold directory names in adjust_dirname_case()

6 years agoMerge branch 'jc/blame-missing-path' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)] 
Merge branch 'jc/blame-missing-path' into jch

"git blame HEAD COPYING" in a bare repository failed to run, while
"git blame HEAD -- COPYING" run just fine.  This has been corrected.

* jc/blame-missing-path:
  blame: tighten command line parser

6 years agoMerge branch 'nd/fix-untracked-cache-invalidation' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)] 
Merge branch 'nd/fix-untracked-cache-invalidation' into jch

Some bugs around "untracked cache" feature have been fixed.

Seems to uncover bad untracked cache information a bit too loudly,
for which there is ab/untracked-cache-invalidation-docs topic.
cf. <87d11omi2o.fsf@evledraar.gmail.com>

* nd/fix-untracked-cache-invalidation:
  dir.c: ignore paths containing .git when invalidating untracked cache
  dir.c: stop ignoring opendir() error in open_cached_dir()
  dir.c: fix missing dir invalidation in untracked code
  dir.c: avoid stat() in valid_cached_dir()
  status: add a failing test showing a core.untrackedCache bug

6 years agoMerge branch 'jt/binsearch-with-fanout' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:32 +0000 (12:46 -0800)] 
Merge branch 'jt/binsearch-with-fanout' into jch

Refactor the code to binary search starting from a fan-out table
(which is how the packfile is indexed with object names) into a
reusable helper.

* jt/binsearch-with-fanout:
  packfile: refactor hash search with fanout table
  packfile: remove GIT_DEBUG_LOOKUP log statements

6 years agoFourth batch for 2.17
Junio C Hamano [Wed, 21 Feb 2018 20:45:35 +0000 (12:45 -0800)] 
Fourth batch for 2.17

6 years agoMerge branch 'sg/test-i18ngrep'
Junio C Hamano [Wed, 21 Feb 2018 20:45:05 +0000 (12:45 -0800)] 
Merge branch 'sg/test-i18ngrep'

Test fixes.

* sg/test-i18ngrep:
  t: make 'test_i18ngrep' more informative on failure
  t: validate 'test_i18ngrep's parameters
  t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh'
  t5536: let 'test_i18ngrep' read the file without redirection
  t5510: consolidate 'grep' and 'test_i18ngrep' patterns
  t4001: don't run 'git status' upstream of a pipe
  t6022: don't run 'git merge' upstream of a pipe
  t5812: add 'test_i18ngrep's missing filename parameter
  t5541: add 'test_i18ngrep's missing filename parameter

6 years agoMerge branch 'gs/rebase-allow-empty-message'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'gs/rebase-allow-empty-message'

"git rebase" learned to take "--allow-empty-message" option.

* gs/rebase-allow-empty-message:
  rebase: add --allow-empty-message option

6 years agoMerge branch 'lw/daemon-log-destination'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'lw/daemon-log-destination'

The log from "git daemon" can be redirected with a new option; one
relevant use case is to send the log to standard error (instead of
syslog) when running it from inetd.

* lw/daemon-log-destination:
  daemon: add --log-destination=(stderr|syslog|none)

6 years agoMerge branch 'nd/format-patch-stat-width'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'nd/format-patch-stat-width'

"git format-patch" learned to give 72-cols to diffstat, which is
consistent with other line length limits the subcommand uses for
its output meant for e-mails.

* nd/format-patch-stat-width:
  format-patch: reduce patch diffstat width to 72
  format-patch: keep cover-letter diffstat wrapped in 72 columns

6 years agosubmodule: indicate that 'submodule.recurse' doesn't apply to clone
Brandon Williams [Tue, 20 Feb 2018 20:29:22 +0000 (12:29 -0800)] 
submodule: indicate that 'submodule.recurse' doesn't apply to clone

Update the documentation for the 'submodule.recurse' config to identify
that the clone command does not respect it.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoremote-curl: unquote incoming push-options
Jeff King [Mon, 19 Feb 2018 19:50:14 +0000 (14:50 -0500)] 
remote-curl: unquote incoming push-options

The transport-helper protocol c-style quotes the value of
any options passed to the helper via the "option <key> <value>"
directive. However, remote-curl doesn't actually unquote the
push-option values, meaning that we will send the quoted
version to the other side (whereas git-over-ssh would send
the raw value).

The pack-protocol.txt documentation defines the push-options
as a series of VCHARs, which excludes most characters that
would need quoting. But:

  1. You can still see the bug with a valid push-option that
     starts with a double-quote (since that triggers
     quoting).

  2. We do currently handle any non-NUL characters correctly
     in git-over-ssh. So even though the spec does not say
     that we need to handle most quoted characters, it's
     nice if our behavior is consistent between protocols.

There are two new tests: the "direct" one shows that this
already works in the non-http case, and the http one covers
this bugfix.

Reported-by: Jon Simons <jon@jonsimons.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agot5545: factor out http repository setup
Jeff King [Mon, 19 Feb 2018 19:48:44 +0000 (14:48 -0500)] 
t5545: factor out http repository setup

We repeat many lines of setup code in the two http tests,
and further tests would need to repeat it again.  Let's
factor this out into a function.

Incidentally, this also fixes an unlikely bug: if the httpd
root path contains a double-quote, our test_when_finished
would barf due to improper quoting (we escape the embedded
quotes, but not the $, meaning we expand the variable before
the eval).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMakefile: remove *.spec from clean target
Todd Zullinger [Sat, 17 Feb 2018 03:06:24 +0000 (22:06 -0500)] 
Makefile: remove *.spec from clean target

Support for generating an rpm was dropped in ab214331cf ("Makefile: stop
pretending to support rpmbuild", 2016-04-04).  We don't generate any
*.spec files so there is no need to clean them up.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-worktree.txt: fix indentation of example and text of 'add' command
Eric Sunshine [Fri, 16 Feb 2018 20:44:52 +0000 (15:44 -0500)] 
git-worktree.txt: fix indentation of example and text of 'add' command

When 4e85333197 (worktree: make add <path> <branch> dwim, 2017-11-26)
added an example command in a literal code block, it neglected to
insert a mandatory "+" line before the block. This omission resulted
in both the literal code block and the (existing) paragraph following
the block to be outdented, even though they should be indented under
the 'add' sub-command along with the rest of the text pertaining to
that command. Furthermore, the mandatory "+" line separating the code
block from the following text got rendered as a leading character on
the line ("+ If <commit-ish>...") rather than being treated as a
formatting directive.

Fix these problems by adding the missing "+" line before the example
code block.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agogit-worktree.txt: fix missing ")" typo
Eric Sunshine [Fri, 16 Feb 2018 20:44:51 +0000 (15:44 -0500)] 
git-worktree.txt: fix missing ")" typo

Add the closing ")" to a parenthetical phrase introduced by 4e85333197
(worktree: make add <path> <branch> dwim, 2017-11-26).

While at it, add a missing ":" at the end of the same sentence since
it precedes an example literal command block.

Reported-by: Mike Nordell <tamlin.thefirst@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agotest-lib.sh: unset XDG_CACHE_HOME
Genki Sky [Fri, 16 Feb 2018 02:46:04 +0000 (21:46 -0500)] 
test-lib.sh: unset XDG_CACHE_HOME

git respects XDG_CACHE_HOME for the credential cache. So, we should
unset XDG_CACHE_HOME for the test environment, lest a user's custom one
cause failure in the test.

For example, t/t0301-credential-cache.sh expects a default directory
to be used if it hasn't explicitly set XDG_CACHE_HOME.

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoSync with 2.16.2
Junio C Hamano [Thu, 15 Feb 2018 23:24:55 +0000 (15:24 -0800)] 
Sync with 2.16.2

* tag 'v2.16.2':
  Git 2.16.2

6 years agoGit 2.16.2 v2.16.2
Junio C Hamano [Thu, 15 Feb 2018 23:21:23 +0000 (15:21 -0800)] 
Git 2.16.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'ab/doc-cat-file-e-still-shows-errors' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:15 +0000 (15:18 -0800)] 
Merge branch 'ab/doc-cat-file-e-still-shows-errors' into maint

Doc update.

* ab/doc-cat-file-e-still-shows-errors:
  cat-file doc: document that -e will return some output

6 years agoMerge branch 'as/read-tree-prefix-doc-fix' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:14 +0000 (15:18 -0800)] 
Merge branch 'as/read-tree-prefix-doc-fix' into maint

Doc update.

* as/read-tree-prefix-doc-fix:
  doc/read-tree: remove obsolete remark

6 years agoMerge branch 'nd/add-i-ignore-submodules' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:13 +0000 (15:18 -0800)] 
Merge branch 'nd/add-i-ignore-submodules' into maint

"git add -p" was taught to ignore local changes to submodules as
they do not interfere with the partial addition of regular changes
anyway.

* nd/add-i-ignore-submodules:
  add--interactive: ignore submodule changes except HEAD

6 years agoMerge branch 'tg/stash-with-pathspec-fix' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:13 +0000 (15:18 -0800)] 
Merge branch 'tg/stash-with-pathspec-fix' into maint

"git stash -- <pathspec>" incorrectly blew away untracked files in
the directory that matched the pathspec, which has been corrected.

* tg/stash-with-pathspec-fix:
  stash: don't delete untracked files that match pathspec

6 years agoMerge branch 'jk/abort-clone-with-existing-dest' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:12 +0000 (15:18 -0800)] 
Merge branch 'jk/abort-clone-with-existing-dest' into maint

"git clone $there $here" is allowed even when here directory exists
as long as it is an empty directory, but the command incorrectly
removed it upon a failure of the operation.

* jk/abort-clone-with-existing-dest:
  clone: do not clean up directories we didn't create
  clone: factor out dir_exists() helper
  t5600: modernize style
  t5600: fix outdated comment about unborn HEAD

6 years agoMerge branch 'jc/merge-symlink-ours-theirs' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:12 +0000 (15:18 -0800)] 
Merge branch 'jc/merge-symlink-ours-theirs' into maint

"git merge -Xours/-Xtheirs" learned to use our/their version when
resolving a conflicting updates to a symbolic link.

* jc/merge-symlink-ours-theirs:
  merge: teach -Xours/-Xtheirs to symbolic link merge

6 years agoMerge branch 'rs/lose-leak-pending' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:11 +0000 (15:18 -0800)] 
Merge branch 'rs/lose-leak-pending' into maint

API clean-up around revision traversal.

* rs/lose-leak-pending:
  commit: remove unused function clear_commit_marks_for_object_array()
  revision: remove the unused flag leak_pending
  checkout: avoid using the rev_info flag leak_pending
  bundle: avoid using the rev_info flag leak_pending
  bisect: avoid using the rev_info flag leak_pending
  object: add clear_commit_marks_all()
  ref-filter: use clear_commit_marks_many() in do_merge_filter()
  commit: use clear_commit_marks_many() in remove_redundant()
  commit: avoid allocation in clear_commit_marks_many()

6 years agoMerge branch 'jm/svn-pushmergeinfo-fix' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:11 +0000 (15:18 -0800)] 
Merge branch 'jm/svn-pushmergeinfo-fix' into maint

"git svn dcommit" did not take into account the fact that a
svn+ssh:// URL with a username@ (typically used for pushing) refers
to the same SVN repository without the username@ and failed when
svn.pushmergeinfo option is set.

* jm/svn-pushmergeinfo-fix:
  git-svn: fix svn.pushmergeinfo handling of svn+ssh usernames.

6 years agoMerge branch 'dk/describe-all-output-fix' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:10 +0000 (15:18 -0800)] 
Merge branch 'dk/describe-all-output-fix' into maint

An old regression in "git describe --all $annotated_tag^0" has been
fixed.

* dk/describe-all-output-fix:
  describe: prepend "tags/" when describing tags with embedded name

6 years agoMerge branch 'ab/perf-grep-threads' into maint
Junio C Hamano [Thu, 15 Feb 2018 23:18:09 +0000 (15:18 -0800)] 
Merge branch 'ab/perf-grep-threads' into maint

More perf tests for threaded grep

* ab/perf-grep-threads:
  perf: amend the grep tests to test grep.threads

6 years agoThird batch for 2.17
Junio C Hamano [Thu, 15 Feb 2018 22:56:49 +0000 (14:56 -0800)] 
Third batch for 2.17

Signed-off-by: Junio C Hamano <gitster@pobox.com>
6 years agoMerge branch 'bc/hash-algo'
Junio C Hamano [Thu, 15 Feb 2018 22:55:47 +0000 (14:55 -0800)] 
Merge branch 'bc/hash-algo'

More abstraction of hash function from the codepath.

* bc/hash-algo:
  hash: update obsolete reference to SHA1_HEADER
  bulk-checkin: abstract SHA-1 usage
  csum-file: abstract uses of SHA-1
  csum-file: rename sha1file to hashfile
  read-cache: abstract away uses of SHA-1
  pack-write: switch various SHA-1 values to abstract forms
  pack-check: convert various uses of SHA-1 to abstract forms
  fast-import: switch various uses of SHA-1 to the_hash_algo
  sha1_file: switch uses of SHA-1 to the_hash_algo
  builtin/unpack-objects: switch uses of SHA-1 to the_hash_algo
  builtin/index-pack: improve hash function abstraction
  hash: create union for hash context allocation
  hash: move SHA-1 macros to hash.h

6 years agoMerge branch 'nd/ignore-glob-doc-update'
Junio C Hamano [Thu, 15 Feb 2018 22:55:46 +0000 (14:55 -0800)] 
Merge branch 'nd/ignore-glob-doc-update'

Doc update.

* nd/ignore-glob-doc-update:
  gitignore.txt: elaborate shell glob syntax

6 years agoMerge branch 'tg/reset-hard-show-head-with-pretty'
Junio C Hamano [Thu, 15 Feb 2018 22:55:45 +0000 (14:55 -0800)] 
Merge branch 'tg/reset-hard-show-head-with-pretty'

The way "git reset --hard" reports the commit the updated HEAD
points at is made consistent with the way how the commit title is
generated by the other parts of the system.  This matters when the
title is spread across physically multiple lines.

* tg/reset-hard-show-head-with-pretty:
  reset --hard: make use of the pretty machinery