(WIP) rough ideas for git-abort / git-continue
[git/wpalmer.git] / git-continue.sh
blob55061caf5dfbfae4d229c69256fa32bf651708f4
1 #!/bin/sh
2 g="$(git rev-parse --git-dir 2>/dev/null)" || exit 1
4 # Situations:
5 # REBASE-INTERACTIVE
6 # "edit"
7 # has the edit yet occurred ? (commit != original commit, no idea how to check)
8 # Y: git rebase continue
9 # N: Is there a diff?
10 # Y: Are any changes staged?
11 # Y: git commit --amend
12 # N: echo "Stage changes using git add"
13 # N: echo "Make changes to cause this tree to look how you want, or,
14 # "use git commit --amend to edit the message"
15 # "(conflict)"
16 # Are there unresolved conflicts?
17 # Y: Can we tell whether the conflicts occur in files which would have
18 # conflict markers?
19 # Y: Are there any conflict markers?
20 # Y: "Edit these files to remove the conflicts: (list files)"
21 # N: "It appears that the conflict has been resolved. Use git add to"
22 # "confirm that you have resolved the conflicts"
23 # N: "Edit these files to remove the conflicts: (list files), then use git add"
24 # "to confirm that they have been resolved"
25 # N: git rebase continue
26 # MERGE
27 # (conflict):
28 # Same as rebase conflict, but with "git commit" instead of "git rebase continue" at the end