]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agot5318: avoid unnecessary command substitutions
SZEDER Gábor [Mon, 13 Aug 2018 00:30:10 +0000 (02:30 +0200)] 
t5318: avoid unnecessary command substitutions

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

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: add repo arg to graph readers
Jonathan Tan [Wed, 11 Jul 2018 22:42:42 +0000 (15:42 -0700)] 
commit-graph: add repo arg to graph readers

Add a struct repository argument to the functions in commit-graph.h that
read the commit graph. (This commit does not affect functions that write
commit graphs.)

Because the commit graph functions can now read the commit graph of any
repository, the global variable core_commit_graph has been removed.
Instead, the config option core.commitGraph is now read on the first
time in a repository that a commit is attempted to be parsed using its
commit graph.

This commit includes a test that exercises the functionality on an
arbitrary repository that is not the_repository.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: store graph in struct object_store
Jonathan Tan [Wed, 11 Jul 2018 22:42:41 +0000 (15:42 -0700)] 
commit-graph: store graph in struct object_store

Instead of storing commit graphs in static variables, store them in
struct object_store. There are no changes to the signatures of existing
functions - they all still only support the_repository, and support for
other instances of struct repository will be added in a subsequent
commit.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: add free_commit_graph
Jonathan Tan [Wed, 11 Jul 2018 22:42:40 +0000 (15:42 -0700)] 
commit-graph: add free_commit_graph

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: add missing forward declaration
Jonathan Tan [Wed, 11 Jul 2018 22:42:39 +0000 (15:42 -0700)] 
commit-graph: add missing forward declaration

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject-store: add missing include
Jonathan Tan [Wed, 11 Jul 2018 22:42:38 +0000 (15:42 -0700)] 
object-store: add missing include

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: refactor preparing commit graph
Jonathan Tan [Wed, 11 Jul 2018 22:42:37 +0000 (15:42 -0700)] 
commit-graph: refactor preparing commit graph

Two functions in the code (1) check if the repository is configured for
commit graphs, (2) call prepare_commit_graph(), and (3) check if the
graph exists. Move (1) and (3) into prepare_commit_graph(), reducing
duplication of code.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'ds/commit-graph-fsck' into jt/commit-graph-per-object-store
Junio C Hamano [Tue, 17 Jul 2018 22:46:19 +0000 (15:46 -0700)] 
Merge branch 'ds/commit-graph-fsck' into jt/commit-graph-per-object-store

* ds/commit-graph-fsck: (23 commits)
  coccinelle: update commit.cocci
  commit-graph: update design document
  gc: automatically write commit-graph files
  commit-graph: add '--reachable' option
  commit-graph: use string-list API for input
  fsck: verify commit-graph
  commit-graph: verify contents match checksum
  commit-graph: test for corrupted octopus edge
  commit-graph: verify commit date
  commit-graph: verify generation number
  commit-graph: verify parent list
  commit-graph: verify root tree OIDs
  commit-graph: verify objects exist
  commit-graph: verify corrupt OID fanout and lookup
  commit-graph: verify required chunks are present
  commit-graph: verify catches corrupt signature
  commit-graph: add 'verify' subcommand
  commit-graph: load a root tree from specific graph
  commit: force commit to parse from object database
  commit-graph: parse commit from chosen graph
  ...

5 years agococcinelle: update commit.cocci
Derrick Stolee [Fri, 13 Jul 2018 16:30:46 +0000 (16:30 +0000)] 
coccinelle: update commit.cocci

A recent patch series renamed the get_commit_tree_from_graph method but
forgot to update the coccinelle script that exempted it from rules
regarding accesses to 'maybe_tree'. This fixes that oversight to bring
the coccinelle scripts back to a good state.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: allow lookup_commit_reference to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:22 +0000 (18:22 -0700)] 
commit.c: allow lookup_commit_reference to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: allow lookup_commit_reference_gently to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:21 +0000 (18:22 -0700)] 
commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag.c: allow deref_tag to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:20 +0000 (18:22 -0700)] 
tag.c: allow deref_tag to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject.c: allow parse_object to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:19 +0000 (18:22 -0700)] 
object.c: allow parse_object to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject.c: allow parse_object_buffer to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:18 +0000 (18:22 -0700)] 
object.c: allow parse_object_buffer to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: allow get_cached_commit_buffer to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:17 +0000 (18:22 -0700)] 
commit.c: allow get_cached_commit_buffer to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: allow set_commit_buffer to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:16 +0000 (18:22 -0700)] 
commit.c: allow set_commit_buffer to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: migrate the commit buffer to the parsed object store
Stefan Beller [Fri, 29 Jun 2018 01:22:15 +0000 (18:22 -0700)] 
commit.c: migrate the commit buffer to the parsed object store

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-slabs: remove realloc counter outside of slab struct
Stefan Beller [Fri, 29 Jun 2018 01:22:14 +0000 (18:22 -0700)] 
commit-slabs: remove realloc counter outside of slab struct

The realloc counter is declared outside the struct for the given slabname,
which makes it harder for a follow up patch to move the declaration of the
struct around as then the counter variable would need special treatment.

As the reallocation counter is currently unused we can just remove it.
If we ever need to count the reallocations again, we can reintroduce
the counter as part of 'struct slabname' in commit-slab-decl.h.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit.c: allow parse_commit_buffer to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:13 +0000 (18:22 -0700)] 
commit.c: allow parse_commit_buffer to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag: allow parse_tag_buffer to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:12 +0000 (18:22 -0700)] 
tag: allow parse_tag_buffer to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag: allow lookup_tag to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:11 +0000 (18:22 -0700)] 
tag: allow lookup_tag to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: allow lookup_commit to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:10 +0000 (18:22 -0700)] 
commit: allow lookup_commit to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotree: allow lookup_tree to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:09 +0000 (18:22 -0700)] 
tree: allow lookup_tree to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoblob: allow lookup_blob to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:08 +0000 (18:22 -0700)] 
blob: allow lookup_blob to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: allow lookup_object to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:07 +0000 (18:22 -0700)] 
object: allow lookup_object to handle arbitrary repositories

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: allow object_as_type to handle arbitrary repositories
Stefan Beller [Fri, 29 Jun 2018 01:22:06 +0000 (18:22 -0700)] 
object: allow object_as_type to handle arbitrary repositories

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag: add repository argument to deref_tag
Stefan Beller [Fri, 29 Jun 2018 01:22:05 +0000 (18:22 -0700)] 
tag: add repository argument to deref_tag

Add a repository argument to allow the callers of deref_tag
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag: add repository argument to parse_tag_buffer
Stefan Beller [Fri, 29 Jun 2018 01:22:04 +0000 (18:22 -0700)] 
tag: add repository argument to parse_tag_buffer

Add a repository argument to allow the callers of parse_tag_buffer
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotag: add repository argument to lookup_tag
Stefan Beller [Fri, 29 Jun 2018 01:22:03 +0000 (18:22 -0700)] 
tag: add repository argument to lookup_tag

Add a repository argument to allow the callers of lookup_tag
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to get_cached_commit_buffer
Stefan Beller [Fri, 29 Jun 2018 01:22:02 +0000 (18:22 -0700)] 
commit: add repository argument to get_cached_commit_buffer

Add a repository argument to allow callers of get_cached_commit_buffer to
be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to set_commit_buffer
Stefan Beller [Fri, 29 Jun 2018 01:22:01 +0000 (18:22 -0700)] 
commit: add repository argument to set_commit_buffer

Add a repository argument to allow callers of set_commit_buffer to
be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to parse_commit_buffer
Stefan Beller [Fri, 29 Jun 2018 01:22:00 +0000 (18:22 -0700)] 
commit: add repository argument to parse_commit_buffer

Add a repository argument to allow the callers of parse_commit_buffer
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to lookup_commit
Stefan Beller [Fri, 29 Jun 2018 01:21:59 +0000 (18:21 -0700)] 
commit: add repository argument to lookup_commit

Add a repository argument to allow callers of lookup_commit to be more
specific about which repository to handle. This is a small mechanical
change; it doesn't change the implementation to handle repositories
other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to lookup_commit_reference
Stefan Beller [Fri, 29 Jun 2018 01:21:58 +0000 (18:21 -0700)] 
commit: add repository argument to lookup_commit_reference

Add a repository argument to allow callers of lookup_commit_reference
to be more specific about which repository to handle. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: add repository argument to lookup_commit_reference_gently
Stefan Beller [Fri, 29 Jun 2018 01:21:57 +0000 (18:21 -0700)] 
commit: add repository argument to lookup_commit_reference_gently

Add a repository argument to allow callers of
lookup_commit_reference_gently to be more specific about which
repository to handle. This is a small mechanical change; it doesn't
change the implementation to handle repositories other than
the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotree: add repository argument to lookup_tree
Stefan Beller [Fri, 29 Jun 2018 01:21:56 +0000 (18:21 -0700)] 
tree: add repository argument to lookup_tree

Add a repository argument to allow the callers of lookup_tree
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoblob: add repository argument to lookup_blob
Stefan Beller [Fri, 29 Jun 2018 01:21:55 +0000 (18:21 -0700)] 
blob: add repository argument to lookup_blob

Add a repository argument to allow the callers of lookup_blob
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: add repository argument to object_as_type
Stefan Beller [Fri, 29 Jun 2018 01:21:54 +0000 (18:21 -0700)] 
object: add repository argument to object_as_type

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: add repository argument to parse_object_buffer
Stefan Beller [Fri, 29 Jun 2018 01:21:53 +0000 (18:21 -0700)] 
object: add repository argument to parse_object_buffer

Add a repository argument to allow the callers of parse_object_buffer
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: add repository argument to lookup_object
Stefan Beller [Fri, 29 Jun 2018 01:21:52 +0000 (18:21 -0700)] 
object: add repository argument to lookup_object

Add a repository argument to allow callers of lookup_object to be more
specific about which repository to handle. This is a small mechanical
change; it doesn't change the implementation to handle repositories
other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoobject: add repository argument to parse_object
Stefan Beller [Fri, 29 Jun 2018 01:21:51 +0000 (18:21 -0700)] 
object: add repository argument to parse_object

Add a repository argument to allow the callers of parse_object
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sb/object-store-grafts' into sb/object-store-lookup
Junio C Hamano [Fri, 29 Jun 2018 17:24:33 +0000 (10:24 -0700)] 
Merge branch 'sb/object-store-grafts' into sb/object-store-lookup

* sb/object-store-grafts:
  commit: allow lookup_commit_graft to handle arbitrary repositories
  commit: allow prepare_commit_graft to handle arbitrary repositories
  shallow: migrate shallow information into the object parser
  path.c: migrate global git_path_* to take a repository argument
  cache: convert get_graft_file to handle arbitrary repositories
  commit: convert read_graft_file to handle arbitrary repositories
  commit: convert register_commit_graft to handle arbitrary repositories
  commit: convert commit_graft_pos() to handle arbitrary repositories
  shallow: add repository argument to is_repository_shallow
  shallow: add repository argument to check_shallow_file_for_update
  shallow: add repository argument to register_shallow
  shallow: add repository argument to set_alternate_shallow_file
  commit: add repository argument to lookup_commit_graft
  commit: add repository argument to prepare_commit_graft
  commit: add repository argument to read_graft_file
  commit: add repository argument to register_commit_graft
  commit: add repository argument to commit_graft_pos
  object: move grafts to object parser
  object-store: move object access functions to object-store.h

5 years agoSecond batch for 2.19 cycle
Junio C Hamano [Thu, 28 Jun 2018 19:55:47 +0000 (12:55 -0700)] 
Second batch for 2.19 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sb/fix-fetching-moved-submodules'
Junio C Hamano [Thu, 28 Jun 2018 19:53:34 +0000 (12:53 -0700)] 
Merge branch 'sb/fix-fetching-moved-submodules'

The code to try seeing if a fetch is necessary in a submodule
during a fetch with --recurse-submodules got confused when the path
to the submodule was changed in the range of commits in the
superproject, sometimes showing "(null)".  This has been corrected.

* sb/fix-fetching-moved-submodules:
  t5526: test recursive submodules when fetching moved submodules
  submodule: fix NULL correctness in renamed broken submodules

5 years agoMerge branch 'tz/cred-netrc-cleanup'
Junio C Hamano [Thu, 28 Jun 2018 19:53:33 +0000 (12:53 -0700)] 
Merge branch 'tz/cred-netrc-cleanup'

Build and test procedure for netrc credential helper (in contrib/)
has been updated.

* tz/cred-netrc-cleanup:
  git-credential-netrc: make "all" default target of Makefile
  git-credential-netrc: fix exit status when tests fail
  git-credential-netrc: use in-tree Git.pm for tests
  git-credential-netrc: minor whitespace cleanup in test script

5 years agoMerge branch 'jc/clean-after-sanity-tests'
Junio C Hamano [Thu, 28 Jun 2018 19:53:33 +0000 (12:53 -0700)] 
Merge branch 'jc/clean-after-sanity-tests'

test cleanup.

* jc/clean-after-sanity-tests:
  tests: clean after SANITY tests

5 years agoMerge branch 'nd/completion-negation'
Junio C Hamano [Thu, 28 Jun 2018 19:53:32 +0000 (12:53 -0700)] 
Merge branch 'nd/completion-negation'

Continuing with the idea to programmatically enumerate various
pieces of data required for command line completion, the codebase
has been taught to enumerate options prefixed with "--no-" to
negate them.

* nd/completion-negation:
  completion: collapse extra --no-.. options
  completion: suppress some -no- options
  parse-options: option to let --git-completion-helper show negative form

5 years agoMerge branch 'pw/add-p-recount'
Junio C Hamano [Thu, 28 Jun 2018 19:53:32 +0000 (12:53 -0700)] 
Merge branch 'pw/add-p-recount'

When user edits the patch in "git add -p" and the user's editor is
set to strip trailing whitespaces indiscriminately, an empty line
that is unchanged in the patch would become completely empty
(instead of a line with a sole SP on it).  The code introduced in
Git 2.17 timeframe failed to parse such a patch, but now it learned
to notice the situation and cope with it.

* pw/add-p-recount:
  add -p: fix counting empty context lines in edited patches

5 years agoMerge branch 'jk/fetch-all-peeled-fix'
Junio C Hamano [Thu, 28 Jun 2018 19:53:32 +0000 (12:53 -0700)] 
Merge branch 'jk/fetch-all-peeled-fix'

"git fetch-pack --all" used to unnecessarily fail upon seeing an
annotated tag that points at an object other than a commit.

* jk/fetch-all-peeled-fix:
  fetch-pack: test explicitly that --all can fetch tag references pointing to non-commits
  fetch-pack: don't try to fetch peel values with --all

5 years agoMerge branch 'ms/send-pack-honor-config'
Junio C Hamano [Thu, 28 Jun 2018 19:53:30 +0000 (12:53 -0700)] 
Merge branch 'ms/send-pack-honor-config'

"git send-pack --signed" (hence "git push --signed" over the http
transport) did not read user ident from the config mechanism to
determine whom to sign the push certificate as, which has been
corrected.

* ms/send-pack-honor-config:
  builtin/send-pack: populate the default configs

5 years agoMerge branch 'jh/partial-clone'
Junio C Hamano [Thu, 28 Jun 2018 19:53:30 +0000 (12:53 -0700)] 
Merge branch 'jh/partial-clone'

The recent addition of "partial clone" experimental feature kicked
in when it shouldn't, namely, when there is no partial-clone filter
defined even if extensions.partialclone is set.

* jh/partial-clone:
  list-objects: check if filter is NULL before using

5 years agoMerge branch 'sg/gpg-tests-fix'
Junio C Hamano [Thu, 28 Jun 2018 19:53:29 +0000 (12:53 -0700)] 
Merge branch 'sg/gpg-tests-fix'

Some flaky tests have been fixed.

* sg/gpg-tests-fix:
  tests: make forging GPG signed commits and tags more robust
  t7510-signed-commit: use 'test_must_fail'

5 years agoMerge branch 'as/safecrlf-quiet-fix'
Junio C Hamano [Thu, 28 Jun 2018 19:53:29 +0000 (12:53 -0700)] 
Merge branch 'as/safecrlf-quiet-fix'

Fix for 2.17-era regression around `core.safecrlf`.

* as/safecrlf-quiet-fix:
  config.c: fix regression for core.safecrlf false

5 years agoMerge branch 'ab/refspec-init-fix'
Junio C Hamano [Thu, 28 Jun 2018 19:53:29 +0000 (12:53 -0700)] 
Merge branch 'ab/refspec-init-fix'

Make refspec parsing codepath more robust.

* ab/refspec-init-fix:
  refspec: initalize `refspec_item` in `valid_fetch_refspec()`
  refspec: add back a refspec_item_init() function
  refspec: s/refspec_item_init/&_or_die/g

5 years agocommit-graph: update design document
Derrick Stolee [Wed, 27 Jun 2018 13:24:47 +0000 (09:24 -0400)] 
commit-graph: update design document

The commit-graph feature is now integrated with 'fsck' and 'gc',
so remove those items from the "Future Work" section of the
commit-graph design document.

Also remove the section on lazy-loading trees, as that was completed
in an earlier patch series.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agogc: automatically write commit-graph files
Derrick Stolee [Wed, 27 Jun 2018 13:24:46 +0000 (09:24 -0400)] 
gc: automatically write commit-graph files

The commit-graph file is a very helpful feature for speeding up git
operations. In order to make it more useful, make it possible to
write the commit-graph file during standard garbage collection
operations.

Add a 'gc.commitGraph' config setting that triggers writing a
commit-graph file after any non-trivial 'git gc' command. Defaults to
false while the commit-graph feature matures. We specifically do not
want to have this on by default until the commit-graph feature is fully
integrated with history-modifying features like shallow clones.

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: add '--reachable' option
Derrick Stolee [Wed, 27 Jun 2018 13:24:45 +0000 (09:24 -0400)] 
commit-graph: add '--reachable' option

When writing commit-graph files, it can be convenient to ask for all
reachable commits (starting at the ref set) in the resulting file. This
is particularly helpful when writing to stdin is complicated, such as a
future integration with 'git gc'.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: use string-list API for input
Derrick Stolee [Wed, 27 Jun 2018 13:24:44 +0000 (09:24 -0400)] 
commit-graph: use string-list API for input

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofsck: verify commit-graph
Derrick Stolee [Wed, 27 Jun 2018 13:24:43 +0000 (09:24 -0400)] 
fsck: verify commit-graph

If core.commitGraph is true, verify the contents of the commit-graph
during 'git fsck' using the 'git commit-graph verify' subcommand. Run
this check on all alternates, as well.

We use a new process for two reasons:

1. The subcommand decouples the details of loading and verifying a
   commit-graph file from the other fsck details.

2. The commit-graph verification requires the commits to be loaded
   in a specific order to guarantee we parse from the commit-graph
   file for some objects and from the object database for others.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify contents match checksum
Derrick Stolee [Wed, 27 Jun 2018 13:24:42 +0000 (09:24 -0400)] 
commit-graph: verify contents match checksum

The commit-graph file ends with a SHA1 hash of the previous contents. If
a commit-graph file has errors but the checksum hash is correct, then we
know that the problem is a bug in Git and not simply file corruption
after-the-fact.

Compute the checksum right away so it is the first error that appears,
and make the message translatable since this error can be "corrected" by
a user by simply deleting the file and recomputing. The rest of the
errors are useful only to developers.

Be sure to continue checking the rest of the file data if the checksum
is wrong. This is important for our tests, as we break the checksum as
we modify bytes of the commit-graph file.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: test for corrupted octopus edge
Derrick Stolee [Wed, 27 Jun 2018 13:24:41 +0000 (09:24 -0400)] 
commit-graph: test for corrupted octopus edge

The commit-graph file has an extra chunk to store the parent int-ids for
parents beyond the first parent for octopus merges. Our test repo has a
single octopus merge that we can manipulate to demonstrate the 'verify'
subcommand detects incorrect values in that chunk.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify commit date
Derrick Stolee [Wed, 27 Jun 2018 13:24:40 +0000 (09:24 -0400)] 
commit-graph: verify commit date

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify generation number
Derrick Stolee [Wed, 27 Jun 2018 13:24:39 +0000 (09:24 -0400)] 
commit-graph: verify generation number

While iterating through the commit parents, perform the generation
number calculation and compare against the value stored in the
commit-graph.

The tests demonstrate that having a different set of parents affects
the generation number calculation, and this value propagates to
descendants. Hence, we drop the single-line condition on the output.

Since Git will ship with the commit-graph feature without generation
numbers, we need to accept commit-graphs with all generation numbers
equal to zero. In this case, ignore the generation number calculation.

However, verify that we should never have a mix of zero and non-zero
generation numbers. Create a test that sets one commit to generation
zero and all following commits report a failure as they have non-zero
generation in a file that contains generation number zero.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify parent list
Derrick Stolee [Wed, 27 Jun 2018 13:24:38 +0000 (09:24 -0400)] 
commit-graph: verify parent list

The commit-graph file stores parents in a two-column portion of the
commit data chunk. If there is only one parent, then the second column
stores 0xFFFFFFFF to indicate no second parent.

The 'verify' subcommand checks the parent list for the commit loaded
from the commit-graph and the one parsed from the object database. Test
these checks for corrupt parents, too many parents, and wrong parents.

Add a boundary check to insert_parent_or_die() for when the parent
position value is out of range.

The octopus merge will be tested in a later commit.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify root tree OIDs
Derrick Stolee [Wed, 27 Jun 2018 13:24:37 +0000 (09:24 -0400)] 
commit-graph: verify root tree OIDs

The 'verify' subcommand must compare the commit content parsed from the
commit-graph against the content in the object database. Use
lookup_commit() and parse_commit_in_graph_one() to parse the commits
from the graph and compare against a commit that is loaded separately
and parsed directly from the object database.

Add checks for the root tree OID.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify objects exist
Derrick Stolee [Wed, 27 Jun 2018 13:24:36 +0000 (09:24 -0400)] 
commit-graph: verify objects exist

In the 'verify' subcommand, load commits directly from the object
database to ensure they exist. Parse by skipping the commit-graph.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify corrupt OID fanout and lookup
Derrick Stolee [Wed, 27 Jun 2018 13:24:35 +0000 (09:24 -0400)] 
commit-graph: verify corrupt OID fanout and lookup

In the commit-graph file, the OID fanout chunk provides an index into
the OID lookup. The 'verify' subcommand should find incorrect values
in the fanout.

Similarly, the 'verify' subcommand should find out-of-order values in
the OID lookup.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify required chunks are present
Derrick Stolee [Wed, 27 Jun 2018 13:24:34 +0000 (09:24 -0400)] 
commit-graph: verify required chunks are present

The commit-graph file requires the following three chunks:

* OID Fanout
* OID Lookup
* Commit Data

If any of these are missing, then the 'verify' subcommand should
report a failure. This includes the chunk IDs malformed or the
chunk count is truncated.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: verify catches corrupt signature
Derrick Stolee [Wed, 27 Jun 2018 13:24:33 +0000 (09:24 -0400)] 
commit-graph: verify catches corrupt signature

This is the first of several commits that add a test to check that
'git commit-graph verify' catches corruption in the commit-graph
file. The first test checks that the command catches an error in
the file signature. This is a check that exists in the existing
commit-graph reading code.

Add a helper method 'corrupt_graph_and_verify' to the test script
t5318-commit-graph.sh. This helper corrupts the commit-graph file
at a certain location, runs 'git commit-graph verify', and reports
the output to the 'err' file. This data is filtered to remove the
lines added by 'test_must_fail' when the test is run verbosely.
Then, the output is checked to contain a specific error message.

Most messages from 'git commit-graph verify' will not be marked
for translation. There will be one exception: the message that
reports an invalid checksum will be marked for translation, as that
is the only message that is intended for a typical user.

Helped-by: Szeder Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: add 'verify' subcommand
Derrick Stolee [Wed, 27 Jun 2018 13:24:32 +0000 (09:24 -0400)] 
commit-graph: add 'verify' subcommand

If the commit-graph file becomes corrupt, we need a way to verify
that its contents match the object database. In the manner of
'git fsck' we will implement a 'git commit-graph verify' subcommand
to report all issues with the file.

Add the 'verify' subcommand to the 'commit-graph' builtin and its
documentation. The subcommand is currently a no-op except for
loading the commit-graph into memory, which may trigger run-time
errors that would be caught by normal use. Add a simple test that
ensures the command returns a zero error code.

If no commit-graph file exists, this is an acceptable state. Do
not report any errors.

Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: load a root tree from specific graph
Derrick Stolee [Wed, 27 Jun 2018 13:24:31 +0000 (09:24 -0400)] 
commit-graph: load a root tree from specific graph

When lazy-loading a tree for a commit, it will be important to select
the tree from a specific struct commit_graph. Create a new method that
specifies the commit-graph file and use that in
get_commit_tree_in_graph().

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit: force commit to parse from object database
Derrick Stolee [Wed, 27 Jun 2018 13:24:30 +0000 (09:24 -0400)] 
commit: force commit to parse from object database

In anticipation of verifying commit-graph file contents against the
object database, create parse_commit_internal() to allow side-stepping
the commit-graph file and parse directly from the object database.

Due to the use of generation numbers, this method should not be called
unless the intention is explicit in avoiding commits from the
commit-graph file.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: parse commit from chosen graph
Derrick Stolee [Wed, 27 Jun 2018 13:24:29 +0000 (09:24 -0400)] 
commit-graph: parse commit from chosen graph

Before verifying a commit-graph file against the object database, we
need to parse all commits from the given commit-graph file. Create
parse_commit_in_graph_one() to target a given struct commit_graph.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: fix GRAPH_MIN_SIZE
Derrick Stolee [Wed, 27 Jun 2018 13:24:28 +0000 (09:24 -0400)] 
commit-graph: fix GRAPH_MIN_SIZE

The GRAPH_MIN_SIZE macro should be the smallest size of a parsable
commit-graph file. However, the minimum number of chunks was wrong.
It is possible to write a commit-graph file with zero commits, and
that violates this macro's value.

Rewrite the macro, and use extra macros to better explain the magic
constants.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-graph: UNLEAK before die()
Derrick Stolee [Wed, 27 Jun 2018 13:24:27 +0000 (09:24 -0400)] 
commit-graph: UNLEAK before die()

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot5318-commit-graph.sh: use core.commitGraph
Derrick Stolee [Wed, 27 Jun 2018 13:24:26 +0000 (09:24 -0400)] 
t5318-commit-graph.sh: use core.commitGraph

The commit-graph tests should be checking that normal Git operations
succeed and have matching output with and without the commit-graph
feature enabled. However, the test was toggling 'core.graph' instead
of the correct 'core.commitGraph' variable.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoFirst batch for 2.19 cycle
Junio C Hamano [Mon, 25 Jun 2018 20:27:15 +0000 (13:27 -0700)] 
First batch for 2.19 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sb/plug-misc-leaks'
Junio C Hamano [Mon, 25 Jun 2018 20:22:41 +0000 (13:22 -0700)] 
Merge branch 'sb/plug-misc-leaks'

Misc leak plugging.

* sb/plug-misc-leaks:
  sequencer.c: plug mem leak in git_sequencer_config
  sequencer.c: plug leaks in do_pick_commit
  submodule--helper: plug mem leak in print_default_remote
  refs/packed-backend.c: close fd of empty file

5 years agoMerge branch 'cc/tests-without-assuming-ref-files-backend'
Junio C Hamano [Mon, 25 Jun 2018 20:22:41 +0000 (13:22 -0700)] 
Merge branch 'cc/tests-without-assuming-ref-files-backend'

Instead of mucking with filesystem directly, use plumbing commands
update-ref etc. to manipulate the refs in the tests.

* cc/tests-without-assuming-ref-files-backend:
  t9104: kosherly remove remote refs

5 years agoMerge branch 'sg/update-ref-stdin-cleanup'
Junio C Hamano [Mon, 25 Jun 2018 20:22:40 +0000 (13:22 -0700)] 
Merge branch 'sg/update-ref-stdin-cleanup'

Code cleanup.

* sg/update-ref-stdin-cleanup:
  update-ref --stdin: use skip_prefix()

5 years agoMerge branch 'nd/reject-empty-shallow-request'
Junio C Hamano [Mon, 25 Jun 2018 20:22:40 +0000 (13:22 -0700)] 
Merge branch 'nd/reject-empty-shallow-request'

"git fetch --shallow-since=<cutoff>" that specifies the cut-off
point that is newer than the existing history used to end up
grabbing the entire history.  Such a request now errors out.

* nd/reject-empty-shallow-request:
  upload-pack: reject shallow requests that would return nothing

5 years agoMerge branch 'ls/complete-remote-update-names'
Junio C Hamano [Mon, 25 Jun 2018 20:22:39 +0000 (13:22 -0700)] 
Merge branch 'ls/complete-remote-update-names'

"git remote update" can take both a single remote nickname and a
nickname for remote groups, and the completion script (in contrib/)
has been taught about it.

* ls/complete-remote-update-names:
  completion: complete remote names too

5 years agoMerge branch 'ag/rebase-p'
Junio C Hamano [Mon, 25 Jun 2018 20:22:39 +0000 (13:22 -0700)] 
Merge branch 'ag/rebase-p'

Separate "rebase -p" codepath out of "rebase -i" implementation to
slim down the latter and make it easier to manage.

* ag/rebase-p:
  rebase: remove -p code from git-rebase--interactive.sh
  rebase: use the new git-rebase--preserve-merges.sh
  rebase: strip unused code in git-rebase--preserve-merges.sh
  rebase: introduce a dedicated backend for --preserve-merges

5 years agoMerge branch 'nd/complete-config-vars'
Junio C Hamano [Mon, 25 Jun 2018 20:22:38 +0000 (13:22 -0700)] 
Merge branch 'nd/complete-config-vars'

Continuing with the idea to programatically enumerate various
pieces of data required for command line completion, teach the
codebase to report the list of configuration variables
subcommands care about to help complete them.

* nd/complete-config-vars:
  completion: complete general config vars in two steps
  log-tree: allow to customize 'grafted' color
  completion: support case-insensitive config vars
  completion: keep other config var completion in camelCase
  completion: drop the hard coded list of config vars
  am: move advice.amWorkDir parsing back to advice.c
  advice: keep config name in camelCase in advice_config[]
  fsck: produce camelCase config key names
  help: add --config to list all available config
  fsck: factor out msg_id_info[] lazy initialization code
  grep: keep all colors in an array
  Add and use generic name->id mapping code for color slot parsing

5 years agoMerge branch 'sb/object-store-alloc'
Junio C Hamano [Mon, 25 Jun 2018 20:22:38 +0000 (13:22 -0700)] 
Merge branch 'sb/object-store-alloc'

The conversion to pass "the_repository" and then "a_repository"
throughout the object access API continues.

* sb/object-store-alloc:
  alloc: allow arbitrary repositories for alloc functions
  object: allow create_object to handle arbitrary repositories
  object: allow grow_object_hash to handle arbitrary repositories
  alloc: add repository argument to alloc_commit_index
  alloc: add repository argument to alloc_report
  alloc: add repository argument to alloc_object_node
  alloc: add repository argument to alloc_tag_node
  alloc: add repository argument to alloc_commit_node
  alloc: add repository argument to alloc_tree_node
  alloc: add repository argument to alloc_blob_node
  object: add repository argument to grow_object_hash
  object: add repository argument to create_object
  repository: introduce parsed objects field

5 years agoMerge branch 'jk/show-index'
Junio C Hamano [Mon, 25 Jun 2018 20:22:37 +0000 (13:22 -0700)] 
Merge branch 'jk/show-index'

Modernize a less often used command.

* jk/show-index:
  show-index: update documentation for index v2
  make show-index a builtin

5 years agoMerge branch 'en/merge-recursive-tests'
Junio C Hamano [Mon, 25 Jun 2018 20:22:36 +0000 (13:22 -0700)] 
Merge branch 'en/merge-recursive-tests'

Clean up tests in t6xxx series about 'merge' command.

* en/merge-recursive-tests:
  t6036: prefer test_when_finished to manual cleanup in following test
  t6036, t6042: prefer test_cmp to sequences of test
  t6036, t6042: prefer test_path_is_file, test_path_is_missing
  t6036, t6042: use test_line_count instead of wc -l
  t6036, t6042: use test_create_repo to keep tests independent

5 years agoMerge branch 'nd/diff-apply-ita'
Junio C Hamano [Mon, 25 Jun 2018 20:22:36 +0000 (13:22 -0700)] 
Merge branch 'nd/diff-apply-ita'

"git diff" compares the index and the working tree.  For paths
added with intent-to-add bit, the command shows the full contents
of them as added, but the paths themselves were not marked as new
files.  They are now shown as new by default.

"git apply" learned the "--intent-to-add" option so that an
otherwise working-tree-only application of a patch will add new
paths to the index marked with the "intent-to-add" bit.

* nd/diff-apply-ita:
  apply: add --intent-to-add
  t2203: add a test about "diff HEAD" case
  diff: turn --ita-invisible-in-index on by default
  diff: ignore --ita-[in]visible-in-index when diffing worktree-to-tree

5 years agoMerge branch 'ds/commit-graph-lockfile-fix'
Junio C Hamano [Mon, 25 Jun 2018 20:22:36 +0000 (13:22 -0700)] 
Merge branch 'ds/commit-graph-lockfile-fix'

Update to ds/generation-numbers topic.

* ds/commit-graph-lockfile-fix:
  commit-graph: fix UX issue when .lock file exists
  commit-graph.txt: update design document
  merge: check config before loading commits
  commit: use generation number in remove_redundant()
  commit: add short-circuit to paint_down_to_common()
  commit: use generation numbers for in_merge_bases()
  ref-filter: use generation number for --contains
  commit-graph: always load commit-graph information
  commit: use generations in paint_down_to_common()
  commit-graph: compute generation numbers
  commit: add generation number to struct commit
  ref-filter: fix outdated comment on in_commit_list

5 years agoMerge branch 'nd/commit-util-to-slab'
Junio C Hamano [Mon, 25 Jun 2018 20:22:35 +0000 (13:22 -0700)] 
Merge branch 'nd/commit-util-to-slab'

The in-core "commit" object had an all-purpose "void *util" field,
which was tricky to use especially in library-ish part of the
code.  All of the existing uses of the field has been migrated to a
more dedicated "commit-slab" mechanism and the field is eliminated.

* nd/commit-util-to-slab:
  commit.h: delete 'util' field in struct commit
  merge: use commit-slab in merge remote desc instead of commit->util
  log: use commit-slab in prepare_bases() instead of commit->util
  show-branch: note about its object flags usage
  show-branch: use commit-slab for commit-name instead of commit->util
  name-rev: use commit-slab for rev-name instead of commit->util
  bisect.c: use commit-slab for commit weight instead of commit->util
  revision.c: use commit-slab for show_source
  sequencer.c: use commit-slab to associate todo items to commits
  sequencer.c: use commit-slab to mark seen commits
  shallow.c: use commit-slab for commit depth instead of commit->util
  describe: use commit-slab for commit names instead of commit->util
  blame: use commit-slab for blame suspects instead of commit->util
  commit-slab: support shared commit-slab
  commit-slab.h: code split

5 years agoMerge branch 'pc/submodule-helper-foreach'
Junio C Hamano [Mon, 25 Jun 2018 20:22:35 +0000 (13:22 -0700)] 
Merge branch 'pc/submodule-helper-foreach'

The bulk of "git submodule foreach" has been rewritten in C.

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

5 years agoPrepare to start 2.19 cycle
Junio C Hamano [Mon, 25 Jun 2018 20:22:27 +0000 (13:22 -0700)] 
Prepare to start 2.19 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer.c: plug mem leak in git_sequencer_config
Stefan Beller [Fri, 1 Jun 2018 20:01:46 +0000 (13:01 -0700)] 
sequencer.c: plug mem leak in git_sequencer_config

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoGit 2.18 v2.18.0
Junio C Hamano [Thu, 21 Jun 2018 17:00:06 +0000 (10:00 -0700)] 
Git 2.18

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'en/rename-directory-detection-reboot'
Junio C Hamano [Tue, 19 Jun 2018 18:11:03 +0000 (11:11 -0700)] 
Merge branch 'en/rename-directory-detection-reboot'

* en/rename-directory-detection-reboot:
  merge-recursive: use xstrdup() instead of fixed buffer

5 years agoMerge tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 19 Jun 2018 16:29:23 +0000 (09:29 -0700)] 
Merge tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po

Merge Korean translation for l10n of Git 2.18.0 round 3

* tag 'l10n-2.18.0-rnd3.1' of git://github.com/git-l10n/git-po:
  l10n: ko.po: Update Korean translation

5 years agoMerge branch 'cf/submodule-progress-dissociate'
Junio C Hamano [Tue, 19 Jun 2018 16:26:59 +0000 (09:26 -0700)] 
Merge branch 'cf/submodule-progress-dissociate'

* cf/submodule-progress-dissociate:
  t7400: encapsulate setup code in test_expect_success

5 years agoMerge branch 'js/rebase-i-root-fix'
Junio C Hamano [Tue, 19 Jun 2018 16:26:28 +0000 (09:26 -0700)] 
Merge branch 'js/rebase-i-root-fix'

* js/rebase-i-root-fix:
  t3404: check root commit in 'rebase -i --root reword root commit'

5 years agot7400: encapsulate setup code in test_expect_success
Stefan Beller [Mon, 18 Jun 2018 23:41:48 +0000 (16:41 -0700)] 
t7400: encapsulate setup code in test_expect_success

When running t7400 in a shell you observe more output than expected:

    ...
    ok 8 - setup - hide init subdirectory
    ok 9 - setup - repository to add submodules to
    ok 10 - submodule add
    [master (root-commit) d79ce16] one
     Author: A U Thor <author@example.com>
     1 file changed, 1 insertion(+)
     create mode 100644 one.t
    ok 11 - redirected submodule add does not show progress
    ok 12 - redirected submodule add --progress does show progress
    ok 13 - submodule add to .gitignored path fails
    ...

Fix the output by encapsulating the setup code in test_expect_success

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3404: check root commit in 'rebase -i --root reword root commit'
Todd Zullinger [Mon, 18 Jun 2018 22:19:42 +0000 (18:19 -0400)] 
t3404: check root commit in 'rebase -i --root reword root commit'

When testing a reworded root commit, ensure that the squash-onto commit
which is created and amended is still the root commit.

Suggested-by: Phillip Wood <phillip.wood@talktalk.net>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>