From 139f1b29f4e0fc2288a5504c729b3c082e028fee Mon Sep 17 00:00:00 2001 From: Will Palmer Date: Thu, 12 Aug 2010 07:33:00 +0100 Subject: [PATCH] (WIP) rough ideas for git-abort / git-continue --- git-abort.sh | 11 +++++++++++ git-continue.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 git-abort.sh create mode 100644 git-continue.sh diff --git a/git-abort.sh b/git-abort.sh new file mode 100644 index 0000000000..372a0ad9e5 --- /dev/null +++ b/git-abort.sh @@ -0,0 +1,11 @@ +#!/bin/sh +g="$(git rev-parse --git-dir 2>/dev/null)" || exit 1 + +# Situations: +# REBASE-INTERACTIVE +# git rebase abort +# MERGE +# what's a safe way to do this? reset --hard is too much of a sledgehammer, but might be +# appropriate in some situations. Checkout --patch ? +# BISECT +# git bisect reset diff --git a/git-continue.sh b/git-continue.sh new file mode 100644 index 0000000000..55061caf5d --- /dev/null +++ b/git-continue.sh @@ -0,0 +1,28 @@ +#!/bin/sh +g="$(git rev-parse --git-dir 2>/dev/null)" || exit 1 + +# Situations: +# REBASE-INTERACTIVE +# "edit" +# has the edit yet occurred ? (commit != original commit, no idea how to check) +# Y: git rebase continue +# N: Is there a diff? +# Y: Are any changes staged? +# Y: git commit --amend +# N: echo "Stage changes using git add" +# N: echo "Make changes to cause this tree to look how you want, or, +# "use git commit --amend to edit the message" +# "(conflict)" +# Are there unresolved conflicts? +# Y: Can we tell whether the conflicts occur in files which would have +# conflict markers? +# Y: Are there any conflict markers? +# Y: "Edit these files to remove the conflicts: (list files)" +# N: "It appears that the conflict has been resolved. Use git add to" +# "confirm that you have resolved the conflicts" +# N: "Edit these files to remove the conflicts: (list files), then use git add" +# "to confirm that they have been resolved" +# N: git rebase continue +# MERGE +# (conflict): +# Same as rebase conflict, but with "git commit" instead of "git rebase continue" at the end -- 2.11.4.GIT