mhagger / git-imerge

Incremental merge for git
GNU General Public License v2.0
2.68k stars 126 forks source link

How to manually cleanup in case of a crash? #196

Closed tuxayo closed 1 year ago

tuxayo commented 1 year ago

version: 9bde208 (current master)

git imerge start --name=hold-rules-checker-master-imerge --first-parent hold-rules-checker-master-2021-10                                                                                                       ✘ 130 
Attempting automerge of 1370-5...failure.
Attempting automerge of 1-1...success.
Attempting automerge of 1-4...success.
Attempting automerge of 1-5...success.
Attempting automerge of 1370-5...failure.
Attempting automerge of 686-5...failure.
Attempting automerge of 344-5...success.
Attempting automerge of 515-5...success.
Attempting automerge of 601-5...success.
Attempting automerge of 644-5...failure.
Attempting automerge of 623-5...success.
Attempting automerge of 634-5...failure.
Attempting automerge of 629-5...failure.
Attempting automerge of 626-5...success.
Attempting automerge of 628-5...failure.
Attempting automerge of 627-5...failure.
Attempting automerge of 627-1...success.
Attempting automerge of 627-3...failure.
Attempting automerge of 627-2...failure.
Attempting automerge of 1370-1...success.
Autofilling 1-5...success.
Autofilling 2-5...success.
[...]
Autofilling 115-5...success.
Autofilling 116-5...Traceback (most recent call last):
  File "/usr/bin/git-imerge", line 33, in <module>
    sys.exit(load_entry_point('git-imerge==1.2.0', 'console_scripts', 'git-imerge')())
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 4357, in climain
    main(sys.argv[1:])
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 4326, in main
    cmd_start(parser, options)
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 3457, in cmd_start
    merge_state.auto_complete_frontier()
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 2823, in auto_complete_frontier
    frontier.auto_expand()
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 2114, in auto_expand
    merge_frontier = BlockwiseMergeFrontier.initiate_merge(block)
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 1877, in initiate_merge
    subblock.auto_outline()
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 2359, in auto_outline
    left = do_merge(i1, self[i1, 0].sha1, i2, left)
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 2345, in do_merge
    merge = self.git.automerge(commit1, commit2, msg=logmsg)
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 655, in automerge
    call_silently(['git', 'checkout', '-f', commit1])
  File "/usr/lib/python3.10/site-packages/gitimerge.py", line 230, in call_silently
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'checkout', '-f', '6ed29bccef590a1bc5e4cea175b41b8024483320']' returned non-zero exit status 128.
tuxayo commented 1 year ago

Was git imerge remove --name THE_NAME enough?

tuxayo commented 1 year ago

By the way, I caused the crash by running in another terminal git imerge diagram and then git status and then git log --oneline. Is that worth investigating and opening a ticket?

mhagger commented 1 year ago

Was git imerge remove --name THE_NAME enough?

It should be enough, yes. If you want to double-check manually, this section of the README documents the references that git-imerge uses to store its state.

tuxayo commented 1 year ago

Thanks, I'll check that :)