<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/subtree, branch maint</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=maint</id>
<link rel='self' href='https://git.shady.money/git/atom?h=maint'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-01-26T06:37:35Z</updated>
<entry>
<title>Revert "Merge branch 'cs/rebased-subtree-split'"</title>
<updated>2026-01-26T06:37:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-01-25T17:43:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab689ea7f91ab0858e85776f31102203d3ea7b83'/>
<id>urn:sha1:ab689ea7f91ab0858e85776f31102203d3ea7b83</id>
<content type='text'>
This reverts commit 79e3055baba32e2952e6e8994cdcd4fc145ba7f0, reversing
changes made to 9813aace1e52765e01e688672cdcdcbe25336ec7.

Regresison report

    https://lore.kernel.org/git/755578cb-07e0-4b40-aa90-aacf4d45ccaa@heusel.eu/
</content>
</entry>
<entry>
<title>contrib/subtree: detect rewritten subtree commits</title>
<updated>2026-01-10T04:21:43Z</updated>
<author>
<name>Colin Stagner</name>
<email>ask+git@howdoi.land</email>
</author>
<published>2026-01-10T01:18:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=28a7e27cff717e5ef91f7445e6a418068608082d'/>
<id>urn:sha1:28a7e27cff717e5ef91f7445e6a418068608082d</id>
<content type='text'>
    git subtree split --prefix P

detects splits that are outside of path prefix `P` and prunes
them from history graph processing. This improves the performance
of repeated `split --rejoin` with many different prefixes.

Both before and after 83f9dad7d6 (contrib/subtree: fix split with
squashed subtrees, 2025-09-09), the pruning logic does not detect
**rebased** or **cherry-picked** git-subtree commits. If `split`
encounters any of these commits, the split output may have
incomplete history.

All commits authored by

    git subtree merge [--squash] --prefix Q

have a first or second parent that has *only* subtree commits
as ancestors. When splitting a completely different path `P/`,
it is safe to ignore:

1. the merged tree
2. the subtree parent
3. *all* of that parent's ancestry, which applies only to
   path `Q/` and not `P/`.

But this relationship no longer holds if the git-subtree commit
is rebased or otherwise reauthored. After a rebase, the former
git-subtree commit will have other unrelated commits as ancestors.
Ignoring these commits may exclude the history of `P/`,
leading to incomplete `subtree split` output.

The pruning logic relies solely on the `git-subtree-*:` trailers
to detect git-subtree commits, which it blindly accepts without
further validation. The split logic also takes its time about
being wrong: `cmd_split()` execs a `git show` for *every* commit
in the split range… twice. This is inefficient in a shell script.

Add a "reality check" to ignore rebased or rewritten commits:

* Rewrites of non-merge commits cannot be detected, so the new
  detector no longer looks for them.

* Merges carry a `git-subtree-mainline:` trailer with the hash of
  the **first parent**. If this hash differs, or if the "merge"
  commit no longer has multiple parents, a rewrite has occurred.

To increase speed, package this logic in a new method,
`find_other_splits()`. Perform the check up-front by iterating
over a single `git log`. Add ignored subtrees to:

1. the `notree` cache, which excludes them from the `split` history

2. a `prune` negative refs list. The negative refs prevent
   recursing into other subtrees. Since there are potentially a
   *lot* of these, cache them on disk and use rev-list's
   `--stdin` mode.

Reported-by: George &lt;george@mail.dietrich.pub&gt;
Signed-off-by: Colin Stagner &lt;ask+git@howdoi.land&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>meson: make GIT_HTML_PATH configurable</title>
<updated>2025-11-06T17:58:56Z</updated>
<author>
<name>D. Ben Knoble</name>
<email>ben.knoble+github@gmail.com</email>
</author>
<published>2025-11-04T13:58:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d63417e3ad67e5857cd52f9177fe39719d6ac84a'/>
<id>urn:sha1:d63417e3ad67e5857cd52f9177fe39719d6ac84a</id>
<content type='text'>
Makefile-based builds can configure Git's internal HTML_PATH by defining
htmldir, which is useful for packagers that put documentation in
different locations. Gentoo, for example, uses version-suffixed
directories like ${prefix}/share/doc/git-2.51 and puts the HTML
documentation in an 'html' subdirectory of the same.

Propagate the same configuration knob to Meson-based builds so that
"git --html-path" on such systems can be configured to output the
correct directory.

Signed-off-by: D. Ben Knoble &lt;ben.knoble+github@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/meson-build-docs'</title>
<updated>2025-10-02T19:26:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-02T19:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2f49ec7991d4c6f4c7b011d8f8b0c054c7b52402'/>
<id>urn:sha1:2f49ec7991d4c6f4c7b011d8f8b0c054c7b52402</id>
<content type='text'>
The build procedure based on meson learned a target to only build
documentation, similar to "make doc".

* ps/meson-build-docs:
  ci: don't compile whole project when testing docs with Meson
  meson: print docs backend as part of the summary
  meson: introduce a "docs" alias to compile documentation only
</content>
</entry>
<entry>
<title>meson: introduce a "docs" alias to compile documentation only</title>
<updated>2025-09-11T16:57:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-11T09:16:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=197f0d0f390ef2f1e573a57c27ed7db8df7a46fd'/>
<id>urn:sha1:197f0d0f390ef2f1e573a57c27ed7db8df7a46fd</id>
<content type='text'>
Meson does not currently provide a target to compile documentation,
only. Instead, users needs to compile the whole project, which may be
way more than they really intend to do.

Introduce a new "docs" alias to plug this gap. This alias can be invoked
e.g. with `meson compile docs`.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/subtree: fix split with squashed subtrees</title>
<updated>2025-09-11T16:01:15Z</updated>
<author>
<name>Colin Stagner</name>
<email>ask+git@howdoi.land</email>
</author>
<published>2025-09-10T03:11:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=83f9dad7d6fb5988b68f80b25bd87c68693195dd'/>
<id>urn:sha1:83f9dad7d6fb5988b68f80b25bd87c68693195dd</id>
<content type='text'>
98ba49ccc2 (subtree: fix split processing with multiple subtrees
present, 2023-12-01) increases the performance of

    git subtree split --prefix=subA

by ignoring subtree merges which are outside of `subA/`. It also
introduces a regression. Subtree merges that should be retained
are incorrectly ignored if they:

1. are nested under `subA/`; and
2. are merged with `--squash`.

For example, a subtree merged like:

    git subtree merge --squash --prefix=subA/subB "$rev"
    #                 ^^^^^^^^          ^^^^

is erroneously ignored during a split of `subA`. This causes
missing tree files and different commit hashes starting in
git v2.44.0-rc0.

The method:

    should_ignore_subtree_split_commit REV

should test only a single commit REV, but the combination of

    git log -1 --grep=...

actually searches all *parent* commits until a `--grep` match is
discovered.

Rewrite this method to test only one REV at a time. Extract commit
information with a single `git` call as opposed to three. The
`test` conditions for rejecting a commit remain unchanged.

Unit tests now cover nested subtrees.

Signed-off-by: Colin Stagner &lt;ask+git@howdoi.land&gt;
Acked-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/subtree-gpg-sign'</title>
<updated>2025-06-24T16:48:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-06-24T16:48:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afe1a7aee768e3171e83772d0587e789ca0de3df'/>
<id>urn:sha1:afe1a7aee768e3171e83772d0587e789ca0de3df</id>
<content type='text'>
"git subtree" (in contrib/) learns to grok GPG signing its commits.

* pw/subtree-gpg-sign:
  contrib/subtree: add -S/--gpg-sign
  contrib/subtree: parse using --stuck-long
</content>
</entry>
<entry>
<title>Merge branch 'jw/doc-txt-to-adoc-refs'</title>
<updated>2025-06-18T20:53:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-06-18T20:53:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19612d0e4628dad9719198078e4c5d9008454d05'/>
<id>urn:sha1:19612d0e4628dad9719198078e4c5d9008454d05</id>
<content type='text'>
Some leftover references to documentation source files that no
longer exist, due to recent ".txt" -&gt; ".adoc" renaming, have been
corrected.

* jw/doc-txt-to-adoc-refs:
  doc: update references to renamed AsciiDoc files
</content>
</entry>
<entry>
<title>doc: update references to renamed AsciiDoc files</title>
<updated>2025-06-06T22:05:47Z</updated>
<author>
<name>Jouke Witteveen</name>
<email>j.witteveen@gmail.com</email>
</author>
<published>2025-05-21T19:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3717a5775a7ba9e5f5b2794171ab205c0a177ef8'/>
<id>urn:sha1:3717a5775a7ba9e5f5b2794171ab205c0a177ef8</id>
<content type='text'>
The .txt extensions were changed to .adoc in 1f010d6 (doc: use .adoc
extension for AsciiDoc files, 2025-01-20). References to the renamed
files were not updated yet.

Signed-off-by: Jouke Witteveen &lt;j.witteveen@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>contrib/subtree: add -S/--gpg-sign</title>
<updated>2025-06-04T16:32:17Z</updated>
<author>
<name>Patrik Weiskircher</name>
<email>patrik@pspdfkit.com</email>
</author>
<published>2025-06-04T14:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fea50ce4118c38d74d05c3595abe7756cabee4e1'/>
<id>urn:sha1:fea50ce4118c38d74d05c3595abe7756cabee4e1</id>
<content type='text'>
Allows optionally signing the commits that git subtree creates. This can
be necessary when working in a repository that requires gpg signed
commits.

Signed-off-by: Patrik Weiskircher &lt;patrik@pspdfkit.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
