git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Steffen Prohaska <prohaska@zib.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] mergetool: support absolute paths to tools by git config merge.<tool>path
Date: Mon, 8 Oct 2007 17:57:29 -0400	[thread overview]
Message-ID: <20071008215729.GC31713@thunk.org> (raw)
In-Reply-To: <11918785613855-git-send-email-prohaska@zib.de>

On Mon, Oct 08, 2007 at 11:22:40PM +0200, Steffen Prohaska wrote:
> This commit adds a mechanism to provide absolute paths to the
> commands called by 'git mergetool'. A path can be specified
> in the configuation variable merge.<toolname>path.

This patch doesn't work the config file doesn't specify an explicit
mergetool via merge.tool.   The reason for that is this loop:

    for i in $merge_tool_candidates; do
        if test $i = emerge ; then
            cmd=emacs
        else
            cmd=$i
        fi
        if type $cmd > /dev/null 2>&1; then
            merge_tool=$i
            break
        fi
    done

is only checking to see if $cmd is in the path; it's not looking up
the merge.<toolname>path variable in this loop.

I guess the other question is whether we would be better off simply
telling the user to specify an absolute pathname in merge.tool, and
then having git-mergetool strip off the directory path via basename,
and then on window systems, stripping off the .EXE or .COM suffix, and
then downcasing the name so that something like "C:\Program
Files\ECMerge\ECMerge.exe" gets translated to "ecmerge".  Would I be
right in guessing that the reason why you used merge.<toolname>path
approach was to avoid this messy headache?

					- Ted

  parent reply	other threads:[~2007-10-08 21:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-08 21:22 [PATCH] mergetool: support absolute paths to tools by git config merge.<tool>path Steffen Prohaska
2007-10-08 21:22 ` [PATCH] mergetool: add support for ECMerge Steffen Prohaska
2007-10-08 21:44   ` Theodore Tso
2007-10-09  6:14     ` Steffen Prohaska
2007-10-09 12:37       ` Johannes Schindelin
2007-10-09 12:49         ` Steffen Prohaska
2007-10-09 13:03         ` Alan Hadsell
2007-10-09 13:17           ` Steffen Prohaska
2007-10-09 14:21             ` Alan Hadsell
2007-10-08 21:57 ` Theodore Tso [this message]
2007-10-08 22:01   ` [PATCH] mergetool: support absolute paths to tools by git config merge.<tool>path Theodore Tso
2007-10-09  6:30   ` Steffen Prohaska
2007-10-08 22:00 ` Frank Lichtenheld
2007-10-09  6:42   ` Steffen Prohaska
2007-10-09 12:35 ` Johannes Schindelin

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=20071008215729.GC31713@thunk.org \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=prohaska@zib.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).