-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hides commits from downstream branches #9
Comments
(For now I'm working around this with an alias |
hmm, very interesting. just to make sure i understand - that commit tree you mentioned, it's a linear sequence? you have let me noodle on this a bit. i think you have at least two (non-mutually-exclusive) suggestions that are interesting here:
|
Yep |
- Print "Please use --base to specify the base commit." when all the commits were "hidden" by other branches. (This makes the misbehavior described in tummychow#9 less confusing.) - Instead of noting that "merge commit found", explain what it means to the user: "Will not fix up past the merge commit". - Provide suggestions when "stack limit reached": "use --base or configure absorb.maxStack to override" - Don't honor absorb.maxStack with explicit --base - Note if the stack is empty: "No commits available to fix up, exiting" - Warn if "No additions staged, try adding something to the index." - Print "Could not find a commit to fix up, use --base to increase the search range." instead of "could not find noncommutative commit", and display this message by default (without the verbose mode)
I have the current commit tree in my repository
I have changed the
.travis.yml
file and staged it, which should be absorbed into37b490a
, runninggit-absorb -v -n
givesBecause it has hidden commits from
min-version
, a downstream branch from the one I'm currently fixing up, there are no commits available to absorb the change into. Deletingmin-version
and runninggit absorb -v -n
again gives:I'm not sure of the best solution here to support all usecases, I think personally what I would want is for
git-absorb
to walk down the first parent line from the current commit until it encounters any branch (local or remote) and hide commits from that point, you might notice I don't use a localmaster
branch so the current behaviour of only hiding local branches would fail to correctly identify the point at which to stop anyway.(EDIT: Sorry, accidentally submitted this with an old issue I was writing before I managed to debug where this was actually going wrong)
The text was updated successfully, but these errors were encountered: