]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
3 years agobloom: de-duplicate directory entries
Derrick Stolee [Mon, 11 May 2020 11:56:12 +0000 (11:56 +0000)] 
bloom: de-duplicate directory entries

When computing a changed-path Bloom filter, we need to take the
files that changed from the diff computation and extract the parent
directories. That way, a directory pathspec such as "Documentation"
could match commits that change "Documentation/git.txt".

However, the current code does a poor job of this process. The paths
are added to a hashmap, but we do not check if an entry already
exists with that path. This can create many duplicate entries and
cause the filter to have a much larger length than it should. This
means that the filter is more sparse than intended, which helps the
false positive rate, but wastes a lot of space.

Properly use hashmap_get() before hashmap_add(). Also be sure to
include a comparison function so these can be matched correctly.

This has an effect on a test in t0095-bloom.sh. This makes sense,
there are ten changes inside "smallDir" so the total number of
paths in the filter should be 11. This would result in 11 * 10 bits
required, and with 8 bits per byte, this results in 14 bytes.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agoDocumentation: changed-path Bloom filters use byte words
Derrick Stolee [Mon, 11 May 2020 11:56:11 +0000 (11:56 +0000)] 
Documentation: changed-path Bloom filters use byte words

In Documentation/technical/commit-graph-format.txt, the definition
of the BIDX chunk specifies the length is a number of 8-byte words.
During development we discovered that using 8-byte words in the
Murmur3 hash algorithm causes issues with big-endian versus little-
endian machines. Thus, the hash algorithm was adapted to work on a
byte-by-byte basis. However, this caused a change in the definition
of a "word" in bloom.h. Now, a "word" is a single byte, which allows
filters to be as small as two bytes. These length-two filters are
demonstrated in t0095-bloom.sh, and a larger filter of length 25 is
demonstrated as well.

The original point of using 8-byte words was for alignment reasons.
It also presented opportunities for extremely sparse Bloom filters
when there were a small number of changes at a commit, creating a
very low false-positive rate. However, modifying the format at this
point is unlikely to be a valuable exercise. Also, this use of
single-byte granularity does present opportunities to save space.
It is unclear if 8-byte alignment of the filters would present any
meaningful performance benefits.

Modify the format document to reflect reality.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 years agobloom: parse commit before computing filters
Derrick Stolee [Mon, 11 May 2020 11:56:10 +0000 (11:56 +0000)] 
bloom: parse commit before computing filters

When computing changed-path Bloom filters for a commit, we need to
know if the commit has a parent or not. If the commit is not parsed,
then its parent pointer will be NULL.

As far as I can tell, the only opportunity to reach this code
without parsing the commit is inside "test-tool bloom
get_filter_for_commit" but it is best to be safe.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-bloom: fix usage typo
Derrick Stolee [Fri, 1 May 2020 15:30:19 +0000 (15:30 +0000)] 
test-bloom: fix usage typo

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobloom: fix whitespace around tab length
Derrick Stolee [Fri, 1 May 2020 15:30:18 +0000 (15:30 +0000)] 
bloom: fix whitespace around tab length

Fix alignment issues that were likely introduced due to an editor
using tab lengths of 4 instead of 8.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-bloom: check that we have expected arguments
Jeff King [Thu, 23 Apr 2020 20:59:14 +0000 (16:59 -0400)] 
test-bloom: check that we have expected arguments

If "test-tool bloom" is not fed a command, or if arguments are missing
for some commands, it will just segfault. Let's check argc and write a
friendlier usage message.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotest-bloom: fix some whitespace issues
Jeff King [Thu, 23 Apr 2020 20:59:07 +0000 (16:59 -0400)] 
test-bloom: fix some whitespace issues

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoblame: drop unused parameter from maybe_changed_path
Jeff King [Thu, 23 Apr 2020 21:03:03 +0000 (17:03 -0400)] 
blame: drop unused parameter from maybe_changed_path

We don't use the "parent" parameter at all (probably because the bloom
filter for a commit is always defined against a single parent anyway).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoblame: use changed-path Bloom filters
Derrick Stolee [Thu, 16 Apr 2020 20:14:04 +0000 (20:14 +0000)] 
blame: use changed-path Bloom filters

The changed-path Bloom filters help reduce the amount of tree
parsing required during history queries. Before calculating a
diff, we can ask the filter if a path changed between a commit
and its first parent. If the filter says "no" then we can move
on without parsing trees. If the filter says "maybe" then we
parse trees to discover if the answer is actually "yes" or "no".

When computing a blame, there is a section in find_origin() that
computes a diff between a commit and one of its parents. When this
is the first parent, we can check the Bloom filters before calling
diff_tree_oid().

In order to make this work with the blame machinery, we need to
initialize a struct bloom_key with the initial path. But also, we
need to add more keys to a list if a rename is detected. We then
check to see if _any_ of these keys answer "maybe" in the diff.

During development, I purposefully left out this "add a new key
when a rename is detected" to see if the test suite would catch
my error. That is how I discovered the issues with
GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS from the previous change.
With that change, we can feel some confidence in the coverage of
this change.

If a user requests copy detection using "git blame -C", then there
are more places where the set of "important" files can expand. I
do not know enough about how this happens in the blame machinery.
Thus, the Bloom filter integration is explicitly disabled in this
mode. A later change could expand the bloom_key data with an
appropriate call (or calls) to add_bloom_key().

If we did not disable this mode, then the following tests would
fail:

t8003-blame-corner-cases.sh
t8011-blame-split-file.sh

Generally, this is a performance enhancement and should not
change the behavior of 'git blame' in any way. If a repo has a
commit-graph file with computed changed-path Bloom filters, then
they should notice improved performance for their 'git blame'
commands.

Here are some example timings that I found by blaming some paths
in the Linux kernel repository:

 git blame arch/x86/kernel/topology.c >/dev/null

 Before: 0.83s
  After: 0.24s

 git blame kernel/time/time.c >/dev/null

 Before: 0.72s
  After: 0.24s

 git blame tools/perf/ui/stdio/hist.c >/dev/null

 Before: 0.27s
  After: 0.11s

I specifically looked for "deep" paths that were also edited many
times. As a counterpoint, the MAINTAINERS file was edited many
times but is located in the root tree. This means that the cost of
computing a diff relative to the pathspec is very small. Here are
the timings for that command:

 git blame MAINTAINERS >/dev/null

 Before: 20.1s
  After: 18.0s

These timings are the best of five. The worst-case runs were on the
order of 2.5 minutes for both cases. Note that the MAINTAINERS file
has 18,740 lines across 17,000+ commits. This happens to be one of
the cases where this change provides the least improvement.

The lack of improvement for the MAINTAINERS file and the relatively
modest improvement for the other examples can be easily explained.
The blame machinery needs to compute line-level diffs to determine
which lines were changed by each commit. That makes up a large
proportion of the computation time, and this change does not
attempt to improve on that section of the algorithm. The
MAINTAINERS file is large and changed often, so it takes time to
determine which lines were updated by which commit. In contrast,
the code files are much smaller, and it takes longer to comute
the line-by-line diff for a single patch on the Linux mailing
lists.

Outside of the "-C" integration, I believe there is little more to
gain from the changed-path Bloom filters for 'git blame' after this
patch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agotests: write commit-graph with Bloom filters
Derrick Stolee [Thu, 16 Apr 2020 20:14:03 +0000 (20:14 +0000)] 
tests: write commit-graph with Bloom filters

The GIT_TEST_COMMIT_GRAPH environment variable updates the commit-
graph file whenever "git commit" is run, ensuring that we always
have an updated commit-graph throughout the test suite. The
GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS environment variable was
introduced to write the changed-path Bloom filters whenever "git
commit-graph write" is run. However, the GIT_TEST_COMMIT_GRAPH
trick doesn't launch a separate process and instead writes it
directly.

To expand the number of tests that have commits in the commit-graph
file, add a helper method that computes the commit-graph and place
that helper inside "git commit" and "git merge".

In the helper method, check GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS
to ensure we are writing changed-path Bloom filters whenever
possible.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorevision: complicated pathspecs disable filters
Derrick Stolee [Thu, 16 Apr 2020 20:14:02 +0000 (20:14 +0000)] 
revision: complicated pathspecs disable filters

The changed-path Bloom filters work only when we can compute an
explicit Bloom filter key in advance. When a pathspec is given
that allows case-insensitive checks or wildcard matching, we
must disable the Bloom filter performance checks.

By checking the pathspec in prepare_to_use_bloom_filters(), we
avoid setting up the Bloom filter data and thus revert to the
usual logic.

Before this change, the following tests would fail*:

t6004-rev-list-path-optim.sh (Tests 6-7)
t6130-pathspec-noglob.sh (Tests 3-6)
t6131-pathspec-icase.sh (Tests 3-5)

*These tests would fail when using GIT_TEST_COMMIT_GRAPH and
GIT_TEST_COMMIT_GRAPH_BLOOM_FILTERS except that the latter
environment variable was not set up correctly to write the changed-
path Bloom filters in the test suite. That will be fixed in the
next change.

Helped-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobloom: ignore renames when computing changed paths
Derrick Stolee [Thu, 9 Apr 2020 13:00:11 +0000 (13:00 +0000)] 
bloom: ignore renames when computing changed paths

The changed-path Bloom filters record an entry in the filter for
every path that was changed. This includes every add and delete,
regardless of whether a rename was detected. Detecting renames
causes significant performance issues, but also will trigger
downloading missing blobs in partial clone.

The simple fix is to disable rename detection when computing a
changed-path Bloom filter. This should already be disabled by
default, but it is good to explicitly enforce the intended
behavior.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag
Garima Singh [Mon, 6 Apr 2020 16:59:55 +0000 (16:59 +0000)] 
commit-graph: add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag

Add GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS test flag to the test setup suite
in order to toggle writing Bloom filters when running any of the git tests.
If set to true, we will compute and write Bloom filters every time a test
calls `git commit-graph write`, as if the `--changed-paths` option was
passed in.

The test suite passes when GIT_TEST_COMMIT_GRAPH and
GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS are enabled.

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agot4216: add end to end tests for git log with Bloom filters
Garima Singh [Mon, 6 Apr 2020 16:59:54 +0000 (16:59 +0000)] 
t4216: add end to end tests for git log with Bloom filters

These tests exercises writing commit graph with Bloom filters
and exercises 'git log -- path' with all the applicable
options. They check that the output is the same with and
without Bloom filters, confirm Bloom filters were used by
checking if trace2 statistics were logged correctly.

Also confirms cases where Bloom filters are not used:
1. Multiple path specs,
2. --walk-reflogs (see patch titled 'revision.c: use Bloom filters...'
   for details,
3. If the latest commit graph does not have Bloom filters

Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorevision.c: add trace2 stats around Bloom filter usage
Garima Singh [Mon, 6 Apr 2020 16:59:53 +0000 (16:59 +0000)] 
revision.c: add trace2 stats around Bloom filter usage

Add trace2 statistics around Bloom filter usage and behavior
for 'git log -- path' commands that are hoping to benefit from
the presence of computed changed paths Bloom filters.

These statistics are great for performance analysis work and
for formal testing, which we will see in the commit following
this one.

Helped-by: Derrick Stolee <dstolee@microsoft.com
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Helped-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agorevision.c: use Bloom filters to speed up path based revision walks
Garima Singh [Mon, 6 Apr 2020 16:59:52 +0000 (16:59 +0000)] 
revision.c: use Bloom filters to speed up path based revision walks

Revision walk will now use Bloom filters for commits to speed up
revision walks for a particular path (for computing history for
that path), if they are present in the commit-graph file.

We load the Bloom filters during the prepare_revision_walk step,
currently only when dealing with a single pathspec. Extending
it to work with multiple pathspecs can be explored and built on
top of this series in the future.

While comparing trees in rev_compare_trees(), if the Bloom filter
says that the file is not different between the two trees, we don't
need to compute the expensive diff. This is where we get our
performance gains. The other response of the Bloom filter is '`:maybe',
in which case we fall back to the full diff calculation to determine
if the path was changed in the commit.

We do not try to use Bloom filters when the '--walk-reflogs' option
is specified. The '--walk-reflogs' option does not walk the commit
ancestry chain like the rest of the options. Incorporating the
performance gains when walking reflog entries would add more
complexity, and can be explored in a later series.

Performance Gains:
We tested the performance of `git log -- <path>` on the git repo, the linux
and some internal large repos, with a variety of paths of varying depths.

On the git and linux repos:
- we observed a 2x to 5x speed up.

On a large internal repo with files seated 6-10 levels deep in the tree:
- we observed 10x to 20x speed ups, with some paths going up to 28 times
  faster.

Helped-by: Derrick Stolee <dstolee@microsoft.com
Helped-by: SZEDER Gábor <szeder.dev@gmail.com>
Helped-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: add --changed-paths option to write subcommand
Garima Singh [Mon, 6 Apr 2020 16:59:51 +0000 (16:59 +0000)] 
commit-graph: add --changed-paths option to write subcommand

Add --changed-paths option to git commit-graph write. This option will
allow users to compute information about the paths that have changed
between a commit and its first parent, and write it into the commit graph
file. If the option is passed to the write subcommand we set the
COMMIT_GRAPH_WRITE_BLOOM_FILTERS flag and pass it down to the
commit-graph logic.

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: reuse existing Bloom filters during write
Garima Singh [Mon, 6 Apr 2020 16:59:50 +0000 (16:59 +0000)] 
commit-graph: reuse existing Bloom filters during write

Add logic to
a) parse Bloom filter information from the commit graph file and,
b) re-use existing Bloom filters.

See Documentation/technical/commit-graph-format for the format in which
the Bloom filter information is written to the commit graph file.

To read Bloom filter for a given commit with lexicographic position
'i' we need to:
1. Read BIDX[i] which essentially gives us the starting index in BDAT for
   filter of commit i+1. It is essentially the index past the end
   of the filter of commit i. It is called end_index in the code.

2. For i>0, read BIDX[i-1] which will give us the starting index in BDAT
   for filter of commit i. It is called the start_index in the code.
   For the first commit, where i = 0, Bloom filter data starts at the
   beginning, just past the header in the BDAT chunk. Hence, start_index
   will be 0.

3. The length of the filter will be end_index - start_index, because
   BIDX[i] gives the cumulative 8-byte words including the ith
   commit's filter.

We toggle whether Bloom filters should be recomputed based on the
compute_if_not_present flag.

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: write Bloom filters to commit graph file
Garima Singh [Mon, 6 Apr 2020 16:59:49 +0000 (16:59 +0000)] 
commit-graph: write Bloom filters to commit graph file

Update the technical documentation for commit-graph-format with
the formats for the Bloom filter index (BIDX) and Bloom filter
data (BDAT) chunks. Write the computed Bloom filters information
to the commit graph file using this format.

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: examine commits by generation number
Garima Singh [Mon, 30 Mar 2020 00:31:30 +0000 (00:31 +0000)] 
commit-graph: examine commits by generation number

When running 'git commit-graph write --changed-paths', we sort the
commits by pack-order to save time when computing the changed-paths
bloom filters. This does not help when finding the commits via the
'--reachable' flag.

If not using pack-order, then sort by generation number before
examining the diff. Commits with similar generation are more likely
to have many trees in common, making the diff faster.

On the Linux kernel repository, this change reduced the computation
time for 'git commit-graph write --reachable --changed-paths' from
3m00s to 1m37s.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: examine changed-path objects in pack order
Jeff King [Mon, 30 Mar 2020 00:31:29 +0000 (00:31 +0000)] 
commit-graph: examine changed-path objects in pack order

Looking at the diff of commit objects in pack order is much faster than
in sha1 order, as it gives locality to the access of tree deltas
(whereas sha1 order is effectively random). Unfortunately the
commit-graph code sorts the commits (several times, sometimes as an oid
and sometimes a pointer-to-commit), and we ultimately traverse in sha1
order.

Instead, let's remember the position at which we see each commit, and
traverse in that order when looking at bloom filters. This drops my time
for "git commit-graph write --changed-paths" in linux.git from ~4
minutes to ~1.5 minutes.

Probably the "--reachable" code path would want something similar.

Or alternatively, we could use a different data structure (either a
hash, or maybe even just a bit in "struct commit") to keep track of
which oids we've seen, etc instead of sorting. And then we could keep
the original order.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: compute Bloom filters for changed paths
Garima Singh [Mon, 30 Mar 2020 00:31:28 +0000 (00:31 +0000)] 
commit-graph: compute Bloom filters for changed paths

Add new COMMIT_GRAPH_WRITE_CHANGED_PATHS flag that makes Git compute
Bloom filters for the paths that changed between a commit and it's
first parent, for each commit in the commit-graph.  This computation
is done on a commit-by-commit basis.

We will write these Bloom filters to the commit-graph file, to store
this data on disk, in the next change in this series.

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agodiff: halt tree-diff early after max_changes
Derrick Stolee [Mon, 30 Mar 2020 00:31:27 +0000 (00:31 +0000)] 
diff: halt tree-diff early after max_changes

When computing the changed-paths bloom filters for the commit-graph,
we limit the size of the filter by restricting the number of paths
in the diff. Instead of computing a large diff and then ignoring the
result, it is better to halt the diff computation early.

Create a new "max_changes" option in struct diff_options. If non-zero,
then halt the diff computation after discovering strictly more changed
paths. This includes paths corresponding to trees that change.

Use this max_changes option in the bloom filter calculations. This
reduces the time taken to compute the filters for the Linux kernel
repo from 2m50s to 2m35s. On a large internal repository with ~500
commits that perform tree-wide changes, the time reduced from
6m15s to 3m48s.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobloom.c: core Bloom filter implementation for changed paths.
Garima Singh [Mon, 30 Mar 2020 00:31:26 +0000 (00:31 +0000)] 
bloom.c: core Bloom filter implementation for changed paths.

Add the core implementation for computing Bloom filters for
the paths changed between a commit and it's first parent.

We fill the Bloom filters as (const char *data, int len) pairs
as `struct bloom_filters" within a commit slab.

Filters for commits with no changes and more than 512 changes,
is represented with a filter of length zero. There is no gain
in distinguishing between a computed filter of length zero for
a commit with no changes, and an uncomputed filter for new commits
or for commits with more than 512 changes. The effect on
`git log -- path` is the same in both cases. We will fall back to
the normal diffing algorithm when we can't benefit from the
existence of Bloom filters.

Helped-by: Jeff King <peff@peff.net>
Helped-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobloom.c: introduce core Bloom filter constructs
Garima Singh [Mon, 30 Mar 2020 00:31:25 +0000 (00:31 +0000)] 
bloom.c: introduce core Bloom filter constructs

Introduce the constructs for Bloom filters, Bloom filter keys
and Bloom filter settings.
For details on what Bloom filters are and how they work, refer
to Dr. Derrick Stolee's blog post [1]. It provides a concise
explanation of the adoption of Bloom filters as described in
[2] and [3].

Implementation specifics:
1. We currently use 7 and 10 for the number of hashes and the
   size of each entry respectively. They served as great starting
   values, the mathematical details behind this choice are
   described in [1] and [4]. The implementation, while not
   completely open to it at the moment, is flexible enough to allow
   for tweaking these settings in the future.

   Note: The performance gains we have observed with these values
   are significant enough that we did not need to tweak these
   settings. The performance numbers are included in the cover letter
   of this series and in the commit message of the subsequent commit
   where we use Bloom filters to speed up `git log -- path`.

2. As described in [1] and [3], we do not need 7 independent hashing
   functions. We use the Murmur3 hashing scheme, seed it twice and
   then combine those to procure an arbitrary number of hash values.

3. The filters will be sized according to the number of changes in
   each commit, in multiples of 8 bit words.

[1] Derrick Stolee
      "Supercharging the Git Commit Graph IV: Bloom Filters"
      https://devblogs.microsoft.com/devops/super-charging-the-git-commit-graph-iv-Bloom-filters/

[2] Flavio Bonomi, Michael Mitzenmacher, Rina Panigrahy, Sushil Singh, George Varghese
    "An Improved Construction for Counting Bloom Filters"
    http://theory.stanford.edu/~rinap/papers/esa2006b.pdf
    https://doi.org/10.1007/11841036_61

[3] Peter C. Dillinger and Panagiotis Manolios
    "Bloom Filters in Probabilistic Verification"
    http://www.ccs.neu.edu/home/pete/pub/Bloom-filters-verification.pdf
    https://doi.org/10.1007/978-3-540-30494-4_26

[4] Thomas Mueller Graf, Daniel Lemire
    "Xor Filters: Faster and Smaller Than Bloom and Cuckoo Filters"
    https://arxiv.org/abs/1912.08258

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agobloom.c: add the murmur3 hash implementation
Garima Singh [Mon, 30 Mar 2020 00:31:24 +0000 (00:31 +0000)] 
bloom.c: add the murmur3 hash implementation

In preparation for computing changed paths Bloom filters,
implement the Murmur3 hash algorithm as described in [1].
It hashes the given data using the given seed and produces
a uniformly distributed hash value.

[1] https://en.wikipedia.org/wiki/MurmurHash#Algorithm

Helped-by: Derrick Stolee <dstolee@microsoft.com>
Helped-by: Szeder Gábor <szeder.dev@gmail.com>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agocommit-graph: define and use MAX_NUM_CHUNKS
Garima Singh [Mon, 30 Mar 2020 00:31:23 +0000 (00:31 +0000)] 
commit-graph: define and use MAX_NUM_CHUNKS

This is a minor cleanup to make it easier to change
the number of chunks being written to the commit
graph.

Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Garima Singh <garima.singh@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'ds/default-pack-use-sparse-to-true'
Junio C Hamano [Sun, 29 Mar 2020 16:32:51 +0000 (09:32 -0700)] 
Merge branch 'ds/default-pack-use-sparse-to-true'

The 'pack.useSparse' configuration variable now defaults to 'true',
enabling an optimization that has been experimental since Git 2.21.

* ds/default-pack-use-sparse-to-true:
  pack-objects: flip the use of GIT_TEST_PACK_SPARSE
  config: set pack.useSparse=true by default

4 years agoThe second batch post 2.26 cycle
Junio C Hamano [Fri, 27 Mar 2020 00:00:57 +0000 (17:00 -0700)] 
The second batch post 2.26 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'ah/force-pull-rebase-configuration'
Junio C Hamano [Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)] 
Merge branch 'ah/force-pull-rebase-configuration'

"git pull" learned to warn when no pull.rebase configuration
exists, and neither --[no-]rebase nor --ff-only is given (which
would result a merge).

* ah/force-pull-rebase-configuration:
  pull: warn if the user didn't say whether to rebase or to merge

4 years agoMerge branch 'tg/retire-scripted-stash'
Junio C Hamano [Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)] 
Merge branch 'tg/retire-scripted-stash'

"git stash" has kept an escape hatch to use the scripted version
for a few releases, which got stale.  It has been removed.

* tg/retire-scripted-stash:
  stash: remove the stash.useBuiltin setting
  stash: get git_stash_config at the top level

4 years agoMerge branch 'jc/describe-misnamed-annotated-tag'
Junio C Hamano [Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)] 
Merge branch 'jc/describe-misnamed-annotated-tag'

When "git describe C" finds an annotated tag with tagname A to be
the best name to explain commit C, and the tag is stored in a
"wrong" place in the refs/tags hierarchy, e.g. refs/tags/B, the
command gave a warning message but used A (not B) to describe C.
If C is exactly at the tag, the describe output would be "A", but
"git rev-parse A^0" would not be equal as "git rev-parse C^0".  The
behavior of the command has been changed to use the "long" form
i.e. A-0-gOBJECTNAME, which is correctly interpreted by rev-parse.

* jc/describe-misnamed-annotated-tag:
  describe: force long format for a name based on a mislocated tag

4 years agoMerge branch 'at/rebase-fork-point-regression-fix'
Junio C Hamano [Fri, 27 Mar 2020 00:11:21 +0000 (17:11 -0700)] 
Merge branch 'at/rebase-fork-point-regression-fix'

The "--fork-point" mode of "git rebase" regressed when the command
was rewritten in C back in 2.20 era, which has been corrected.

* at/rebase-fork-point-regression-fix:
  rebase: --fork-point regression fix

4 years agoMerge branch 'bc/filter-process'
Junio C Hamano [Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)] 
Merge branch 'bc/filter-process'

Provide more information (e.g. the object of the tree-ish in which
the blob being converted appears, in addition to its path, which
has already been given) to smudge/clean conversion filters.

* bc/filter-process:
  t0021: test filter metadata for additional cases
  builtin/reset: compute checkout metadata for reset
  builtin/rebase: compute checkout metadata for rebases
  builtin/clone: compute checkout metadata for clones
  builtin/checkout: compute checkout metadata for checkouts
  convert: provide additional metadata to filters
  convert: permit passing additional metadata to filter processes
  builtin/checkout: pass branch info down to checkout_worktree

4 years agoMerge branch 'hi/gpg-prefer-check-signature'
Junio C Hamano [Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)] 
Merge branch 'hi/gpg-prefer-check-signature'

The code to interface with GnuPG has been refactored.

* hi/gpg-prefer-check-signature:
  gpg-interface: prefer check_signature() for GPG verification
  t: increase test coverage of signature verification output

4 years agoMerge branch 'bc/sha-256-part-1-of-4'
Junio C Hamano [Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)] 
Merge branch 'bc/sha-256-part-1-of-4'

SHA-256 transition continues.

* bc/sha-256-part-1-of-4: (22 commits)
  fast-import: add options for rewriting submodules
  fast-import: add a generic function to iterate over marks
  fast-import: make find_marks work on any mark set
  fast-import: add helper function for inserting mark object entries
  fast-import: permit reading multiple marks files
  commit: use expected signature header for SHA-256
  worktree: allow repository version 1
  init-db: move writing repo version into a function
  builtin/init-db: add environment variable for new repo hash
  builtin/init-db: allow specifying hash algorithm on command line
  setup: allow check_repository_format to read repository format
  t/helper: make repository tests hash independent
  t/helper: initialize repository if necessary
  t/helper/test-dump-split-index: initialize git repository
  t6300: make hash algorithm independent
  t6300: abstract away SHA-1-specific constants
  t: use hash-specific lookup tables to define test constants
  repository: require a build flag to use SHA-256
  hex: add functions to parse hex object IDs in any algorithm
  hex: introduce parsing variants taking hash algorithms
  ...

4 years agoMerge branch 'pb/recurse-submodules-fix'
Junio C Hamano [Fri, 27 Mar 2020 00:11:20 +0000 (17:11 -0700)] 
Merge branch 'pb/recurse-submodules-fix'

Fix "git checkout --recurse-submodules" of a nested submodule
hierarchy.

* pb/recurse-submodules-fix:
  t/lib-submodule-update: add test removing nested submodules
  unpack-trees: check for missing submodule directory in merged_entry
  unpack-trees: remove outdated description for verify_clean_submodule
  t/lib-submodule-update: move a test to the right section
  t/lib-submodule-update: remove outdated test description
  t7112: remove mention of KNOWN_FAILURE_SUBMODULE_RECURSIVE_NESTED

4 years agoThe first batch post 2.26 cycle
Junio C Hamano [Wed, 25 Mar 2020 20:37:05 +0000 (13:37 -0700)] 
The first batch post 2.26 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'ss/submodule-foreach-cb'
Junio C Hamano [Wed, 25 Mar 2020 20:57:44 +0000 (13:57 -0700)] 
Merge branch 'ss/submodule-foreach-cb'

Code clean-up.

* ss/submodule-foreach-cb:
  submodule--helper.c: Rename 'cb_foreach' to 'foreach_cb'

4 years agoMerge branch 'jc/config-tar'
Junio C Hamano [Wed, 25 Mar 2020 20:57:44 +0000 (13:57 -0700)] 
Merge branch 'jc/config-tar'

Improve the structure of the documentation source a bit.

* jc/config-tar:
  separate tar.* config to its own source file

4 years agoMerge branch 'en/oidset-uninclude-hashmap'
Junio C Hamano [Wed, 25 Mar 2020 20:57:44 +0000 (13:57 -0700)] 
Merge branch 'en/oidset-uninclude-hashmap'

Code clean-up.

* en/oidset-uninclude-hashmap:
  oidset: remove unnecessary include

4 years agoMerge branch 'ds/check-connected-reprepare-packed-git'
Junio C Hamano [Wed, 25 Mar 2020 20:57:43 +0000 (13:57 -0700)] 
Merge branch 'ds/check-connected-reprepare-packed-git'

Corner case "git fetch" fix.

* ds/check-connected-reprepare-packed-git:
  connected.c: reprepare packs for corner cases

4 years agoMerge branch 'rs/doc-passthru-fetch-options'
Junio C Hamano [Wed, 25 Mar 2020 20:57:43 +0000 (13:57 -0700)] 
Merge branch 'rs/doc-passthru-fetch-options'

Doc update.

* rs/doc-passthru-fetch-options:
  pull: document more passthru options

4 years agoMerge branch 'pw/advise-rebase-skip'
Junio C Hamano [Wed, 25 Mar 2020 20:57:43 +0000 (13:57 -0700)] 
Merge branch 'pw/advise-rebase-skip'

The mechanism to prevent "git commit" from making an empty commit
or amending during an interrupted cherry-pick was broken during the
rewrite of "git rebase" in C, which has been corrected.

* pw/advise-rebase-skip:
  commit: give correct advice for empty commit during a rebase
  commit: encapsulate determine_whence() for sequencer
  commit: use enum value for multiple cherry-picks
  sequencer: write CHERRY_PICK_HEAD for reword and edit
  cherry-pick: check commit error messages
  cherry-pick: add test for `--skip` advice in `git commit`
  t3404: use test_cmp_rev

4 years agoMerge branch 'yz/p4-py3'
Junio C Hamano [Wed, 25 Mar 2020 20:57:43 +0000 (13:57 -0700)] 
Merge branch 'yz/p4-py3'

Update "git p4" to work with Python 3.

* yz/p4-py3:
  ci: use python3 in linux-gcc and osx-gcc and python2 elsewhere
  git-p4: use python3's input() everywhere
  git-p4: simplify regex pattern generation for parsing diff-tree
  git-p4: use dict.items() iteration for python3 compatibility
  git-p4: use functools.reduce instead of reduce
  git-p4: fix freezing while waiting for fast-import progress
  git-p4: use marshal format version 2 when sending to p4
  git-p4: open .gitp4-usercache.txt in text mode
  git-p4: convert path to unicode before processing them
  git-p4: encode/decode communication with git for python3
  git-p4: encode/decode communication with p4 for python3
  git-p4: remove string type aliasing
  git-p4: change the expansion test from basestring to list
  git-p4: make python2.7 the oldest supported version

4 years agoMerge branch 'am/real-path-fix'
Junio C Hamano [Wed, 25 Mar 2020 20:57:42 +0000 (13:57 -0700)] 
Merge branch 'am/real-path-fix'

The real_path() convenience function can easily be misused; with a
bit of code refactoring in the callers' side, its use has been
eliminated.

* am/real-path-fix:
  get_superproject_working_tree(): return strbuf
  real_path_if_valid(): remove unsafe API
  real_path: remove unsafe API
  set_git_dir: fix crash when used with real_path()

4 years agoMerge branch 'sg/commit-slab-clarify-peek'
Junio C Hamano [Wed, 25 Mar 2020 20:57:42 +0000 (13:57 -0700)] 
Merge branch 'sg/commit-slab-clarify-peek'

In-code comment update.

* sg/commit-slab-clarify-peek:
  commit-slab: clarify slabname##_peek()'s return value

4 years agoMerge branch 'jc/maintain-doc'
Junio C Hamano [Wed, 25 Mar 2020 20:57:42 +0000 (13:57 -0700)] 
Merge branch 'jc/maintain-doc'

Doc update.

* jc/maintain-doc:
  update how-to-maintain-git

4 years agoMerge branch 'js/https-proxy-config'
Junio C Hamano [Wed, 25 Mar 2020 20:57:42 +0000 (13:57 -0700)] 
Merge branch 'js/https-proxy-config'

A handful of options to configure SSL when talking to proxies have
been added.

* js/https-proxy-config:
  http: add environment variable support for HTTPS proxies
  http: add client cert support for HTTPS proxies

4 years agoMerge branch 'hw/advise-ng'
Junio C Hamano [Wed, 25 Mar 2020 20:57:41 +0000 (13:57 -0700)] 
Merge branch 'hw/advise-ng'

Revamping of the advise API to allow more systematic enumeration of
advice knobs in the future.

* hw/advise-ng:
  tag: use new advice API to check visibility
  advice: revamp advise API
  advice: change "setupStreamFailure" to "setUpstreamFailure"
  advice: extract vadvise() from advise()

4 years agoGit 2.26 v2.26.0
Junio C Hamano [Sun, 22 Mar 2020 23:50:46 +0000 (16:50 -0700)] 
Git 2.26

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'en/rebase-backend'
Junio C Hamano [Sat, 21 Mar 2020 20:48:54 +0000 (13:48 -0700)] 
Merge branch 'en/rebase-backend'

Test fix.

* en/rebase-backend:
  t3419: prevent failure when run with EXPENSIVE

4 years agoMerge tag 'l10n-2.26.0-rnd2.1' of git://github.com/git-l10n/git-po.git
Junio C Hamano [Sat, 21 Mar 2020 19:12:28 +0000 (12:12 -0700)] 
Merge tag 'l10n-2.26.0-rnd2.1' of git://github.com/git-l10n/git-po.git

l10n-2.26.0-rnd2.1

* tag 'l10n-2.26.0-rnd2.1' of https://github.com/git-l10n/git-po: (28 commits)
  l10n: tr.po: change file mode to 644
  l10n: de.po: Update German translation for Git 2.26.0
  l10n: de.po: add missing space
  l10n: tr: Fix a couple of ambiguities
  l10n: Update Catalan translation
  l10n: sv.po: Update Swedish translation (4839t0f0u)
  l10n: zh_CN: Revise v2.26.0 translation
  l10n: zh_CN: for git v2.26.0 l10n round 1 and 2
  l10n: vi(4839t): Updated Vietnamese translation for v2.26.0
  l10n: vi: fix translation + grammar
  l10n: zh_TW.po: v2.26.0 round 2 (0 untranslated)
  l10n: zh_TW.po: v2.26.0 round 1 (11 untranslated)
  l10n: it.po: update the Italian translation for Git 2.26.0 round 2
  l10n: es: 2.26.0 round#2
  l10n: bg.po: Updated Bulgarian translation (4839t)
  l10n: tr: v2.26.0 round 2
  l10n: fr : v2.26.0 rnd 2
  l10n: git.pot: v2.26.0 round 2 (7 new, 2 removed)
  l10n: tr: Add glossary for Turkish translations
  l10n: sv.po: Update Swedish translation (4835t0f0u)
  ...

4 years agol10n: tr.po: change file mode to 644
Jiang Xin [Sat, 21 Mar 2020 10:26:56 +0000 (18:26 +0800)] 
l10n: tr.po: change file mode to 644

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agot3419: prevent failure when run with EXPENSIVE
brian m. carlson [Fri, 20 Mar 2020 21:52:41 +0000 (21:52 +0000)] 
t3419: prevent failure when run with EXPENSIVE

This test runs a function which itself runs several assertions.  The
last of these assertions cleans up the .git/rebase-apply directory,
since when run with EXPENSIVE set, the function is invoked a second time
to run the same tests with a larger data set.

However, as of 2ac0d6273f ("rebase: change the default backend from "am"
to "merge"", 2020-02-15), the default backend of rebase has changed, and
cleaning up the rebase-apply directory has no effect: it no longer
exists, since we're using rebase-merge instead.

Since we don't really care which rebase backend is in use, let's just
use the command "git rebase --quit", which will do the right thing
regardless.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agopack-objects: flip the use of GIT_TEST_PACK_SPARSE
Derrick Stolee [Fri, 20 Mar 2020 12:38:10 +0000 (12:38 +0000)] 
pack-objects: flip the use of GIT_TEST_PACK_SPARSE

The environment variable GIT_TEST_PACK_SPARSE was previously used
to allow testing the --sparse option for "git pack-objects" in
the test suite. This allowed interesting cases of "git push" to
also test this algorithm.

Since pack.useSparse is now true by default, we do not need this
variable to _enable_ the --sparse option, but instead to _disable_
it. This flips how we work with the variable a bit.

When checking for the variable, default to a value of -1 for
"unset". If unset, then take the default from the repo settings,
which is currently 1. Then, the --[no-]sparse command-line option
will override either of these settings.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoconfig: set pack.useSparse=true by default
Derrick Stolee [Fri, 20 Mar 2020 12:38:09 +0000 (12:38 +0000)] 
config: set pack.useSparse=true by default

The pack.useSparse config option was introduced by 3d036eb0
(pack-objects: create pack.useSparse setting, 2019-01-19) and was
first available in v2.21.0. When enabled, the pack-objects process
during 'git push' will use a sparse tree walk when deciding which
trees and blobs to send to the remote. The algorithm was introduced
by d5d2e93 (revision: implement sparse algorithm, 2019-01-16) and
has been in production use by VFS for Git since around that time.
The features.experimental config option also enabled pack.useSparse,
so hopefully that has also increased exposure.

It is worth noting that pack.useSparse has a possibility of
sending more objects across a push, but requires a special
arrangement of exact _copies_ across directories. There is a test
in t5322-pack-objects-sparse.sh that demonstrates this possibility.
This test uses the --sparse option to "git pack-objects" but we
can make it implied by the config value to demonstrate that the
default value has changed.

While updating that test, I noticed that the documentation did not
include an option for --no-sparse, which is now more important than
it was before.

Since the downside is unlikely but the upside is significant, set
the default value of pack.useSparse to true. Remove it from the
set of options implied by features.experimental.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: de.po: Update German translation for Git 2.26.0
Matthias Rüster [Sat, 14 Mar 2020 21:10:16 +0000 (22:10 +0100)] 
l10n: de.po: Update German translation for Git 2.26.0

Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
4 years agol10n: de.po: add missing space
Ralf Thielow [Tue, 21 Jan 2020 16:30:48 +0000 (17:30 +0100)] 
l10n: de.po: add missing space

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
4 years agoMerge https://github.com/prati0100/git-gui
Junio C Hamano [Thu, 19 Mar 2020 23:06:51 +0000 (16:06 -0700)] 
Merge https://github.com/prati0100/git-gui

* 'master' of https://github.com/prati0100/git-gui:
  git-gui: create a new namespace for chord script evaluation
  git-gui: reduce Tcl version requirement from 8.6 to 8.5
  git-gui--askpass: coerce answers to UTF-8 on Windows
  git-gui: fix error popup when doing blame -> "Show History Context"
  git-gui: add missing close bracket
  git-gui: update German translation
  git-gui: extend translation glossary template with more terms
  git-gui: update pot template and German translation to current source code

4 years agol10n: tr: Fix a couple of ambiguities
Emir Sarı [Thu, 19 Mar 2020 22:36:24 +0000 (01:36 +0300)] 
l10n: tr: Fix a couple of ambiguities

Signed-off-by: Emir Sarı <bitigchi@me.com>
4 years agoMerge branch 'py/remove-tcloo'
Pratyush Yadav [Thu, 19 Mar 2020 15:59:19 +0000 (21:29 +0530)] 
Merge branch 'py/remove-tcloo'

Reduce the Tcl version requirement to 8.5 to allow git-gui to run on
MacOS distributions like High Sierra. While here, fix a potential
variable name collision.

* py/remove-tcloo:
  git-gui: create a new namespace for chord script evaluation
  git-gui: reduce Tcl version requirement from 8.6 to 8.5

4 years agoRelNotes/2.26.0: fix various typos
Elijah Newren [Wed, 18 Mar 2020 21:18:26 +0000 (21:18 +0000)] 
RelNotes/2.26.0: fix various typos

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agosubmodule--helper.c: Rename 'cb_foreach' to 'foreach_cb'
Shourya Shukla [Wed, 18 Mar 2020 14:20:24 +0000 (19:50 +0530)] 
submodule--helper.c: Rename 'cb_foreach' to 'foreach_cb'

In 'submodule--helper.c', the structures and macros for callbacks belonging
to any subcommand are named in the format: 'subcommand_cb' and 'SUBCOMMAND_CB_INIT'
respectively.

This was an exception for the subcommand 'foreach' of the command
'submodule'. Rename the aforementioned structures and macros:
'struct cb_foreach' to 'struct foreach_cb' and 'CB_FOREACH_INIT'
to 'FOREACH_CB_INIT'.

Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoseparate tar.* config to its own source file
Junio C Hamano [Wed, 18 Mar 2020 18:26:00 +0000 (11:26 -0700)] 
separate tar.* config to its own source file

Even though there is only one configuration variable in the
namespace, it is not quite right to have tar.umask described
among the variables for tag.* namespace.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agol10n: Update Catalan translation
Jordi Mas [Wed, 18 Mar 2020 19:24:20 +0000 (20:24 +0100)] 
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
4 years agoSync with Git 2.25.2
Junio C Hamano [Tue, 17 Mar 2020 22:16:14 +0000 (15:16 -0700)] 
Sync with Git 2.25.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoGit 2.25.2 v2.25.2
Junio C Hamano [Tue, 17 Mar 2020 21:54:02 +0000 (14:54 -0700)] 
Git 2.25.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agounicode: update the width tables to Unicode 13.0
Beat Bolli [Tue, 17 Mar 2020 15:36:05 +0000 (16:36 +0100)] 
unicode: update the width tables to Unicode 13.0

Now that Unicode 13.0 has been announced[0], update the character
width tables to the new version.

[0] https://home.unicode.org/announcing-the-unicode-standard-version-13-0/

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'js/ci-windows-update' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:26 +0000 (15:02 -0700)] 
Merge branch 'js/ci-windows-update' into maint

Updates to the CI settings.

* js/ci-windows-update:
  Azure Pipeline: switch to the latest agent pools
  ci: prevent `perforce` from being quarantined
  t/lib-httpd: avoid using macOS' sed

4 years agoMerge branch 'jk/run-command-formatfix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:26 +0000 (15:02 -0700)] 
Merge branch 'jk/run-command-formatfix' into maint

Code style cleanup.

* jk/run-command-formatfix:
  run-command.h: fix mis-indented struct member

4 years agoMerge branch 'jk/doc-credential-helper' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:26 +0000 (15:02 -0700)] 
Merge branch 'jk/doc-credential-helper' into maint

Docfix.

* jk/doc-credential-helper:
  doc: move credential helper info into gitcredentials(7)

4 years agoMerge branch 'js/mingw-open-in-gdb' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:25 +0000 (15:02 -0700)] 
Merge branch 'js/mingw-open-in-gdb' into maint

Dev support.

* js/mingw-open-in-gdb:
  mingw: add a helper function to attach GDB to the current process

4 years agoMerge branch 'js/test-unc-fetch' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:25 +0000 (15:02 -0700)] 
Merge branch 'js/test-unc-fetch' into maint

Test updates.

* js/test-unc-fetch:
  t5580: test cloning without file://, test fetching via UNC paths

4 years agoMerge branch 'js/test-write-junit-xml-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:25 +0000 (15:02 -0700)] 
Merge branch 'js/test-write-junit-xml-fix' into maint

Testfix.

* js/test-write-junit-xml-fix:
  tests: fix --write-junit-xml with subshells

4 years agoMerge branch 'en/simplify-check-updates-in-unpack-trees' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:25 +0000 (15:02 -0700)] 
Merge branch 'en/simplify-check-updates-in-unpack-trees' into maint

Code simplification.

* en/simplify-check-updates-in-unpack-trees:
  unpack-trees: exit check_updates() early if updates are not wanted

4 years agoMerge branch 'jc/doc-single-h-is-for-help' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:24 +0000 (15:02 -0700)] 
Merge branch 'jc/doc-single-h-is-for-help' into maint

Both "git ls-remote -h" and "git grep -h" give short usage help,
like any other Git subcommand, but it is not unreasonable to expect
that the former would behave the same as "git ls-remote --head"
(there is no other sensible behaviour for the latter).  The
documentation has been updated in an attempt to clarify this.

* jc/doc-single-h-is-for-help:
  Documentation: clarify that `-h` alone stands for `help`

4 years agoMerge branch 'hd/show-one-mergetag-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:24 +0000 (15:02 -0700)] 
Merge branch 'hd/show-one-mergetag-fix' into maint

"git show" and others gave an object name in raw format in its
error output, which has been corrected to give it in hex.

* hd/show-one-mergetag-fix:
  show_one_mergetag: print non-parent in hex form.

4 years agoMerge branch 'am/mingw-poll-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:23 +0000 (15:02 -0700)] 
Merge branch 'am/mingw-poll-fix' into maint

MinGW's poll() emulation has been improved.

* am/mingw-poll-fix:
  mingw: workaround for hangs when sending STDIN

4 years agoMerge branch 'hi/gpg-use-check-signature' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:23 +0000 (15:02 -0700)] 
Merge branch 'hi/gpg-use-check-signature' into maint

"git merge signed-tag" while lacking the public key started to say
"No signature", which was utterly wrong.  This regression has been
reverted.

* hi/gpg-use-check-signature:
  Revert "gpg-interface: prefer check_signature() for GPG verification"

4 years agoMerge branch 'ds/partial-clone-fixes' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:23 +0000 (15:02 -0700)] 
Merge branch 'ds/partial-clone-fixes' into maint

Fix for a bug revealed by a recent change to make the protocol v2
the default.

* ds/partial-clone-fixes:
  partial-clone: avoid fetching when looking for objects
  partial-clone: demonstrate bugs in partial fetch

4 years agoMerge branch 'en/t3433-rebase-stat-dirty-failure' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:23 +0000 (15:02 -0700)] 
Merge branch 'en/t3433-rebase-stat-dirty-failure' into maint

The merge-recursive machinery failed to refresh the cache entry for
a merge result in a couple of places, resulting in an unnecessary
merge failure, which has been fixed.

* en/t3433-rebase-stat-dirty-failure:
  merge-recursive: fix the refresh logic in update_file_flags
  t3433: new rebase testcase documenting a stat-dirty-like failure

4 years agoMerge branch 'en/check-ignore' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:23 +0000 (15:02 -0700)] 
Merge branch 'en/check-ignore' into maint

"git check-ignore" did not work when the given path is explicitly
marked as not ignored with a negative entry in the .gitignore file.

* en/check-ignore:
  check-ignore: fix documentation and implementation to match

4 years agoMerge branch 'jk/push-option-doc-markup-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:22 +0000 (15:02 -0700)] 
Merge branch 'jk/push-option-doc-markup-fix' into maint

Doc markup fix.

* jk/push-option-doc-markup-fix:
  doc/config/push: use longer "--" line for preformatted example

4 years agoMerge branch 'jk/doc-diff-parallel' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:22 +0000 (15:02 -0700)] 
Merge branch 'jk/doc-diff-parallel' into maint

Update to doc-diff.

* jk/doc-diff-parallel:
  doc-diff: use single-colon rule in rendering Makefile

4 years agoMerge branch 'jh/notes-fanout-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:22 +0000 (15:02 -0700)] 
Merge branch 'jh/notes-fanout-fix' into maint

The code to automatically shrink the fan-out in the notes tree had
an off-by-one bug, which has been killed.

* jh/notes-fanout-fix:
  notes.c: fix off-by-one error when decreasing notes fanout
  t3305: check notes fanout more carefully and robustly

4 years agoMerge branch 'jk/index-pack-dupfix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:21 +0000 (15:02 -0700)] 
Merge branch 'jk/index-pack-dupfix' into maint

The index-pack code now diagnoses a bad input packstream that
records the same object twice when it is used as delta base; the
code used to declare a software bug when encountering such an
input, but it is an input error.

* jk/index-pack-dupfix:
  index-pack: downgrade twice-resolved REF_DELTA to die()

4 years agoMerge branch 'js/rebase-i-with-colliding-hash' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:21 +0000 (15:02 -0700)] 
Merge branch 'js/rebase-i-with-colliding-hash' into maint

"git rebase -i" identifies existing commits in its todo file with
their abbreviated object name, which could become ambigous as it
goes to create new commits, and has a mechanism to avoid ambiguity
in the main part of its execution.  A few other cases however were
not covered by the protection against ambiguity, which has been
corrected.

* js/rebase-i-with-colliding-hash:
  rebase -i: also avoid SHA-1 collisions with missingCommitsCheck
  rebase -i: re-fix short SHA-1 collision
  parse_insn_line(): improve error message when parsing failed

4 years agoMerge branch 'jk/clang-sanitizer-fixes' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:21 +0000 (15:02 -0700)] 
Merge branch 'jk/clang-sanitizer-fixes' into maint

C pedantry ;-) fix.

* jk/clang-sanitizer-fixes:
  obstack: avoid computing offsets from NULL pointer
  xdiff: avoid computing non-zero offset from NULL pointer
  avoid computing zero offsets from NULL pointer
  merge-recursive: use subtraction to flip stage
  merge-recursive: silence -Wxor-used-as-pow warning

4 years agoMerge branch 'dt/submodule-rm-with-stale-cache' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:21 +0000 (15:02 -0700)] 
Merge branch 'dt/submodule-rm-with-stale-cache' into maint

Running "git rm" on a submodule failed unnecessarily when
.gitmodules is only cache-dirty, which has been corrected.

* dt/submodule-rm-with-stale-cache:
  git rm submodule: succeed if .gitmodules index stat info is zero

4 years agoMerge branch 'pb/recurse-submodule-in-worktree-fix' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:21 +0000 (15:02 -0700)] 
Merge branch 'pb/recurse-submodule-in-worktree-fix' into maint

The "--recurse-submodules" option of various subcommands did not
work well when run in an alternate worktree, which has been
corrected.

* pb/recurse-submodule-in-worktree-fix:
  submodule.c: use get_git_dir() instead of get_git_common_dir()
  t2405: clarify test descriptions and simplify test
  t2405: use git -C and test_commit -C instead of subshells
  t7410: rename to t2405-worktree-submodule.sh

4 years agoMerge branch 'es/outside-repo-errmsg-hints' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:20 +0000 (15:02 -0700)] 
Merge branch 'es/outside-repo-errmsg-hints' into maint

An earlier update to show the location of working tree in the error
message did not consider the possibility that a git command may be
run in a bare repository, which has been corrected.

* es/outside-repo-errmsg-hints:
  prefix_path: show gitdir if worktree unavailable
  prefix_path: show gitdir when arg is outside repo

4 years agoMerge branch 'js/builtin-add-i-cmds' into maint
Junio C Hamano [Tue, 17 Mar 2020 22:02:20 +0000 (15:02 -0700)] 
Merge branch 'js/builtin-add-i-cmds' into maint

Minor bugfixes to "git add -i" that has recently been rewritten in C.

* js/builtin-add-i-cmds:
  built-in add -i: accept open-ended ranges again
  built-in add -i: do not try to `patch`/`diff` an empty list of files

4 years agol10n: sv.po: Update Swedish translation (4839t0f0u)
Peter Krefting [Tue, 17 Mar 2020 17:33:22 +0000 (18:33 +0100)] 
l10n: sv.po: Update Swedish translation (4839t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
4 years agogit-gui: create a new namespace for chord script evaluation
Pratyush Yadav [Sat, 14 Mar 2020 21:38:36 +0000 (03:08 +0530)] 
git-gui: create a new namespace for chord script evaluation

Evaluating the script in the same namespace as the chord itself creates
potential for variable name collision. And in that case the script would
unknowingly use the chord's variables.

For example, say the script has a variable called 'is_completed', which
also exists in the chord's namespace. The script then calls 'eval' and
sets 'is_completed' to 1 thinking it is setting its own variable,
completely unaware of how the chord works behind the scenes. This leads
to the chord never actually executing because it sees 'is_completed' as
true and thinks it has already completed.

Avoid the potential collision by creating a separate namespace for the
script that is a child of the chord's namespace.

Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
4 years agogit-gui: reduce Tcl version requirement from 8.6 to 8.5
Pratyush Yadav [Mon, 17 Feb 2020 15:39:29 +0000 (21:09 +0530)] 
git-gui: reduce Tcl version requirement from 8.6 to 8.5

On some MacOS distributions like High Sierra, Tcl 8.5 is shipped by
default. This makes git-gui error out at startup because of the version
mismatch.

The only part that requires Tcl 8.6 is SimpleChord, which depends on
TclOO. So, don't use it and use our homegrown class.tcl instead.

This means some slight syntax changes. Since class.tcl doesn't have an
"unknown" method like TclOO does, we can't just call '$note', but have
to use '$note activate' instead. The constructor now needs a proper
namespace qualifier. Update the documentation to reflect the new syntax.

As of now, the only part of git-gui that needs Tcl 8.5 is a call to
'apply' in lib/index.tcl::lambda. Keep using it until someone shows up
shouting that their OS ships with 8.4 only. Then we would have to look
into implementing it in pure Tcl.

Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
4 years agol10n: zh_CN: Revise v2.26.0 translation
Fangyi Zhou [Wed, 11 Mar 2020 11:55:43 +0000 (11:55 +0000)] 
l10n: zh_CN: Revise v2.26.0 translation

Signed-off-by: Fangyi Zhou <me@fangyi.io>
Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agol10n: zh_CN: for git v2.26.0 l10n round 1 and 2
Jiang Xin [Mon, 30 Dec 2019 00:56:49 +0000 (08:56 +0800)] 
l10n: zh_CN: for git v2.26.0 l10n round 1 and 2

Translate 79 new messages (4839t0f0u) for git 2.26.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
4 years agoGit 2.26-rc2 v2.26.0-rc2
Junio C Hamano [Mon, 16 Mar 2020 19:46:32 +0000 (12:46 -0700)] 
Git 2.26-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
4 years agoMerge branch 'en/test-cleanup'
Junio C Hamano [Mon, 16 Mar 2020 19:43:30 +0000 (12:43 -0700)] 
Merge branch 'en/test-cleanup'

Test fixes.

* en/test-cleanup:
  t6022, t6046: fix flaky files-are-updated checks