keith / git-pile

Stacked diff support for GitHub workflows
MIT License
146 stars 11 forks source link

Bad state when ctrl-c'ing out of deleted file conflict #41

Open keith opened 1 year ago

keith commented 1 year ago
% g submitpr --draft
+ command -v gh
+ commit_arg=HEAD
+ [[ 1 -gt 0 ]]
+ [[ --draft != --* ]]
+ [[ --draft == \-\-\o\n\t\o ]]
++ git rev-parse HEAD
+ commit=db060d8f3c6b9977ee056bfc710a664ec7effd5f
+ upstream_ref='@{upstream}'
++ git pilebranchname db060d8f3c6b9977ee056bfc710a664ec7effd5f
+ branch_name=ks/lint-add-rule-for-using-testkit
+ [[ -n '' ]]
+ git show-ref --verify --quiet refs/heads/ks/lint-add-rule-for-using-testkit
++ git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'
+ branch_with_remote=origin/master
+ remote_branch_name=master
+ git branch --no-track ks/lint-add-rule-for-using-testkit '@{upstream}'
++ git pileworktreepath
+ worktree_dir=/Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30
+ [[ ! -d /Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30 ]]
+ git -C /Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30 switch --quiet ks/lint-add-rule-for-using-testkit
+ trap _detach_branch EXIT
+ git -C /Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30 cherry-pick db060d8f3c6b9977ee056bfc710a664ec7effd5f
error: could not apply db060d8f3c6... [lint] Add rule for using TestKit
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
+ git -C /Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30 mergetool
Merging:
Modules/TestKit/Sources/Assertions.swift
Modules/TestKit/Sources/Exports.swift

Deleted merge conflict for 'Modules/TestKit/Sources/Assertions.swift':
  {local}: deleted
  {remote}: modified file
Use (m)odified or (d)eleted file, or (a)bort? ^C++ _detach_branch
++ git -C /Users/ksmiley/.cache/git-pile/97f8f5ae0db37e213f59795d2a8f7d30 switch --detach --quiet
fatal: cannot switch branch while cherry-picking
Consider "git cherry-pick --quit" or "git worktree add".
IanEdington commented 1 year ago

Would writing more of this library in python make it easier to handle SIGINT? It might also improve contributions :D