Skip to content

Commit 9a2990f

Browse files
committed
Explain how branches interrupt the search for base
1 parent 1adc9cf commit 9a2990f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Documentation/git-absorb.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ STACK SIZE
118118
~~~~~~~~~~
119119

120120
When run without `--base`, git-absorb will only search for candidate
121-
commits to fixup within a certain range (by default 10). If you get an
122-
error like this:
121+
commits to fixup within a certain range (by default 10), or until the
122+
first non-HEAD branch is reached. If you get an error like this:
123123

124124
.............................................................................
125-
WARN stack limit reached, limit: 10
125+
WARN stack limit reached, use --base or configure absorb.maxStack to override
126126
.............................................................................
127127

128128
edit your local or global `.gitconfig` and add the following section:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Note: `cargo install` does not currently know how to install manpages ([cargo#27
8989

9090
`git absorb` works by checking if two patches P1 and P2 *commute*, that is, if applying P1 before P2 gives the same result as applying P2 before P1.
9191

92-
`git absorb` considers a range of commits ending at HEAD. The first commit can be specified explicitly with `--base <ref>`. By default the last 10 commits will be considered (see [Configuration](#configuration) below for how to change this).
92+
`git absorb` considers a range of commits ending at HEAD. The first commit can be specified explicitly with `--base <ref>`. Otherwise, commits are considered by walking HEAD's ancestors until reaching a non-HEAD branch or the default limit of 10 commits (see the CONFIGURATION section of [the documentation](Documentation/git-absorb.adoc#configuration) or the git-absorb manual page for how to change the limit).
9393

9494
For each hunk in the index, `git absorb` will check if that hunk commutes with the last commit, then the one before that, etc. When it finds a commit that does not commute with the hunk, it infers that this is the right parent commit for this change, and the hunk is turned into a fixup commit. If the hunk commutes with all commits in the range, it means we have not found a suitable parent commit for this change; a warning is displayed, and this hunk remains uncommitted in the index.
9595

0 commit comments

Comments
 (0)