<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t, branch v2.52.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.52.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.52.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-11-12T19:45:24Z</updated>
<entry>
<title>Merge branch 'tc/last-modified-active-paths-optimization'</title>
<updated>2025-11-12T19:45:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-12T19:45:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=99bd5a5c9f74abfe81196d96b8467d0d1d4723c5'/>
<id>urn:sha1:99bd5a5c9f74abfe81196d96b8467d0d1d4723c5</id>
<content type='text'>
"git last-modified" was optimized by narrowing the set of paths to
follow as it dug deeper in the history.

* tc/last-modified-active-paths-optimization:
  last-modified: implement faster algorithm
</content>
</entry>
<entry>
<title>Merge branch 'cc/fast-import-export-i18n-cleanup'</title>
<updated>2025-11-06T23:17:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-06T23:17:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e569dced68a486b38b14cdd2e3e0b34d21752a18'/>
<id>urn:sha1:e569dced68a486b38b14cdd2e3e0b34d21752a18</id>
<content type='text'>
Messages from fast-import/export are now marked for i18n.

* cc/fast-import-export-i18n-cleanup:
  gpg-interface: mark a string for translation
  fast-import: mark strings for translation
  fast-export: mark strings for translation
  gpg-interface: use left shift to define GPG_VERIFY_*
  gpg-interface: simplify ssh fingerprint parsing
</content>
</entry>
<entry>
<title>Merge branch 'rz/t0450-bisect-doc-update'</title>
<updated>2025-11-05T21:41:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-05T21:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8a641c5904bc55807d4bbed035ab03dbd6c10ba'/>
<id>urn:sha1:c8a641c5904bc55807d4bbed035ab03dbd6c10ba</id>
<content type='text'>
The help text and manual page of "git bisect" command have been
made consistent with each other.

* rz/t0450-bisect-doc-update:
  bisect: update usage and docs to match each other
</content>
</entry>
<entry>
<title>Merge branch 'jk/doc-backslash-in-exclude'</title>
<updated>2025-11-04T15:48:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T15:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5931b6b2fbfaeceb911296e5f45df95a8c33bdb6'/>
<id>urn:sha1:5931b6b2fbfaeceb911296e5f45df95a8c33bdb6</id>
<content type='text'>
The patterns used in the .gitignore files use backslash in the way
documented for fnmatch(3); document as such to reduce confusion.

* jk/doc-backslash-in-exclude:
  doc: document backslash in gitignore patterns
</content>
</entry>
<entry>
<title>Merge branch 'jk/test-delete-gpgsig-leakfix'</title>
<updated>2025-11-04T15:48:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T15:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=377e8e284869a9246692a186e12e7c68d28ca318'/>
<id>urn:sha1:377e8e284869a9246692a186e12e7c68d28ca318</id>
<content type='text'>
Leakfix.

* jk/test-delete-gpgsig-leakfix:
  test-tool: fix leak in delete-gpgsig command
</content>
</entry>
<entry>
<title>Merge branch 'eb/t1016-hash-transition-fix'</title>
<updated>2025-11-04T15:48:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T15:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=55e8615d1845aeb5e2276c9cee87ef141f9c7447'/>
<id>urn:sha1:55e8615d1845aeb5e2276c9cee87ef141f9c7447</id>
<content type='text'>
Test fix.

* eb/t1016-hash-transition-fix:
  t1016-compatObjectFormat: really freeze time for reproduciblity
</content>
</entry>
<entry>
<title>Merge branch 'tz/test-prepare-gnupghome'</title>
<updated>2025-11-04T15:48:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T15:48:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f0d663eace8c6797441c60220abec16b40e9a2b'/>
<id>urn:sha1:8f0d663eace8c6797441c60220abec16b40e9a2b</id>
<content type='text'>
Tests did not set up GNUPGHOME correctly, which is fixed but some
flaky tests are exposed in t1016, which needs to be addressed
before this topic can move forward.

* tz/test-prepare-gnupghome:
  t/lib-gpg: call prepare_gnupghome() in GPG2 prereq
  t/lib-gpg: add prepare_gnupghome() to create GNUPGHOME dir
</content>
</entry>
<entry>
<title>Merge branch 'jt/repo-structure'</title>
<updated>2025-11-04T15:48:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-04T15:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a9db6c66f53f3d1230e575eec682e494b363bdc0'/>
<id>urn:sha1:a9db6c66f53f3d1230e575eec682e494b363bdc0</id>
<content type='text'>
"git repo structure", a new command.

* jt/repo-structure:
  builtin/repo: add progress meter for structure stats
  builtin/repo: add keyvalue and nul format for structure stats
  builtin/repo: add object counts in structure output
  builtin/repo: introduce structure subcommand
  ref-filter: export ref_kind_from_refname()
  ref-filter: allow NULL filter pattern
  builtin/repo: rename repo_info() to cmd_repo_info()
</content>
</entry>
<entry>
<title>last-modified: implement faster algorithm</title>
<updated>2025-11-03T15:25:41Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2025-10-23T07:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a04e8c293766a4976ceceb4c663dd2963e0339e'/>
<id>urn:sha1:2a04e8c293766a4976ceceb4c663dd2963e0339e</id>
<content type='text'>
The current implementation of git-last-modified(1) works by doing a
revision walk, and inspecting the diff at each level of that walk to
annotate entries remaining in the hashmap of paths. In other words, if
the diff at some level touches a path which has not yet been associated
with a commit, then that commit becomes associated with the path.

While a perfectly reasonable implementation, it can perform poorly in
either one of two scenarios:

  1. There are many entries of interest, in which case there is simply
     a lot of work to do.

  2. Or, there are (even a few) entries which have not been updated in a
     long time, and so we must walk through a lot of history in order to
     find a commit that touches that path.

This patch rewrites the last-modified implementation that addresses the
second point. The idea behind the algorithm is to propagate a set of
'active' paths (a path is 'active' if it does not yet belong to a
commit) up to parents and do a truncated revision walk.

The walk is truncated because it does not produce a revision for every
change in the original pathspec, but rather only for active paths.

More specifically, consider a priority queue of commits sorted by
generation number. First, enqueue the set of boundary commits with all
paths in the original spec marked as interesting.

Then, while the queue is not empty, do the following:

  1. Pop an element, say, 'c', off of the queue, making sure that 'c'
     isn't reachable by anything in the '--not' set.

  2. For each parent 'p' (with index 'parent_i') of 'c', do the
     following:

     a. Compute the diff between 'c' and 'p'.
     b. Pass any active paths that are TREESAME from 'c' to 'p'.
     c. If 'p' has any active paths, push it onto the queue.

  3. Any path that remains active on 'c' is associated to that commit.

This ends up being equivalent to doing something like 'git log -1 --
$path' for each path simultaneously. But, it allows us to go much faster
than the original implementation by limiting the number of diffs we
compute, since we can avoid parts of history that would have been
considered by the revision walk in the original implementation, but are
known to be uninteresting to us because we have already marked all paths
in that area to be inactive.

To avoid computing many first-parent diffs, add another trick on top of
this and check if all paths active in 'c' are DEFINITELY NOT in c's
Bloom filter. Since the commit-graph only stores first-parent diffs in
the Bloom filters, we can only apply this trick to first-parent diffs.

Comparing the performance of this new algorithm shows about a 2.5x
improvement on git.git:

    Benchmark 1: master   no bloom
      Time (mean ± σ):      2.868 s ±  0.023 s    [User: 2.811 s, System: 0.051 s]
      Range (min … max):    2.847 s …  2.926 s    10 runs

    Benchmark 2: master with bloom
      Time (mean ± σ):     949.9 ms ±  15.2 ms    [User: 907.6 ms, System: 39.5 ms]
      Range (min … max):   933.3 ms … 971.2 ms    10 runs

    Benchmark 3: HEAD     no bloom
      Time (mean ± σ):     782.0 ms ±   6.3 ms    [User: 740.7 ms, System: 39.2 ms]
      Range (min … max):   776.4 ms … 798.2 ms    10 runs

    Benchmark 4: HEAD   with bloom
      Time (mean ± σ):     307.1 ms ±   1.7 ms    [User: 276.4 ms, System: 29.9 ms]
      Range (min … max):   303.7 ms … 309.5 ms    10 runs

    Summary
      HEAD   with bloom ran
        2.55 ± 0.02 times faster than HEAD     no bloom
        3.09 ± 0.05 times faster than master with bloom
        9.34 ± 0.09 times faster than master   no bloom

In short, the existing implementation is comparably fast *with* Bloom
filters as the new implementation is *without* Bloom filters. So, most
repositories should get a dramatic speed-up by just deploying this (even
without computing Bloom filters), and all repositories should get faster
still when computing Bloom filters.

When comparing a more extreme example of
`git last-modified -- COPYING t`, the difference is even 5 times better:

    Benchmark 1: master
      Time (mean ± σ):      4.372 s ±  0.057 s    [User: 4.286 s, System: 0.062 s]
      Range (min … max):    4.308 s …  4.509 s    10 runs

    Benchmark 2: HEAD
      Time (mean ± σ):     826.3 ms ±  22.3 ms    [User: 784.1 ms, System: 39.2 ms]
      Range (min … max):   810.6 ms … 881.2 ms    10 runs

    Summary
      HEAD ran
        5.29 ± 0.16 times faster than master

As an added benefit, results are more consistent now. For example
implementation in 'master' gives:

    $ git log --max-count=1 --format=%H -- pkt-line.h
    15df15fe07ef66b51302bb77e393f3c5502629de

    $ git last-modified -- pkt-line.h
    15df15fe07ef66b51302bb77e393f3c5502629de	pkt-line.h

    $ git last-modified | grep pkt-line.h
    5b49c1af03e600c286f63d9d9c9fb01403230b9f	pkt-line.h

With the changes in this patch the results of git-last-modified(1)
always match those of `git log --max-count=1`.

One thing to note though, the results might be outputted in a different
order than before. This is not considerd to be an issue because nowhere
is documented the order is guaranteed.

Based-on-patches-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Based-on-patches-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Acked-by: Taylor Blau &lt;me@ttaylorr.com&gt;
[jc: tweaked use of xcalloc() to unbreak coccicheck]
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/merge-base-optim'</title>
<updated>2025-11-03T14:49:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-03T14:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a4b1a1478b2a1e9f2f0b65e913baeed03f345a26'/>
<id>urn:sha1:a4b1a1478b2a1e9f2f0b65e913baeed03f345a26</id>
<content type='text'>
The code to walk revision graph to compute merge base has been
optimized.

* rs/merge-base-optim:
  commit-reach: avoid commit_list_insert_by_date()
</content>
</entry>
</feed>
