gitweb.git
Merge branch 'nd/travis-gcc-8'Junio C Hamano Wed, 30 May 2018 05:04:08 +0000 (14:04 +0900)

Merge branch 'nd/travis-gcc-8'

Developer support. Use newer GCC on one of the builds done at
TravisCI.org to get more warnings and errors diagnosed.

* nd/travis-gcc-8:
travis-ci: run gcc-8 on linux-gcc jobs

Merge branch 'nd/pack-struct-commit'Junio C Hamano Wed, 30 May 2018 05:04:08 +0000 (14:04 +0900)

Merge branch 'nd/pack-struct-commit'

Memory optimization.

* nd/pack-struct-commit:
commit.h: rearrange 'index' to shrink struct commit

Merge branch 'ma/create-pseudoref-with-null-old-oid'Junio C Hamano Wed, 30 May 2018 05:04:08 +0000 (14:04 +0900)

Merge branch 'ma/create-pseudoref-with-null-old-oid'

"git update-ref A B" is supposed to ensure that ref A does not yet
exist when B is a NULL OID, but this check was not done correctly
for pseudo-refs outside refs/ hierarchy, e.g. MERGE_HEAD.

* ma/create-pseudoref-with-null-old-oid:
refs: handle zero oid for pseudorefs
t1400: add tests around adding/deleting pseudorefs
refs.c: refer to "object ID", not "sha1", in error messages

Merge branch 'jk/unavailable-can-be-missing'Junio C Hamano Wed, 30 May 2018 05:04:07 +0000 (14:04 +0900)

Merge branch 'jk/unavailable-can-be-missing'

Code clean-up to turn history traversal more robust in a
semi-corrupt repository.

* jk/unavailable-can-be-missing:
mark_parents_uninteresting(): avoid most allocation
mark_parents_uninteresting(): replace list with stack
mark_parents_uninteresting(): drop missing object check
mark_tree_contents_uninteresting(): drop missing object check

Merge branch 'bp/status-rename-config'Junio C Hamano Wed, 30 May 2018 05:04:07 +0000 (14:04 +0900)

Merge branch 'bp/status-rename-config'

"git status" learned to honor a new status.renames configuration to
skip rename detection, which could be useful for those who want to
do so without disabling the default rename detection done by the
"git diff" command.

* bp/status-rename-config:
add status config and command line options for rename detection

Merge branch 'js/use-bug-macro'Junio C Hamano Wed, 30 May 2018 05:04:07 +0000 (14:04 +0900)

Merge branch 'js/use-bug-macro'

Developer support update, by using BUG() macro instead of die() to
mark codepaths that should not happen more clearly.

* js/use-bug-macro:
BUG_exit_code: fix sparse "symbol not declared" warning
Convert remaining die*(BUG) messages
Replace all die("BUG: ...") calls by BUG() ones
run-command: use BUG() to report bugs, not die()
test-tool: help verifying BUG() code paths

Merge branch 'rs/no-null-ptr-arith-in-fast-export'Junio C Hamano Wed, 30 May 2018 05:04:06 +0000 (14:04 +0900)

Merge branch 'rs/no-null-ptr-arith-in-fast-export'

Code clean-up to avoid non-standard-conformant pointer arithmetic.

* rs/no-null-ptr-arith-in-fast-export:
fast-export: avoid NULL pointer arithmetic

Merge branch 'nd/repo-clear-keep-the-index'Junio C Hamano Wed, 30 May 2018 05:04:05 +0000 (14:04 +0900)

Merge branch 'nd/repo-clear-keep-the-index'

the_repository->index is not a allocated piece of memory but
repo_clear() indiscriminately attempted to free(3) it, which has
been corrected.

* nd/repo-clear-keep-the-index:
repository: fix free problem with repo_clear(the_repository)

Merge branch 'ma/lockfile-cleanup'Junio C Hamano Wed, 30 May 2018 05:04:05 +0000 (14:04 +0900)

Merge branch 'ma/lockfile-cleanup'

Code clean-up to adjust to a more recent lockfile API convention that
allows lockfile instances kept on the stack.

* ma/lockfile-cleanup:
lock_file: move static locks into functions
lock_file: make function-local locks non-static
refs.c: do not die if locking fails in `delete_pseudoref()`
refs.c: do not die if locking fails in `write_pseudoref()`
t/helper/test-write-cache: clean up lock-handling

Merge branch 'sg/t6500-no-redirect-of-stdin'Junio C Hamano Wed, 30 May 2018 05:04:04 +0000 (14:04 +0900)

Merge branch 'sg/t6500-no-redirect-of-stdin'

Test cleanup.

* sg/t6500-no-redirect-of-stdin:
t6050-replace: don't disable stdin for the whole test script

Merge branch 'bp/merge-rename-config'Junio C Hamano Wed, 30 May 2018 05:04:04 +0000 (14:04 +0900)

Merge branch 'bp/merge-rename-config'

With merge.renames configuration set to false, the recursive merge
strategy can be told not to spend cycles trying to find renamed
paths and merge them accordingly.

* bp/merge-rename-config:
merge: pass aggressive when rename detection is turned off
merge: add merge.renames config setting
merge: update documentation for {merge,diff}.renameLimit

Merge branch 'js/sequencer-and-root-commits'Junio C Hamano Wed, 30 May 2018 05:04:04 +0000 (14:04 +0900)

Merge branch 'js/sequencer-and-root-commits'

The implementation of "git rebase -i --root" has been updated to use
the sequencer machinery more.

* js/sequencer-and-root-commits:
rebase --rebase-merges: root commits can be cousins, too
rebase --rebase-merges: a "merge" into a new root is a fast-forward
sequencer: allow introducing new root commits
rebase -i --root: let the sequencer handle even the initial part
sequencer: learn about the special "fake root commit" handling
sequencer: extract helper to update active_cache_tree

Merge branch 'dd/send-email-reedit'Junio C Hamano Wed, 30 May 2018 05:04:03 +0000 (14:04 +0900)

Merge branch 'dd/send-email-reedit'

"git send-email" can sometimes offer confirmation dialog "Send this
email?" with choices 'Yes', 'No', 'Quit', and 'All'. A new action
'Edit' has been added to this dialog's choice.

* dd/send-email-reedit:
git-send-email: allow re-editing of message

init: fix grammar in "templates not found" msgRobert P. J. Day Tue, 29 May 2018 12:14:35 +0000 (08:14 -0400)

init: fix grammar in "templates not found" msg

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sequencer: ensure labels that are object IDs are rewrittenbrian m. carlson Tue, 29 May 2018 16:32:36 +0000 (16:32 +0000)

sequencer: ensure labels that are object IDs are rewritten

When writing the todo script for --rebase-merges, we try to find a label
for certain commits. If the label ends up being a valid object ID, such
as when we merge a detached commit, we want to rewrite it so it is no
longer a valid object ID.

However, the code path that does this checks for its length to be
equivalent to GIT_SHA1_RAWSZ, which isn't correct, since what we are
reading is a hex object ID. Instead, check for the length being
equivalent to that of a hex object ID. Use the_hash_algo so this code
works regardless of the hash size.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t990X: use '.git/objects' as 'deep inside .git' pathChristian Couder Sat, 26 May 2018 06:47:45 +0000 (08:47 +0200)

t990X: use '.git/objects' as 'deep inside .git' path

Tests t9902-completion.sh and t9903-bash-prompt.sh each have tests
that check what happens when we are "in the '.git' directory" and
when we are "deep inside the '.git' directory".

To test the case when we are "deep inside the '.git' directory" the
test scripts used to perform a `cd .git/refs/heads`.

As there are plans to implement other ref storage systems, let's
use '.git/objects' instead of '.git/refs/heads' as the "deep inside
the '.git' directory" path.

This makes it clear to readers that these tests do not depend on
which ref backend is used.

The internals of the loose refs backend are still tested in
t1400-update-ref.sh.

Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with Git 2.17.1Junio C Hamano Tue, 29 May 2018 08:09:58 +0000 (17:09 +0900)

Sync with Git 2.17.1

* maint: (25 commits)
Git 2.17.1
Git 2.16.4
Git 2.15.2
Git 2.14.4
Git 2.13.7
fsck: complain when .gitmodules is a symlink
index-pack: check .gitmodules files with --strict
unpack-objects: call fsck_finish() after fscking objects
fsck: call fsck_finish() after fscking objects
fsck: check .gitmodules content
fsck: handle promisor objects in .gitmodules check
fsck: detect gitmodules files
fsck: actually fsck blob data
fsck: simplify ".git" check
index-pack: make fsck error message more specific
verify_path: disallow symlinks in .gitmodules
update-index: stat updated files earlier
verify_dotfile: mention case-insensitivity in comment
verify_path: drop clever fallthrough
skip_prefix: add case-insensitive variant
...

completion: complete general config vars in two stepsNguyễn Thái Ngọc Duy Sun, 27 May 2018 18:28:00 +0000 (20:28 +0200)

completion: complete general config vars in two steps

There are 581 config variables as of now when you do "git config
<tab>" which can fill up a few screens and is not very helpful when
you have to look through columns of text to find what you want.

This patch instead shows you only first level when you do

git config <tab>

There are 78 items, which use up 8 rows in my screen. Compared to
screens of text, it's pretty good. Once you have chosen you first
level, e.g. color:

git config color.<tab>

will show you all color.*

This is not a new idea. branch.* and remote.* completion already does
this for second and third levels. For those variables, you'll need to
<tab> three times to get full variable name.

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

log-tree: allow to customize 'grafted' colorNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:31 +0000 (15:55 +0200)

log-tree: allow to customize 'grafted' color

Commit 76f5df305b (log: decorate grafted commits with "grafted" -
2011-08-18) lets us decorate grafted commits but I forgot about the
color.decorate.* config.

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

completion: support case-insensitive config varsNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:30 +0000 (15:55 +0200)

completion: support case-insensitive config vars

Config variables are case-insensitive but this case/esac construct is
case-sensitive by default. For bash v4, it'll be easy. For platforms
that are stuck with older versions, we need an external command, but
that is not that critical. And where this additional overhead matters
the most is Windows, but luckily Git for Windows ships with Bash v4.

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

completion: keep other config var completion in camelCaseNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:29 +0000 (15:55 +0200)

completion: keep other config var completion in camelCase

The last patch makes "git config <tab>" shows camelCase names because
that's what's in the source: config.txt. There are still a couple
manual var completion in this code. Let's make them follow the naming
convention as well.

In theory we could automate this part too because we have the
information. But let's stick to one step at a time and leave this for
later.

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

completion: drop the hard coded list of config varsNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:28 +0000 (15:55 +0200)

completion: drop the hard coded list of config vars

The new help option --config-for-completion is a machine friendlier
version of --config where all the placeholders and wildcards are
dropped, leaving only the good, completable prefixes for
git-completion.bash to consume.

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

am: move advice.amWorkDir parsing back to advice.cNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:27 +0000 (15:55 +0200)

am: move advice.amWorkDir parsing back to advice.c

The only benefit from this move (apart from cleaner code) is that
advice.amWorkDir should now show up in `git help --config`. There
should be no regression since advice config is always read by the
git_default_config().

While at there, use advise() like other code. We now get "hint: "
prefix and the output is stderr instead of stdout (which is also the
reason for the test update because stderr is checked in a following
test and the extra advice can fail it).

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

advice: keep config name in camelCase in advice_config[]Nguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:26 +0000 (15:55 +0200)

advice: keep config name in camelCase in advice_config[]

For parsing, we don't really need this because the main config parser
will lowercase everything so we can do exact matching. But this array
now is also used for printing in `git help --config`. Keep camelCase
so we have a nice printout.

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

fsck: produce camelCase config key namesNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:25 +0000 (15:55 +0200)

fsck: produce camelCase config key names

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

help: add --config to list all available configNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:24 +0000 (15:55 +0200)

help: add --config to list all available config

Sometimes it helps to list all available config vars so the user can
search for something they want. The config man page can also be used
but it's harder to search if you want to focus on the variable name,
for example.

This is not the best way to collect the available config since it's
not precise. Ideally we should have a centralized list of config in C
code (pretty much like 'struct option'), but that's a lot more work.
This will do for now.

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

fsck: factor out msg_id_info[] lazy initialization... Nguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:23 +0000 (15:55 +0200)

fsck: factor out msg_id_info[] lazy initialization code

This array will be used by some other function than parse_msg_id() in
the following commit. Factor out this prep code so it could be called
from that one.

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

grep: keep all colors in an arrayNguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:22 +0000 (15:55 +0200)

grep: keep all colors in an array

This is more inline with how we handle color slots in other code. It
also allows us to get the list of configurable color slots later.

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

Add and use generic name->id mapping code for color... Nguyễn Thái Ngọc Duy Sat, 26 May 2018 13:55:21 +0000 (15:55 +0200)

Add and use generic name->id mapping code for color slot parsing

Instead of hard coding the name-to-id mapping in C code, keep it in an
array and use a common function to do the parsing. This reduces code
and also allows us to list all possible color slots later.

This starts using C99 designated initializers more for convenience
(the first designated initializers have been introduced in builtin/clean.c
for some time without complaints)

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

Merge branch 'nd/command-list' into nd/complete-config... Junio C Hamano Tue, 29 May 2018 05:51:14 +0000 (14:51 +0900)

Merge branch 'nd/command-list' into nd/complete-config-vars

* nd/command-list:
completion: allow to customize the completable command list
completion: add and use --list-cmds=alias
completion: add and use --list-cmds=nohelpers
Move declaration for alias.c to alias.h
completion: reduce completable command list
completion: let git provide the completable command list
command-list.txt: documentation and guide line
help: use command-list.txt for the source of guides
help: add "-a --verbose" to list all commands with synopsis
git: support --list-cmds=list-<category>
completion: implement and use --list-cmds=main,others
git --list-cmds: collect command list in a string_list
git.c: convert --list-* to --list-cmds=*
Remove common-cmds.h
help: use command-list.h for common command list
generate-cmds.sh: export all commands to command-list.h
generate-cmds.sh: factor out synopsis extract code

completion: suppress some -no- optionsNguyễn Thái Ngọc Duy Sun, 27 May 2018 08:38:27 +0000 (10:38 +0200)

completion: suppress some -no- options

Most --no- options do have some use, even if rarely to negate some
option that's specified in an alias.

These options --no-ours and --no-theirs however have no clear
semantics. If I specify "--ours --no-theirs", the second will reset
writeout stage and is equivalent of "--no-ours --no-theirs" which is
not that easy to see. Drop them. You can either switch from --ours to
--theirs and back but you can never negate them.

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

parse-options: option to let --git-completion-helper... Nguyễn Thái Ngọc Duy Sun, 27 May 2018 08:38:26 +0000 (10:38 +0200)

parse-options: option to let --git-completion-helper show negative form

When 7fb6aefd2a (Merge branch 'nd/parseopt-completion' - 2018-03-14)
is merged, the completion for negative form is left out because the
series is alread long and it could be done in a follow up series. This
is it.

--git-completion-helper now provides --no-xxx so that git-completion.bash
can drop the extra custom --no-xxx in the script. It adds a lot more
--no-xxx than what's current provided by the git-completion.bash
script. We'll trim that down later.

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

apply: add --intent-to-addNguyễn Thái Ngọc Duy Sat, 26 May 2018 12:08:46 +0000 (14:08 +0200)

apply: add --intent-to-add

Similar to 'git reset -N', this option makes 'git apply' automatically
mark new files as intent-to-add so they are visible in the following
'git diff' command and could also be committed with 'git commit -a'.

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

t2203: add a test about "diff HEAD" caseNguyễn Thái Ngọc Duy Sat, 26 May 2018 12:08:45 +0000 (14:08 +0200)

t2203: add a test about "diff HEAD" case

Previous attempts to fix ita-related diffs breaks this case. To make
sure that does not happen again, add a test to verify the behavior
wrt. ita entries when we diff a worktree and a tree.

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

diff: turn --ita-invisible-in-index on by defaultNguyễn Thái Ngọc Duy Sat, 26 May 2018 12:08:44 +0000 (14:08 +0200)

diff: turn --ita-invisible-in-index on by default

Due to the implementation detail of intent-to-add entries, the current
"git diff" (i.e. no treeish or --cached argument) would show the
changes in the i-t-a file, but it does not mark the file as new, while
"diff --cached" would mark the file as new while showing its content
as empty.

$ git diff | $ diff --cached
--------------------------------|-------------------------------
diff --git a/new b/new | diff --git a/new b/new
index e69de29..5ad28e2 100644 | new file mode 100644
--- a/new | index 0000000..e69de29
+++ b/new |
@@ -0,0 +1 @@ |
+haha |

One evidence of the current output being wrong is that, the output
from "git diff" (with ita entries) cannot be applied because it
assumes empty files exist before applying.

Turning on --ita-invisible-in-index [1] [2] would fix this. The result
is "new file" line moving from "git diff --cached" to "git diff".

$ git diff | $ diff --cached
--------------------------------|-------------------------------
diff --git a/new b/new |
new file mode 100644 |
index 0000000..5ad28e2 |
--- /dev/null |
+++ b/new |
@@ -0,0 +1 @@ |
+haha |

This option is on by default in git-status [1] but we need more fixup
in rename detection code [3]. Luckily we don't need to do anything
else for the rename detection code in diff.c (wt-status.c uses a
customized one).

[1] 425a28e0a4 (diff-lib: allow ita entries treated as "not yet exist
in index" - 2016-10-24)
[2] b42b451919 (diff: add --ita-[in]visible-in-index - 2016-10-24)
[3] bc3dca07f4 (Merge branch 'nd/ita-wt-renames-in-status' - 2018-01-23)

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

diff: ignore --ita-[in]visible-in-index when diffing... Nguyễn Thái Ngọc Duy Sat, 26 May 2018 12:08:43 +0000 (14:08 +0200)

diff: ignore --ita-[in]visible-in-index when diffing worktree-to-tree

This option is supposed to fix the diff of "diff-files" (not reporting
ita entries as new files) and "diff-index --cached <tree>" (showing ita
entries as present in the index with empty content) but not
"diff-index <tree>".

When --ita-invisible-in-index is set on "git diff-index <tree>",
unpack_trees() will eventually call oneway_diff() on the ita entry
with the same code flow as "diff-index --cached <tree>". We want to
ignore the ita entry for "diff-index --cached <tree>" but not
"diff-index <tree>" since the latter will examine and produce a diff
based on worktree entry's (real) content, not ita index entry's
(empty) content.

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

tag: clarify in the doc that a tag can refer to a non... Robert P. J. Day Fri, 25 May 2018 09:45:09 +0000 (05:45 -0400)

tag: clarify in the doc that a tag can refer to a non-commit object

Reword "man git-tag" to clarify that a tag can refer directly to an
arbitrary object, not just a commit object.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

show-index: update documentation for index v2Jeff King Mon, 28 May 2018 09:39:23 +0000 (05:39 -0400)

show-index: update documentation for index v2

Commit 32637cdf4a (show-index.c: learn about index v2,
2007-04-09) changed the output format of show-index to
include the object CRC32 but didn't update the
documentation. Let's fix that and generally describe the
output in more detail.

There are a few other fixes here while we're rewording:

- refer to index-pack along with pack-objects, since either
can create .idx files

- use "linkgit:" for referring to other commands

- expand the bit about verify-pack, giving reasons why you
might want this command instead. I almost omitted this
entirely, but referring to verify-pack might help a
reader who is looking for more information.

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

make show-index a builtinJeff King Mon, 28 May 2018 09:38:53 +0000 (05:38 -0400)

make show-index a builtin

The git-show-index command is built as its own separate
program. There's really no good reason for this, and it
means we waste extra space on disk (and CPU time running the
linker). Let's fold it in to the main binary as a builtin.

The history here is actually a bit amusing. The program
itself is mostly self-contained, and doesn't even use our
normal pack index code. In a5031214c4 (slim down "git
show-index", 2010-01-21), we even stopped using xmalloc() so
that it could avoid libgit.a entirely. But then 040a655116
(cleanup: use internal memory allocation wrapper functions
everywhere, 2011-10-06) switched that back to xmalloc, which
later become ALLOC_ARRAY().

Making it a builtin should give us the best of both worlds:
no wasted space and no need to avoid the usual patterns.

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

git-rebase--interactive: fix copy-paste mistakeOrgad Shaneh Sun, 27 May 2018 06:51:27 +0000 (09:51 +0300)

git-rebase--interactive: fix copy-paste mistake

exec argument is a command, not a commit.

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

t6036: prefer test_when_finished to manual cleanup... Elijah Newren Thu, 24 May 2018 07:04:39 +0000 (00:04 -0700)

t6036: prefer test_when_finished to manual cleanup in following test

Manually cleaning up from former tests in subsequent ones breaks the
ability to select which tests we want to run. Use test_when_finished to
avoid this problem.

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

t6036, t6042: prefer test_cmp to sequences of testElijah Newren Thu, 24 May 2018 07:04:38 +0000 (00:04 -0700)

t6036, t6042: prefer test_cmp to sequences of test

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

t6036, t6042: prefer test_path_is_file, test_path_is_mi... Elijah Newren Thu, 24 May 2018 07:04:37 +0000 (00:04 -0700)

t6036, t6042: prefer test_path_is_file, test_path_is_missing

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

t6036, t6042: use test_line_count instead of wc -lElijah Newren Thu, 24 May 2018 07:04:36 +0000 (00:04 -0700)

t6036, t6042: use test_line_count instead of wc -l

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

t6036, t6042: use test_create_repo to keep tests indepe... Elijah Newren Thu, 24 May 2018 07:04:35 +0000 (00:04 -0700)

t6036, t6042: use test_create_repo to keep tests independent

These tests used pretty strong measures to get a clean slate:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
It's easier, safer (what if a previous test has a bug and accidentally
changes into a directory outside the test path?), and allows re-inspecting
test setup later if we instead just use test_create_repo to put different
tests into separate sub-repositories.

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

Use proper syntax for replaceables in command docsRobert P. J. Day Thu, 24 May 2018 20:11:39 +0000 (16:11 -0400)

Use proper syntax for replaceables in command docs

The standard for command documentation synopses appears to be:

[...] means optional
<...> means replaceable
[<...>] means both optional and replaceable

So fix a number of doc pages that use incorrect variations of the
above.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: do not pass null OID to setup_revisionsJonathan Tan Thu, 24 May 2018 20:47:29 +0000 (13:47 -0700)

submodule: do not pass null OID to setup_revisions

If "git pull --recurse-submodules --rebase" is invoked when the current
branch and its corresponding remote-tracking branch have no merge base,
a "bad object" fatal error occurs. This issue was introduced with commit
a6d7eb2c7a ("pull: optionally rebase submodules (remote submodule
changes only)", 2017-06-23), which also introduced this feature.

This is because cmd_pull() in builtin/pull.c thus invokes
submodule_touches_in_range() with a null OID as the first parameter.
Ensure that this case works, and document what happens in this case.

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

rev-parse: check lookup'ed commit references for NULLElijah Newren Thu, 24 May 2018 06:27:33 +0000 (23:27 -0700)

rev-parse: check lookup'ed commit references for NULL

Commits 2122f8b963d4 ("rev-parse: Add support for the ^! and ^@ syntax",
2008-07-26) and 3dd4e7320d ("Teach rev-parse the ... syntax.", 2006-07-04)
taught rev-parse new syntax, and used lookup_commit_reference() as part of
their logic. Neither usage checked the returned commit to see if it was
non-NULL before using it. Check for NULL and ensure an appropriate error
is reported to the user.

Reported by Florian Weimer and Todd Zullinger.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Elijah Newren <newren@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use OPT_SET_INT_F() for cmdline option specificationNguyễn Thái Ngọc Duy Sun, 20 May 2018 15:42:58 +0000 (17:42 +0200)

Use OPT_SET_INT_F() for cmdline option specification

The only thing these commands need is extra parseopt flag which can be
passed in by OPT_SET_INT_F() and it is a bit more compact than full
struct initialization.

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

git-p4: add unshelve commandLuke Diamand Wed, 23 May 2018 22:20:26 +0000 (23:20 +0100)

git-p4: add unshelve command

This can be used to "unshelve" a shelved P4 commit into
a git commit.

For example:

$ git p4 unshelve 12345

The resulting commit ends up in the branch:
refs/remotes/p4/unshelved/12345

If that branch already exists, it is renamed - for example
the above branch would be saved as p4/unshelved/12345.1.

git-p4 checks that the shelved changelist is based on files
which are at the same Perforce revision as the origin branch
being used for the unshelve (HEAD by default). If they are not,
it will refuse to unshelve. This is to ensure that the unshelved
change does not contain other changes mixed-in.

The reference branch can be changed manually with the "--origin"
option.

The change adds a new Unshelve command class. This just runs the
existing P4Sync code tweaked to handle a shelved changelist.

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

import-tars: read overlong names from pax extended... Pedro Alvarez Piedehierro Wed, 23 May 2018 22:54:17 +0000 (23:54 +0100)

import-tars: read overlong names from pax extended header

Importing gcc tarballs[1] with import-tars script (in contrib) fails
when hitting a pax extended header.

Make sure we always read the extended attributes from the pax entries,
and store the 'path' value if found to be used in the next ustar entry.

The code to parse pax extended headers was written consulting the Pax
Pax Interchange Format documentation [2].

[1] http://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
[2] https://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+8-current&query=tar&sektion=5

Signed-off-by: Pedro Alvarez <palvarez89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t: make many tests depend less on the refs being filesDavid Turner Wed, 23 May 2018 05:25:17 +0000 (07:25 +0200)

t: make many tests depend less on the refs being files

Many tests are very focused on the file system representation of the
loose and packed refs code. As there are plans to implement other
ref storage systems, let's migrate these tests to a form that test
the intent of the refs storage system instead of it internals.

This will make clear to readers that these tests do not depend on
which ref backend is used.

The internals of the loose refs backend are still tested in
t1400-update-ref.sh, whereas the tests changed in this patch focus
on testing other aspects.

This patch just takes care of many low hanging fruits. It does not
try to completely solves the issue.

Helped-by: Stefan Beller <sbeller@google.com>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The sixth batch for 2.18Junio C Hamano Wed, 23 May 2018 05:45:34 +0000 (14:45 +0900)

The sixth batch for 2.18

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

Merge branch 'fg/completion-external'Junio C Hamano Wed, 23 May 2018 05:38:25 +0000 (14:38 +0900)

Merge branch 'fg/completion-external'

The command line completion mechanism (in contrib/) learned to load
custom completion file for "git $command" where $command is a
custom "git-$command" that the end user has on the $PATH when using
newer version of bash.

* fg/completion-external:
completion: load completion file for external subcommand

Merge branch 'bc/asciidoctor-tab-width'Junio C Hamano Wed, 23 May 2018 05:38:25 +0000 (14:38 +0900)

Merge branch 'bc/asciidoctor-tab-width'

Asciidoctor gives a reasonable imitation for AsciiDoc, but does not
render illustration in a literal block correctly when indented with
HT by default. The problem is fixed by forcing 8-space tabs.

* bc/asciidoctor-tab-width:
Documentation: render revisions correctly under Asciidoctor
Documentation: use 8-space tabs with Asciidoctor

Merge branch 'nd/pack-unreachable-objects-doc'Junio C Hamano Wed, 23 May 2018 05:38:24 +0000 (14:38 +0900)

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

Doc update.

* nd/pack-unreachable-objects-doc:
pack-objects: validation and documentation about unreachable options

Merge branch 'nd/completion-aliasfiletype-typofix'Junio C Hamano Wed, 23 May 2018 05:38:24 +0000 (14:38 +0900)

Merge branch 'nd/completion-aliasfiletype-typofix'

Typofix.

* nd/completion-aliasfiletype-typofix:
completion: fix misspelled config key aliasesfiletype

Merge branch 'em/status-rename-config'Junio C Hamano Wed, 23 May 2018 05:38:23 +0000 (14:38 +0900)

Merge branch 'em/status-rename-config'

"git status" learned to pay attention to UI related diff
configuration variables such as diff.renames.

* em/status-rename-config:
wt-status: use settings from git_diff_ui_config

Merge branch 'cc/perf-bisect'Junio C Hamano Wed, 23 May 2018 05:38:23 +0000 (14:38 +0900)

Merge branch 'cc/perf-bisect'

Performance test updates.

* cc/perf-bisect:
perf/bisect_run_script: disable codespeed

Merge branch 'ah/misc-doc-updates'Junio C Hamano Wed, 23 May 2018 05:38:23 +0000 (14:38 +0900)

Merge branch 'ah/misc-doc-updates'

Misc doc fixes.

* ah/misc-doc-updates:
doc: normalize [--options] to [options] in git-diff
doc: add note about shell quoting to revision.txt
git-svn: remove ''--add-author-from' for 'commit-diff'
doc: add '-d' and '-o' for 'git push'
doc: clarify ignore rules for git ls-files
doc: align 'diff --no-index' in text and synopsis
doc: improve formatting in githooks.txt

Merge branch 'bp/test-drop-caches'Junio C Hamano Wed, 23 May 2018 05:38:22 +0000 (14:38 +0900)

Merge branch 'bp/test-drop-caches'

Code simplification.

* bp/test-drop-caches:
test-drop-caches: simplify delay loading of NtSetSystemInformation

Merge branch 'en/unpack-trees-split-index-fix'Junio C Hamano Wed, 23 May 2018 05:38:22 +0000 (14:38 +0900)

Merge branch 'en/unpack-trees-split-index-fix'

The split-index feature had a long-standing and dormant bug in
certain use of the in-core merge machinery, which has been fixed.

* en/unpack-trees-split-index-fix:
unpack_trees: fix breakage when o->src_index != o->dst_index

Merge branch 'nd/doc-header'Junio C Hamano Wed, 23 May 2018 05:38:21 +0000 (14:38 +0900)

Merge branch 'nd/doc-header'

Doc formatting fix.

* nd/doc-header:
doc: keep first level section header in upper case

Merge branch 'bc/format-patch-cover-no-attach'Junio C Hamano Wed, 23 May 2018 05:38:21 +0000 (14:38 +0900)

Merge branch 'bc/format-patch-cover-no-attach'

"git format-patch --cover --attach" created a broken MIME multipart
message for the cover letter, which has been fixed by keeping the
cover letter as plain text file.

* bc/format-patch-cover-no-attach:
format-patch: make cover letters always text/plain

Merge branch 'tb/test-apfs-utf8-normalization'Junio C Hamano Wed, 23 May 2018 05:38:21 +0000 (14:38 +0900)

Merge branch 'tb/test-apfs-utf8-normalization'

A test to see if the filesystem normalizes UTF-8 filename has been
updated to check what we need to know in a more direct way, i.e. a
path created in NFC form can be accessed with NFD form (or vice
versa) to cope with APFS as well as HFS.

* tb/test-apfs-utf8-normalization:
test: correct detection of UTF8_NFD_TO_NFC for APFS

Merge branch 'js/rebase-recreate-merge'Junio C Hamano Wed, 23 May 2018 05:38:20 +0000 (14:38 +0900)

Merge branch 'js/rebase-recreate-merge'

"git rebase" learned "--rebase-merges" to transplant the whole
topology of commit graph elsewhere.

* js/rebase-recreate-merge:
rebase -i --rebase-merges: add a section to the man page
rebase -i: introduce --rebase-merges=[no-]rebase-cousins
pull: accept --rebase=merges to recreate the branch topology
rebase --rebase-merges: avoid "empty merges"
sequencer: handle post-rewrite for merge commands
sequencer: make refs generated by the `label` command worktree-local
rebase --rebase-merges: add test for --keep-empty
rebase: introduce the --rebase-merges option
rebase-helper --make-script: introduce a flag to rebase merges
sequencer: fast-forward `merge` commands, if possible
sequencer: introduce the `merge` command
sequencer: introduce new commands to reset the revision
git-rebase--interactive: clarify arguments
sequencer: offer helpful advice when a command was rescheduled
sequencer: refactor how original todo list lines are accessed
sequencer: make rearrange_squash() a bit more obvious
sequencer: avoid using errno clobbered by rollback_lock_file()

Merge branch 'nd/pack-objects-pack-struct'Junio C Hamano Wed, 23 May 2018 05:38:19 +0000 (14:38 +0900)

Merge branch 'nd/pack-objects-pack-struct'

"git pack-objects" needs to allocate tons of "struct object_entry"
while doing its work, and shrinking its size helps the performance
quite a bit.

* nd/pack-objects-pack-struct:
ci: exercise the whole test suite with uncommon code in pack-objects
pack-objects: reorder members to shrink struct object_entry
pack-objects: shrink delta_size field in struct object_entry
pack-objects: shrink size field in struct object_entry
pack-objects: clarify the use of object_entry::size
pack-objects: don't check size when the object is bad
pack-objects: shrink z_delta_size field in struct object_entry
pack-objects: refer to delta objects by index instead of pointer
pack-objects: move in_pack out of struct object_entry
pack-objects: move in_pack_pos out of struct object_entry
pack-objects: use bitfield for object_entry::depth
pack-objects: use bitfield for object_entry::dfs_state
pack-objects: turn type and in_pack_type to bitfields
pack-objects: a bit of document about struct object_entry
read-cache.c: make $GIT_TEST_SPLIT_INDEX boolean

Merge branch 'en/rename-directory-detection-reboot'Junio C Hamano Wed, 23 May 2018 05:38:19 +0000 (14:38 +0900)

Merge branch 'en/rename-directory-detection-reboot'

Rename detection logic in "diff" family that is used in "merge" has
learned to guess when all of x/a, x/b and x/c have moved to z/a,
z/b and z/c, it is likely that x/d added in the meantime would also
want to move to z/d by taking the hint that the entire directory
'x' moved to 'z'. A bug causing dirty files involved in a rename
to be overwritten during merge has also been fixed as part of this
work. Incidentally, this also avoids updating a file in the
working tree after a (non-trivial) merge whose result matches what
our side originally had.

* en/rename-directory-detection-reboot: (36 commits)
merge-recursive: fix check for skipability of working tree updates
merge-recursive: make "Auto-merging" comment show for other merges
merge-recursive: fix remainder of was_dirty() to use original index
merge-recursive: fix was_tracked() to quit lying with some renamed paths
t6046: testcases checking whether updates can be skipped in a merge
merge-recursive: avoid triggering add_cacheinfo error with dirty mod
merge-recursive: move more is_dirty handling to merge_content
merge-recursive: improve add_cacheinfo error handling
merge-recursive: avoid spurious rename/rename conflict from dir renames
directory rename detection: new testcases showcasing a pair of bugs
merge-recursive: fix remaining directory rename + dirty overwrite cases
merge-recursive: fix overwriting dirty files involved in renames
merge-recursive: avoid clobbering untracked files with directory renames
merge-recursive: apply necessary modifications for directory renames
merge-recursive: when comparing files, don't include trees
merge-recursive: check for file level conflicts then get new name
merge-recursive: add computation of collisions due to dir rename & merging
merge-recursive: check for directory level conflicts
merge-recursive: add get_directory_renames()
merge-recursive: make a helper function for cleanup for handle_renames
...

Merge branch 'js/no-pager-shorthand'Junio C Hamano Wed, 23 May 2018 05:38:18 +0000 (14:38 +0900)

Merge branch 'js/no-pager-shorthand'

"git --no-pager cmd" did not have short-and-sweet single letter
option. Now it does.

* js/no-pager-shorthand:
git: add -P as a short option for --no-pager

Merge branch 'js/rebase-i-clean-msg-after-fixup-continue'Junio C Hamano Wed, 23 May 2018 05:38:18 +0000 (14:38 +0900)

Merge branch 'js/rebase-i-clean-msg-after-fixup-continue'

"git rebase -i" sometimes left intermediate "# This is a
combination of N commits" message meant for the human consumption
inside an editor in the final result in certain corner cases, which
has been fixed.

* js/rebase-i-clean-msg-after-fixup-continue:
rebase --skip: clean up commit message after a failed fixup/squash
sequencer: always commit without editing when asked for
rebase -i: Handle "combination of <n> commits" with GETTEXT_POISON
rebase -i: demonstrate bugs with fixup!/squash! commit messages

Merge branch 'tg/worktree-add-existing-branch'Junio C Hamano Wed, 23 May 2018 05:38:18 +0000 (14:38 +0900)

Merge branch 'tg/worktree-add-existing-branch'

"git worktree add" learned to check out an existing branch.

* tg/worktree-add-existing-branch:
worktree: teach "add" to check out existing branches
worktree: factor out dwim_branch function
worktree: improve message when creating a new worktree
worktree: remove extra members from struct add_opts

Merge branch 'js/deprecate-grafts'Junio C Hamano Wed, 23 May 2018 05:38:17 +0000 (14:38 +0900)

Merge branch 'js/deprecate-grafts'

The functionality of "$GIT_DIR/info/grafts" has been superseded by
the "refs/replace/" mechanism for some time now, but the internal
code had support for it in many places, which has been cleaned up
in order to drop support of the "grafts" mechanism.

* js/deprecate-grafts:
Remove obsolete script to convert grafts to replace refs
technical/shallow: describe why shallow cannot use replace refs
technical/shallow: stop referring to grafts
filter-branch: stop suggesting to use grafts
Deprecate support for .git/info/grafts
Add a test for `git replace --convert-graft-file`
replace: introduce --convert-graft-file
replace: prepare create_graft() for converting graft files wholesale
replace: "libify" create_graft() and callees
replace: avoid using die() to indicate a bug
commit: Let the callback of for_each_mergetag return on error
argv_array: offer to split a string by whitespace

Merge branch 'js/test-unset-prereq'Junio C Hamano Wed, 23 May 2018 05:38:17 +0000 (14:38 +0900)

Merge branch 'js/test-unset-prereq'

Test debugging aid.

* js/test-unset-prereq:
tests: introduce test_unset_prereq, for debugging

Merge branch 'ab/perl-python-attrs'Junio C Hamano Wed, 23 May 2018 05:38:16 +0000 (14:38 +0900)

Merge branch 'ab/perl-python-attrs'

We learned that our source files with ".pl" and ".py" extensions
are Perl and Python files respectively and changes to them are
better viewed as such with appropriate diff drivers.

* ab/perl-python-attrs:
.gitattributes: add a diff driver for Python
.gitattributes: use the "perl" differ for Perl
.gitattributes: add *.pl extension for Perl

Merge branch 'sb/oid-object-info'Junio C Hamano Wed, 23 May 2018 05:38:16 +0000 (14:38 +0900)

Merge branch 'sb/oid-object-info'

The codepath around object-info API has been taught to take the
repository object (which in turn tells the API which object store
the objects are to be located).

* sb/oid-object-info:
cache.h: allow oid_object_info to handle arbitrary repositories
packfile: add repository argument to cache_or_unpack_entry
packfile: add repository argument to unpack_entry
packfile: add repository argument to read_object
packfile: add repository argument to packed_object_info
packfile: add repository argument to packed_to_object_type
packfile: add repository argument to retry_bad_packed_offset
cache.h: add repository argument to oid_object_info
cache.h: add repository argument to oid_object_info_extended

Merge branch 'cc/perf-aggregate-unknown-option'Junio C Hamano Wed, 23 May 2018 05:38:15 +0000 (14:38 +0900)

Merge branch 'cc/perf-aggregate-unknown-option'

Perf-test helper updates.

* cc/perf-aggregate-unknown-option:
perf/aggregate: use Getopt::Long for option parsing

Merge branch 'en/git-debugger'Junio C Hamano Wed, 23 May 2018 05:38:15 +0000 (14:38 +0900)

Merge branch 'en/git-debugger'

Dev support.

* en/git-debugger:
Make running git under other debugger-like programs easy

Merge branch 'bw/server-options'Junio C Hamano Wed, 23 May 2018 05:38:15 +0000 (14:38 +0900)

Merge branch 'bw/server-options'

The transport protocol v2 is getting updated further.

* bw/server-options:
fetch: send server options when using protocol v2
ls-remote: send server options when using protocol v2
serve: introduce the server-option capability

Merge branch 'nd/repack-keep-pack'Junio C Hamano Wed, 23 May 2018 05:38:14 +0000 (14:38 +0900)

Merge branch 'nd/repack-keep-pack'

"git gc" in a large repository takes a lot of time as it considers
to repack all objects into one pack by default. The command has
been taught to pretend as if the largest existing packfile is
marked with ".keep" so that it is left untouched while objects in
other packs and loose ones are repacked.

* nd/repack-keep-pack:
pack-objects: show some progress when counting kept objects
gc --auto: exclude base pack if not enough mem to "repack -ad"
gc: handle a corner case in gc.bigPackThreshold
gc: add gc.bigPackThreshold config
gc: add --keep-largest-pack option
repack: add --keep-pack option
t7700: have closing quote of a test at the beginning of line

Merge branch 'ds/lazy-load-trees'Junio C Hamano Wed, 23 May 2018 05:38:13 +0000 (14:38 +0900)

Merge branch 'ds/lazy-load-trees'

The code has been taught to use the duplicated information stored
in the commit-graph file to learn the tree object name for a commit
to avoid opening and parsing the commit object when it makes sense
to do so.

* ds/lazy-load-trees:
coccinelle: avoid wrong transformation suggestions from commit.cocci
commit-graph: lazy-load trees for commits
treewide: replace maybe_tree with accessor methods
commit: create get_commit_tree() method
treewide: rename tree to maybe_tree

Merge branch 'nd/term-columns'Junio C Hamano Wed, 23 May 2018 05:38:13 +0000 (14:38 +0900)

Merge branch 'nd/term-columns'

The code did not propagate the terminal width to subprocesses via
COLUMNS environment variable, which it now does. This caused
trouble to "git column" helper subprocess when "git tag --column=row"
tried to list the existing tags on a display with non-default width.

* nd/term-columns:
column: fix off-by-one default width
pager: set COLUMNS to term_columns()

Merge branch 'sg/t7005-spaces-in-filenames-cleanup'Junio C Hamano Wed, 23 May 2018 05:38:12 +0000 (14:38 +0900)

Merge branch 'sg/t7005-spaces-in-filenames-cleanup'

Test update.

* sg/t7005-spaces-in-filenames-cleanup:
t7005-editor: get rid of the SPACES_IN_FILENAMES prereq

Merge branch 'sg/t5516-fixes'Junio C Hamano Wed, 23 May 2018 05:38:12 +0000 (14:38 +0900)

Merge branch 'sg/t5516-fixes'

Test fixes.

* sg/t5516-fixes:
t5516-fetch-push: fix broken &&-chain
t5516-fetch-push: fix 'push with dry-run' test

Merge branch 'sg/t5310-jgit-bitmap-test'Junio C Hamano Wed, 23 May 2018 05:38:11 +0000 (14:38 +0900)

Merge branch 'sg/t5310-jgit-bitmap-test'

Test update.

* sg/t5310-jgit-bitmap-test:
t5310-pack-bitmaps: make JGit tests work with GIT_TEST_SPLIT_INDEX

Merge branch 'nd/pack-format-doc'Junio C Hamano Wed, 23 May 2018 05:38:11 +0000 (14:38 +0900)

Merge branch 'nd/pack-format-doc'

Doc update.

* nd/pack-format-doc:
pack-format.txt: more details on pack file format

Merge branch 'jk/apply-p-doc'Junio C Hamano Wed, 23 May 2018 05:38:11 +0000 (14:38 +0900)

Merge branch 'jk/apply-p-doc'

Doc update.

* jk/apply-p-doc:
apply: clarify "-p" documentation

Merge branch 'ao/config-api-doc'Junio C Hamano Wed, 23 May 2018 05:38:10 +0000 (14:38 +0900)

Merge branch 'ao/config-api-doc'

Doc update.

* ao/config-api-doc:
doc: fix config API documentation about config_with_options

Merge branch 'bc/mailmap-self'Junio C Hamano Wed, 23 May 2018 05:38:10 +0000 (14:38 +0900)

Merge branch 'bc/mailmap-self'

* bc/mailmap-self:
mailmap: update brian m. carlson's email address

Merge branch 'sb/object-store-replace'Junio C Hamano Wed, 23 May 2018 05:38:09 +0000 (14:38 +0900)

Merge branch 'sb/object-store-replace'

Hotfix.

* sb/object-store-replace:
get_main_ref_store: BUG() when outside a repository
object.c: clear replace map before freeing it
replace-object.c: remove the_repository from prepare_replace_object
object.c: free replace map in raw_object_store_clear

Merge branch 'hn/sort-ls-remote'Junio C Hamano Wed, 23 May 2018 05:38:09 +0000 (14:38 +0900)

Merge branch 'hn/sort-ls-remote'

Hotfix.

* hn/sort-ls-remote:
t5512: run git fetch inside test

remote-curl: accept compressed responses with protocol v2Brandon Williams Tue, 22 May 2018 18:42:04 +0000 (11:42 -0700)

remote-curl: accept compressed responses with protocol v2

Configure curl to accept compressed responses when using protocol v2 by
setting `CURLOPT_ENCODING` to "", which indicates that curl should send
an "Accept-Encoding" header with all supported compression encodings.

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

remote-curl: accept all encodings supported by curlBrandon Williams Tue, 22 May 2018 18:42:03 +0000 (11:42 -0700)

remote-curl: accept all encodings supported by curl

Configure curl to accept all encodings which curl supports instead of
only accepting gzip responses.

This fixes an issue when using an installation of curl which is built
without the "zlib" feature. Since aa90b9697 (Enable info/refs gzip
decompression in HTTP client, 2012-09-19) we end up requesting "gzip"
encoding anyway despite libcurl not being able to decode it. Worse,
instead of getting a clear error message indicating so, we end up
falling back to "dumb" http, producing a confusing and difficult to
debug result.

Since curl doesn't do any checking to verify that it supports the a
requested encoding, instead set the curl option `CURLOPT_ENCODING` with
an empty string indicating that curl should send an "Accept-Encoding"
header containing only the encodings supported by curl.

Reported-by: Anton Golubev <anton.golubev@gmail.com>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.17.1 v2.17.1Junio C Hamano Tue, 22 May 2018 05:28:26 +0000 (14:28 +0900)

Git 2.17.1

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

Merge branch 'jk/submodule-fsck-loose' into maintJunio C Hamano Tue, 22 May 2018 05:26:05 +0000 (14:26 +0900)

Merge branch 'jk/submodule-fsck-loose' into maint

* jk/submodule-fsck-loose:
fsck: complain when .gitmodules is a symlink
index-pack: check .gitmodules files with --strict
unpack-objects: call fsck_finish() after fscking objects
fsck: call fsck_finish() after fscking objects
fsck: check .gitmodules content
fsck: handle promisor objects in .gitmodules check
fsck: detect gitmodules files
fsck: actually fsck blob data
fsck: simplify ".git" check
index-pack: make fsck error message more specific

Sync with Git 2.16.4Junio C Hamano Tue, 22 May 2018 05:25:26 +0000 (14:25 +0900)

Sync with Git 2.16.4

* maint-2.16:
Git 2.16.4
Git 2.15.2
Git 2.14.4
Git 2.13.7
verify_path: disallow symlinks in .gitmodules
update-index: stat updated files earlier
verify_dotfile: mention case-insensitivity in comment
verify_path: drop clever fallthrough
skip_prefix: add case-insensitive variant
is_{hfs,ntfs}_dotgitmodules: add tests
is_ntfs_dotgit: match other .git files
is_hfs_dotgit: match other .git files
is_ntfs_dotgit: use a size_t for traversing string
submodule-config: verify submodule names as paths

Git 2.16.4 v2.16.4Junio C Hamano Tue, 22 May 2018 05:18:51 +0000 (14:18 +0900)

Git 2.16.4

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

Sync with Git 2.15.2Junio C Hamano Tue, 22 May 2018 05:18:06 +0000 (14:18 +0900)

Sync with Git 2.15.2

* maint-2.15:
Git 2.15.2
Git 2.14.4
Git 2.13.7
verify_path: disallow symlinks in .gitmodules
update-index: stat updated files earlier
verify_dotfile: mention case-insensitivity in comment
verify_path: drop clever fallthrough
skip_prefix: add case-insensitive variant
is_{hfs,ntfs}_dotgitmodules: add tests
is_ntfs_dotgit: match other .git files
is_hfs_dotgit: match other .git files
is_ntfs_dotgit: use a size_t for traversing string
submodule-config: verify submodule names as paths

Git 2.15.2 v2.15.2Junio C Hamano Tue, 22 May 2018 05:15:59 +0000 (14:15 +0900)

Git 2.15.2

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

Sync with Git 2.14.4Junio C Hamano Tue, 22 May 2018 05:15:14 +0000 (14:15 +0900)

Sync with Git 2.14.4

* maint-2.14:
Git 2.14.4
Git 2.13.7
verify_path: disallow symlinks in .gitmodules
update-index: stat updated files earlier
verify_dotfile: mention case-insensitivity in comment
verify_path: drop clever fallthrough
skip_prefix: add case-insensitive variant
is_{hfs,ntfs}_dotgitmodules: add tests
is_ntfs_dotgit: match other .git files
is_hfs_dotgit: match other .git files
is_ntfs_dotgit: use a size_t for traversing string
submodule-config: verify submodule names as paths

Git 2.14.4 v2.14.4Junio C Hamano Tue, 22 May 2018 05:12:02 +0000 (14:12 +0900)

Git 2.14.4

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