-
Notifications
You must be signed in to change notification settings - Fork 77
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
"No additions staged" when a new file is added #46
Comments
right now git-absorb doesn't handle added or deleted files - period (this even dates back to my original commutation design https://github.com/tummychow/git-scripts/blob/master/git-absorb.md#interlude-patch-theory). it ignores all staged changes that are an addition/removal (hence the log) and doesn't know how to commute those changes, hence the todo "more commutation cases". personally, i'm not sure the behavior of "adding a new file should absorb into the deletion of that file" is always what you want... i'd have to think about it more. i'm open to improvements to that log message though. if the index is entirely made of non-modification hunks, we should probably say that non-modification hunks cannot be absorbed |
I was surprised that git-absorb
That’s conceptually more straightforward than adding a file that was previously deleted. |
where exactly do you want the rename to be absorbed? the problem with renames is that they commute with everything. that's not conceptually straightforward at all. |
The last commit that modified that file. The use-case is that these files are database migrations and the version number is embedded in the filename. So if upstream gets updates to the database then pending PRs need to bump their version numbers, i.e. change the filenames. I thought that would be straightforward but I have no knowledge about the theory behind absorption. :) |
This is clearly not correct, I've added a new file to the index. I want it to go back and amend the commit that removed this file:
It might be that it doesn't recognize that
src/test/rustdoc/issue-66159.rs
is the same file because of the rename, but it should at least say that instead of "no additions staged".The text was updated successfully, but these errors were encountered: