From: Caleb Cushing <xenoterracide@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Charles Bailey <charles@hashpling.org>,
git@vger.kernel.org, Nanako Shiraishi <nanako3@lavabit.com>
Subject: [PATCH] mergetool merge/skip/abort at prompt
Date: Wed, 28 Jan 2009 01:56:47 -0500 [thread overview]
Message-ID: <81bfc67a0901272256t726bf206k351bb6c8b2778bd5@mail.gmail.com> (raw)
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
next reply other threads:[~2009-01-28 6:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 6:56 Caleb Cushing [this message]
2009-01-28 7:01 ` [PATCH] mergetool merge/skip/abort at prompt 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=81bfc67a0901272256t726bf206k351bb6c8b2778bd5@mail.gmail.com \
--to=xenoterracide@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nanako3@lavabit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).