Re: [PATCH] mergetool: make Apple's FileMerge available as a merge_tool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 17, 2007, at 8:12 PM, Theodore Tso wrote:

On Sun, Jun 17, 2007 at 06:13:11PM +0200, Steffen Prohaska wrote:

I wasn't aware of this fact. git-mergetool proposed to use vimdiff
although I had preferred the graphical application FileMerge, which
would have been launched by opendiff.

Do you know of a way of determining whether or not under MacOS X, a
program can easily determine whether or not the user is sitting in
front of the graphical display, as opposed to coming in via an SSH
connection?

this might do the job:

--- SNIP ---
#! /bin/sh

pid=$$

while [ $pid -ne 1 ] ; do
    command=$(ps -p $pid | tail -n 1 | cut -b 27-)
    echo $command | grep -q sshd && { echo "ssh" ; exit ; }
    echo $command | grep -q Terminal && { echo "local" ; exit ; }
    pid=$(ps -O ppid -p $pid | tail -n 1 | cut -b 6-11)
done

echo "unknown"
--- SNIP ---


If so, we could use that under MacOS to make the defaults be to use
opendiff under those circumstances.

Realistically, though, past a certain point we can only be so smart
with the heuristics.  If you know what you want, you should really set
the merge.tool config option in your ~/.gitconfig file, and be done
with it.

Well, I'm done with it. I learned that opendiff and FileMerge are the
same, which I wasn't aware of before.


Don't know if my patch makes any sense. Probably a note in the
documentation that opendiff launches the GUI would be nice.

Maybe a change so that opendiff is listed as "opendiff (aka
FileMerge)", perhaps?

perhaps. It wouldn't make things worse.

	Steffen


-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux