git-imerge
git-imerge copied to clipboard
Add 'status' command
Hello,
Here's an implementation for a 'status' command, as discussed. Let me know what you think.
Cheers! JR
Cool, thanks for working on this! It will be a nice feature.
I belatedly realized that I was working on a topic branch that could help you with your "status" command (I just merged the topic branch to master): I added fields "tip1" and "tip2" to MergeState. These record the names of the branches that are being merged, based on the user's arguments to "git imerge start", because I wanted to add that info to the suggested commit message when simplifying to a merge commit. But you could use these fields instead of your get_refname() method, simplifying the code and potentially giving an answer that is more relevant to the user. (Instead of computing and using ref1
and ref2
, simply use merge_state.tip1
and merge_state.tip2
.)
I also think that the "status" command should work even if a conflicting merge is not in progress. For example, if the user has just run git commit
to commit a conflict resolution, or has just run git imerge record
to record the last conflict resolution without setting up the next one, then git imerge status
could nevertheless say something useful about the current situation rather than just spitting out an error message. It might even suggest the next command that the user might want to run.
Finally, it looks like the implementation of "status" could share some code with request_user_merge()
.
Altogether very nice. I look forward to the next iteration. But please be patient; I will have spotty internet for the next week or so and might not be able to reply promptly.
@jrdavid, are you working on a new version of your patch? If so, is there anything I can help with?
I'm not currently working on it, no. I still want to do it but I've just been swamped the last few weeks. You've helped quite a bit already. I think I'm good for now, thanks. I just don't know when I'll be able to get around to it.
+10
Any reason to keep this open?
No.