Hi Caleb On Tue, Jan 27, 2009 at 10:56 PM, Caleb Cushing <xenoterracide@xxxxxxxxx> wrote: > 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@xxxxxxxxx> > --- > 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): " \ I really like the feature you added here. I'm sorry to bikeshed on this conversation, but after trying it I have one tiny suggestion. Right now the prompt looks like this with your patch: """ Merging the files: foo bar baz Normal merge conflict for 'foo': {local}: created {remote}: created Use (m)erge file or (s)kip file, or (a)bort? (xxdiff): m """ do you think "Use merge file or skip file, or abort?" might be better expressed as: """ Merging: foo bar baz Normal merge conflict for 'foo': {local}: created {remote}: created (m)erge, (s)kip, or (q)uit? (xxdiff): m """? I realize that your patch only touches the last line of the prompt (and not the introductory "Merging the files:" line) so if you agree then maybe I can throw a patch together for the introductory line. Also, my example has quit instead of abort for two reasons (the first one is silly) 1. skip rhymes with quit, so it reads very nicely out loud 2. consistency with git add --interactive 3. less typos (q and s are diagonal on qwerty, s and a are adjacent) (okay, that last one is silly too) Some might also mis-associate 'abort' with meaning "abort the merge." slightly off-topic: If we're looking at cleaning up mergetool a bit would you all mind a separate patch to convert it to using hard tabs throughout, just like git-rebase.sh? > + "$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 > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html