-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add instructions on what to do when there are still staged changes after running git absorb #21
Comments
yep, this understanding is correct. absorb will leave things in the index if it couldn't find a place to absorb them into. i believe nickolay actually added some logging for this in #17 , which i just cut into a new release (https://github.com/tummychow/git-absorb/releases/tag/0.5.0) - give that a try and let me know what you think? |
It would be awesome to have some sort of interactive mode. Maybe a flag Edit: maybe even an interactive mode such as git's patch staging mode ( |
sorry but
if you want to arrange the commits manually, that's literally what interactive rebases are already for (e: which, by the way, is how git absorb itself actually works - if you only disagree with git absorb a little bit, you can do the rebase yourself and adjust the ordering that git absorb came up with, you don't need an entirely new user interface for that). |
@nickolay's change helps, in my opinion. Current output, with one new file staged (I figured it was the quickest way to get something that commuted with everything):
(update: the second WARN only appears if HEAD isn't the merge commit. If HEAD is a merge, we exit earlier with CRIT "No commits available to fix up, exiting") As a novice user, I saw this and immediately ran Is the output good enough to indicate to most users what the next steps would be? Unclear. For me (in the frame of mind when I first encountered the output) it was. But users differ. If there's a desire to adjust the output, then off the top of my head:
|
i think a change to implement your first point (don't output the |
First, I read your comment on the blog. Thank you. For point 2 in my previous comment, I may not have been clear. I meant to suggest no more than to output something that conveys "not all staged changes were converted into commits; you'll have to deal with the rest by hand", rather than just talking about the search boundaries:
Agree that giving comprehensive advice would be impossible, but
(with more polished wording) might give people a bit of a hint. Maybe it's too much hand-holding and too little actual help. |
yeah that seems ~fine. it's probably not worth thinking too hard about the wording |
I can take this. As usual, I'll probably do extraneous work to characterize current behaviour. It might be a little extra, but will be easily droppable. |
I ran
git absorb
and it created a number of fixup commits, but still left many staged changes. The documentation doesn't say what to do here, or what this means. I'm assuming that it means that absorb couldn't find any existing commits to fixup?It could be good to explain what this means in the documentation, and give suggested remediation steps. If you have any staged changes then you can't proceed to the next step of
git rebase -i --autosquash
.Apologies if I'm misunderstanding something!
The text was updated successfully, but these errors were encountered: