Re: [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution

From: Martin Langhoff (CatalystIT) <martin@catalyst.net.nz>
Date: 2006-08-04 10:16:47
Junio C Hamano wrote:

>>diff --git a/git-xxdiff.sh b/git-xxdiff.sh
>>new file mode 100755
>>index 0000000..d562ab2
>>--- /dev/null
>>+++ b/git-xxdiff.sh
>>@@ -0,0 +1,38 @@
>>+#!/bin/sh
>>+
>>+USAGE='<path>'
>>+SUBDIRECTORY_OK=No
>>+. git-sh-setup
>>+
>>+FILE=$1
>>+MERGE_HEAD=`git rev-parse MERGE_HEAD`
>>+
>>+# Sanity checks
> 
> 
> We can have unmerged index without MERGE_HEAD (for example,
> think "rebase --merge" or "am -3"); drop check for that and
> instead check for stage 2 ("ours") for the path.
> 
> 	git cat-file blob :2:$FILE

(didn't know the :$stage: trick, neat)

I did think of using merge stages but I wasn't sure whether all the 
merge strategies followed the same convention. I'll fix up and re-post it.

> Can xxdiff take more than one file pairs?

Not that I can see.

>>+xxdiff -wbB --show-merged-pane --merged-filename $FILE~merged $FILE~HEAD $FILE~MERGE_HEAD
>>\ No newline at end of file
> 
> ;-).

Ouch, yes, I forgot the newline. Grumble.

I am also telling xxdiff to save the merged file as ~merged rather than 
overwriting the merge attempt that git has made. Better safe than sorry.

cheers,

m
-- 
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224                              MOB: +64(21)364-017
       Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Aug 04 10:17:28 2006

This archive was generated by hypermail 2.1.8 : 2006-08-04 10:18:00 EST