Skip to content
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

Make it easy to amend a completed imerge #163

Open
dabrahams opened this issue Sep 12, 2020 · 1 comment
Open

Make it easy to amend a completed imerge #163

dabrahams opened this issue Sep 12, 2020 · 1 comment

Comments

@dabrahams
Copy link

imerge is awesome; thank you for this wonderful tool!

I have a use-case that's not necessarily well-served, at least by easily findable documentation.

I've been on several teams that had a rotating responsibility to resolve conflicts when an automatic merge bot fails. The person doing this job is never an expert in all areas of the codebase, so their merge resolution may result in a broken result even though it looks reasonable, textually. I'd like to be able to create the imerge grid, then share it with someone, let them help me amend any of the commits in the graph (including merges that were not detected as conflicts), and update the imerge accordingly. I'd like there to be a record of which merges I manually intervened in, and be able to compare my resolution to the original conflicted states of the files. If this kind of workflow is supported, it's hard to find documentation about how to do it.

@mhagger
Copy link
Owner

mhagger commented Sep 22, 2020

This workflow is indeed not well documented. What would work today (obviously not very user-friendly):

  • You start an imerge and merge what you can.

  • You push all of the imerge references refs/imerge/$NAME/* and ask your colleague to please resolve the conflict at $COLUMN-$ROW.

  • Colleague fetches those references, then

      git checkout -b refs/heads/imerge/$NAME refs/imerge/$NAME/{manual,auto}/$COLUMN-$(( ROW - 1 ))
      git merge refs/imerge/$NAME/{manual,auto}/$(( COLUMN - 1 ))-$ROW
    

    (Whether the above references have manual or auto in their names depends on whether they were originally done manually or automatically.)

      […resolve any conflicts…]
      git commit
      git imerge record OR git imerge continue
    
  • Colleague pushes references refs/imerge/$NAME/* and passes the work to the next colleague.

It would also be possible for your colleague to push branch refs/heads/imerge/$NAME and for you to fetch that branch and run git imerge record or git imerge continue. (The branch could even be pushed under a different name, but it has to be named refs/heads/imerge/$NAME by the time you run record/continue.)

I haven't tested this but I think it would work, modulo typos on my part. It would be great to make it easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants