public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Martin Langhoff (CatalystIT)" <martin@catalyst•net.nz>
To: Junio C Hamano <junkio@cox•net>
Cc: git@vger•kernel.org
Subject: Re: [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution
Date: Fri, 04 Aug 2006 12:16:47 +1200	[thread overview]
Message-ID: <44D291EF.4020506@catalyst.net.nz> (raw)
In-Reply-To: <7v64h9pdx4.fsf@assigned-by-dhcp.cox.net>

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
-----------------------------------------------------------------------

  reply	other threads:[~2006-08-04  0:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-03 23:53 [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution Martin Langhoff
2006-08-04  0:01 ` Junio C Hamano
2006-08-04  0:16   ` Martin Langhoff (CatalystIT) [this message]
2006-08-04  0:37   ` [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution - take 2 Martin Langhoff
2006-08-04  8:09     ` Alex Riesen
2006-08-05  3:26       ` Martin Langhoff
2006-08-04  0:37   ` [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution Martin Langhoff (CatalystIT)
2006-08-04  3:31     ` Jeff King
2006-08-04  3:48       ` Martin Langhoff (CatalystIT)

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=44D291EF.4020506@catalyst.net.nz \
    --to=martin@catalyst$(echo .)net.nz \
    --cc=git@vger$(echo .)kernel.org \
    --cc=junkio@cox$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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