[PATCH v10 3.2/3.7] fixup! history: add squash subcommand to fold a range
Phillip Wood <[email protected]> Mon, 3 Aug 2026 10:49:22 +0100
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <a6db74f8767622e8d1327e760b504298c25878f8.1785750108.git.phillip.wood@dunelm.org.uk> |
From: Phillip Wood <[email protected]> Look for BOTTOM commit instead of an UNINTERESTING commit There are a number of reasons why a commit may be marked as UNINTERESTING, we are specifically interested in finding a BOTTOM commit that marks the bottom of the commit range that is being squashed. Signed-off-by: Phillip Wood <[email protected]> --- builtin/history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/history.c b/builtin/history.c index 1d6d934bbe..64c9914c2f 100644 --- a/builtin/history.c +++ b/builtin/history.c @@ -1066,7 +1066,7 @@ static int resolve_squash_range(struct repository *repo, * bottom commit cannot be squashed. */ for (i = 0; i < revs.cmdline.nr; i++) - if (revs.cmdline.rev[i].flags & UNINTERESTING) + if (revs.cmdline.rev[i].flags & BOTTOM) break; if (i == revs.cmdline.nr) { ret = error(_("not a '<base>..<tip>' revision range")); -- 2.54.0.200.gfd8d68259e3