From: Caleb Cushing <xenoterracide@gmail.com>
To: Charles Bailey <charles@hashpling.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] mergetool merge/skip/abort
Date: Thu, 22 Jan 2009 09:17:39 -0500 [thread overview]
Message-ID: <81bfc67a0901220617l22b5a8e4ma48bb069d67cae91@mail.gmail.com> (raw)
In-Reply-To: <20090121170434.GA21727@hashpling.org>
>From bf55fdd37f0fa4d0b3a10f43fa3d1815a6dbc6b3 Mon Sep 17 00:00:00 2001
From: Caleb Cushing <xenoterracide@gmail.com>
Date: Tue, 20 Jan 2009 11:33:30 -0500
Subject: [PATCH] mergetool merge/skip/abort
add functionality to skip merging a file or abort from mergetool
---
git-mergetool.sh | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 00e1337..bd5711e 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
> This looks to me like no merge will happen if --no-prompt/-y or
> mergetool.prompt is set to false. Have you tested with this option or
> have I misread?
just tested and it works fine... meaning it doesn't prompt which is
what it's supposed to do.
> Also, I think you've lost some tabs. Mergetool does have some
> inconsistent tabbing but they way I've been aiming towards (which
> matches most, but not all of git-mergetool.sh) is to use tabs == 8
> spaces for indents but to indent each level by 4 spaces. e.g. three
> levels of indent is one tab plus four spaces.
mixing tabs and spaces == bad, I just realized I can't see half your
indents because I had tabstop=4 in my vimrc because I like indents at
4 spaces which is what you are doing through emulation. this is why I
generally just use tabs or spaces. files like fstab and .sql are my
few exceptions, both of which I do more on columns than indents.
> I'd like to keep (additionally) the behaviour, that the merge starts
> with just pressing <Enter>. Because what you mostly want to do, when
> using git-mergetool, is actually merging.
done, and maybe you... but generally I've got more skips than merges,
but I've got a corner case.
--
Caleb Cushing
http://xenoterracide.blogspot.com
next prev parent reply other threads:[~2009-01-22 14:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 14:37 [PATCH] mergetool merge/skip/abort Caleb Cushing
2009-01-21 16:17 ` Caleb Cushing
2009-01-21 16:33 ` Johannes Schindelin
2009-01-21 18:49 ` Markus Heidelberg
2009-01-22 5:07 ` Caleb Cushing
2009-01-21 17:04 ` Charles Bailey
2009-01-22 14:17 ` Caleb Cushing [this message]
2009-01-22 14:22 ` Charles Bailey
2009-01-23 15:16 ` Caleb Cushing
2009-01-23 17:26 ` Junio C Hamano
2009-01-24 18:36 ` Caleb Cushing
2009-01-24 21:45 ` Nanako Shiraishi
2009-01-25 0:18 ` Caleb Cushing
2009-01-25 5:20 ` Junio C Hamano
2009-01-26 22:58 ` Theodore Tso
2009-01-27 22:09 ` Charles Bailey
2009-01-27 22:37 ` Junio C Hamano
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=81bfc67a0901220617l22b5a8e4ma48bb069d67cae91@mail.gmail.com \
--to=xenoterracide@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
/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).