git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mergetool merge/skip/abort at prompt
@ 2009-01-28  6:56 Caleb Cushing
  2009-01-28  7:01 ` Caleb Cushing
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Caleb Cushing @ 2009-01-28  6:56 UTC (permalink / raw)
  To: Junio C Hamano, Charles Bailey, git, Nanako Shiraishi

previously git mergetool when run with prompt only allowed the user to continue
merging. This changes git mergetool to allow the option of skipping a file or
aborting, and includes an addtional key to explicitly select merge.

Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>
---
 git-mergetool.sh |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 00e1337..575fbb2 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -177,8 +177,24 @@ merge_file () {
     describe_file "$local_mode" "local" "$LOCAL"
     describe_file "$remote_mode" "remote" "$REMOTE"
     if "$prompt" = true; then
-	printf "Hit return to start merge resolution tool (%s): " "$merge_tool"
-	read ans
+	while true; do
+	    printf "Use (m)erge file or (s)kip file, or (a)bort? (%s): " \
+	    "$merge_tool"
+	    read ans
+	    case "$ans" in
+		[mM]*|"")
+		    break
+		    ;;
+		[sS]*)
+		    cleanup_temp_files
+		    return 0
+		    ;;
+		[aA]*)
+		    cleanup_temp_files
+		    exit 0
+		    ;;
+	    esac
+	done
     fi

     case "$merge_tool" in
-- 
1.6.1.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-28  9:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28  6:56 [PATCH] mergetool merge/skip/abort at prompt Caleb Cushing
2009-01-28  7:01 ` Caleb Cushing
2009-01-28  8:04 ` David Aguilar
2009-01-28  9:50   ` Caleb Cushing
2009-01-28  8:47 ` Charles Bailey
2009-01-28  9:53   ` Caleb Cushing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).