Commit 33d1e97
committed
Merge branch 'kk/commit-reach-find-all-fix'
Fix a commit-graph v1 regression in v2.55.0: The regression was
introduced by git/git@93e5b1680e (merged as git/git@6390da42c7) and
first shipped in v2.55.0, which is why the base here is vfs-2.55.0. That
commit added a fast-path early exit in paint_down_to_common() predicated
on the priority queue being generation-ordered. The predicate holds
under the generation-then-date ordering, but the same function falls
back to plain commit-date ordering when !min_generation &&
!corrected_commit_dates_enabled(r), which is true whenever the loaded
commit-graph lacks a GDAT chunk (i.e. a v1 graph). Under that fallback
the early exit is unsound: with clock skew, a closer merge base can sit
behind deeper commits in the queue, and git merge-base (without --all)
can silently return a non-best answer. The tip commit
git/git@ae68032a8d0 threads a gen_ordered flag through and gates the
early exit on it.
The reason microsoft/git in particular needs to carry this promptly,
rather than wait the usual weeks for upstream graduation, is Scalar.
set_recommended_config() pins commitGraph.generationVersion=1
(scalar.c:191), and that pin is applied on every scalar clone, scalar
register, and scalar reconfigure. Stolee introduced it in 18580f0 as
a deliberate but temporary compatibility measure for existing
enlistments with v1 graphs on disk, with the accompanying
Documentation/scalar.adoc note calling out that v2 is preferred and the
pin is expected to change once the upgrade story solidifies. Every
Scalar-managed enlistment on microsoft/git 2.55.x therefore lands on
exactly the broken code path, and Scalar's target audience (Office
monorepos and external adopters) is precisely the large-monorepo,
many-active-branches cohort Kristofer's original optimization was aimed
at in the first place.
Sadly, even though this regression first appeared in v2.55.0, the topic
branch is unfortunately based on an older commit where a context line
changed, causing merge conflicts. Resolve them in the same way as
0444c74 (Merge branch 'kk/commit-reach-find-all-fix' into next,
2026-07-10).
Signed-off-by: Johannes Schindelin <johasc@microsoft.com>2 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
| 115 | + | |
115 | 116 | | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | | - | |
151 | | - | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
52 | 88 | | |
53 | 89 | | |
54 | 90 | | |
| |||
967 | 1003 | | |
968 | 1004 | | |
969 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
970 | 1011 | | |
0 commit comments