-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
git-imerge: update for the latest version #8118
Conversation
Co-authored-by: Axel Navarro <[email protected]>
Co-authored-by: Axel Navarro <[email protected]>
Co-authored-by: Axel Navarro <[email protected]>
@navarroaxel thanks for review. These edits were made in hurry, and that's the consequences. ( |
- Abort imerge operation and clean up temporary commits: | ||
|
||
`git-imerge remove && git checkout {{previous_branch}}` | ||
`git-imerge remove` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I disagree with this change. The first part of the sentence ("Abort imerge operation") already refers to the cleaning up of the temporary commits. I don't think we need to specify that detail, especially since there's no mention of temporary commits before this.
In the same vein, I think it is better to keep the second part of the sentence and command, i.e. the extra step of returning to the original branch, as otherwise users would be left in a detached HEAD state. This is in fact recommended in the tool's documentation.
There are two issues for implementing a proper imerge-aborting subcommand (mhagger/git-imerge#123 and mhagger/git-imerge#189) but until then, this should not be presented stand-alone as if it were a fully supported operation of the git-imerge tool — it's more like plumbing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe replace that with git rebase --abort
? If I remember correctly, it returns to the original branch automatically.
There are some things I need to do before I can check and confirm the behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think git rebase --abort
would work; IIUC, the imerge operations aren't registered by git as a regular rebase. But do test and let us know :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I haven't used the merge
capability, only rebase
, and right now I don't have any PRs that need conflict resolution to test this. Looks like writing tests https://github.com/mhagger/git-imerge/tree/master/t would take a few hours, and I need them to complete other things.
Basically the testing plan.
- start
rebase
on aconflicting
branch - wait for terminal drop out for conflict resolution
- use
remove
and see ifgit
switched back toconflicting
- check if temp branch is still there
- start
merge
on aconflicting
branch - wait for terminal drop out for conflict resolution
- use
remove
and see ifgit
switched back toconflicting
- check if temp branch is still there
- start
rebase
on aconflicting
branch - wait for terminal drop out for conflict resolution
- use
git rebase --abort
and see ifgit
switched back toconflicting
- check if temp branch is still there
- start
merge
on aconflicting
branch - wait for terminal drop out for conflict resolution
- use
git merge --abort
and see ifgit
switched back toconflicting
- check if temp branch is still there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests for imerge would be awesome! Alternatively, in case writing the tests proves too burnensome, @mhagger himself could confirm whether git rebase --abort
is a viable alternative to manually git checkout
ing (or git switch
ing) to the previous branch.
Hi all! This thread has not had any recent activity. |
Hi all! This thread has not had any recent activity. |
Hi everyone. |
I failed. Not sure I could address this even if being paid. It is just too complicated to resolve without spending a few days on answering all questions. I checked "Allow edits by maintainers", so feel free edit and commit it in any flavor. If it is not too late of course. |
common/
,linux/
, etc.)Version of the command being documented (if known): 1.2.0