All of lore.kernel.org
 help / color / mirror / Atom feed
* feature request mergetool, skip, abort
@ 2009-01-20 16:39 Caleb Cushing
  2009-01-21 11:22 ` Charles Bailey
  0 siblings, 1 reply; 3+ messages in thread
From: Caleb Cushing @ 2009-01-20 16:39 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

firstly my patch sucks, and I know it. but hopefully it'll give some
idea of what I'm trying to do and someone can implement it properly.

basically there are some files, that I can't merge with git, but I
need to merge other files before I can fix those and I like to use
mergetool, so I want a way to skip the files I'm not going to be able
to merge.

-- 
Caleb Cushing

http://xenoterracide.blogspot.com

[-- Attachment #2: 0001-preliminary-merge-skip-abort-patch.patch --]
[-- Type: application/octet-stream, Size: 1223 bytes --]

From b43603bcd408cccea7ba55041a8356d0ca536989 Mon Sep 17 00:00:00 2001
From: Caleb Cushing <xenoterracide@gmail.com>
Date: Tue, 20 Jan 2009 11:33:30 -0500
Subject: [PATCH] preliminary merge/skip/abort patch

---
 git-mergetool.sh |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/git-mergetool.sh b/git-mergetool.sh
index 00e1337..c0b27ed 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -177,11 +177,25 @@ 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
-    fi
+		while true; do
+		printf "Use (m)erge file or (s)skip file, or (a)bort? (%s): " \
+		"$merge_tool"
+		read ans
+		case "$ans" in
+			[mM]*)
+			break
+			;;
+			[sS]*)
+			return 0 #go to the next file, needs to clean up
+			;;
+			[aA]*)
+			return 1 #should exit immediately, doesn't
+			;;
+		esac
+		done
+	fi
 
-    case "$merge_tool" in
+	case "$merge_tool" in
 	kdiff3)
 	    if base_present ; then
 		("$merge_tool_path" --auto --L1 "$MERGED (Base)" --L2 "$MERGED (Local)" --L3 "$MERGED (Remote)" \
-- 
1.6.1


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

* Re: feature request mergetool, skip, abort
  2009-01-20 16:39 feature request mergetool, skip, abort Caleb Cushing
@ 2009-01-21 11:22 ` Charles Bailey
  2009-01-21 14:26   ` Caleb Cushing
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Bailey @ 2009-01-21 11:22 UTC (permalink / raw)
  To: Caleb Cushing; +Cc: git

On Tue, Jan 20, 2009 at 11:39:59AM -0500, Caleb Cushing wrote:
> firstly my patch sucks, and I know it. but hopefully it'll give some
> idea of what I'm trying to do and someone can implement it properly.
> 
> basically there are some files, that I can't merge with git, but I
> need to merge other files before I can fix those and I like to use
> mergetool, so I want a way to skip the files I'm not going to be able
> to merge.
> 

For some reason I couldn't see a patch, but I like the idea of this
from the description and I was at very early stage of working on
something similar myself but it stalled due to other commitments.

For the moment the only way to 'skip' files is by passing full paths
of what you *don't* want to skip to mergetool which isn't really the
same thing at all.

-- 
Charles Bailey
http://ccgi.hashpling.plus.com/blog/

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

* Re: feature request mergetool, skip, abort
  2009-01-21 11:22 ` Charles Bailey
@ 2009-01-21 14:26   ` Caleb Cushing
  0 siblings, 0 replies; 3+ messages in thread
From: Caleb Cushing @ 2009-01-21 14:26 UTC (permalink / raw)
  To: Charles Bailey; +Cc: git

patch was an attachement.

after looking through the list and seeing the conventions I've a fully
working one now, so I'm going to start a new thread with it.
-- 
Caleb Cushing

http://xenoterracide.blogspot.com

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-20 16:39 feature request mergetool, skip, abort Caleb Cushing
2009-01-21 11:22 ` Charles Bailey
2009-01-21 14:26   ` Caleb Cushing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.