login
Header Space

 
 

Re: Using Filemerge.app as a git-diff viewer

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff King <peff@...>
Cc: Toby White <tow21@...>, <git@...>
Date: Wednesday, November 21, 2007 - 8:59 am

El 21/11/2007, a las 12:27, Jeff King escribió:


A few problems with that:

- FileMerge is broken, and crashes if you pass /dev/null as a param  
(which happens for new/deleted files)

- you need to escape those $-signs

- the params you're interested in are actually $2 and $5, not $1 and  
$2, according to git(7)

- you need to handle the clean tree case (no params are passed)

- and also the 1-param case, "for unmerged paths", whatever that means

- will only work when run from the top of the tree (path parameters  
are passed in relative to that)

So here's a less-broken version of your suggestion, but it's still  
broken; a relatively complex wrapper is required to do this right:

$ cat >merge.sh <<EOF
#!/bin/sh
[ \$# -eq 7 ] && opendiff "\$2" "\$5"
EOF
chmod +x merge.sh
GIT_EXTERNAL_DIFF=./merge.sh git-diff ...

Cheers,
Wincent

-
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Using Filemerge.app as a git-diff viewer, Toby White, (Wed Nov 21, 6:31 am)
Re: Using Filemerge.app as a git-diff viewer, Jeff King, (Wed Nov 21, 7:27 am)
Re: Using Filemerge.app as a git-diff viewer, Toby White, (Wed Nov 21, 9:10 am)
Re: Using Filemerge.app as a git-diff viewer, Jeff King, (Wed Nov 21, 10:36 am)
Re: Using Filemerge.app as a git-diff viewer, Wincent Colaiuta, (Wed Nov 21, 9:28 am)
Re: Using Filemerge.app as a git-diff viewer, Wincent Colaiuta, (Wed Nov 21, 8:59 am)
Re: Using Filemerge.app as a git-diff viewer, Jeff King, (Wed Nov 21, 9:04 am)
Re: Using Filemerge.app as a git-diff viewer, Jonathan del Strother, (Wed Nov 21, 7:20 am)
speck-geostationary