From: David Aguilar <davvid@gmail.com>
To: markus.heidelberg@web.de
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] contrib: add 'git difftool' for launching common merge tools
Date: Sun, 18 Jan 2009 16:34:43 -0800 [thread overview]
Message-ID: <402731c90901181634u32b39c87t6e88d9efef0d3485@mail.gmail.com> (raw)
In-Reply-To: <200901182025.24045.markus.heidelberg@web.de>
On Sun, Jan 18, 2009 at 11:25 AM, Markus Heidelberg
<markus.heidelberg@web.de> wrote:
> David Aguilar, 16.01.2009:
>
>> +# git-difftool-helper script. This script exports
>> +# GIT_EXTERNAL_DIFF and GIT_PAGER for use by git, and
>> +# GIT_NO_PROMPT and GIT_MERGE_TOOL for use by git-difftool-helper.
>
> GIT_DIFFTOOL_NO_PROMPT
Thanks for catching that.
>> +sub usage
>> +{
>> + print << 'USAGE';
>> +
>
> Why the leading empty line?
Fixed.
>> +usage: git difftool [--no-prompt] [--tool=tool] ["git diff" options]
>
> --tool=<tool>
>
> Swap the order of --no-prompt and --tool for consistency with
> git-difftool.txt and git-mergetool.
Done.
>> + meld|vimdiff)
>> + "$merge_tool_path" "$LOCAL" "$REMOTE"
>> + ;;
>> +
>> + gvimdiff)
>> + "$merge_tool_path" -f "$LOCAL" "$REMOTE"
>> + ;;
>
> Maybe use '-c "wincmd l"' for Vim as in my patch for git-mergetool to
> automatically place the cursor in the editable file? Useful for editing,
> if git-difftool is used to diff a file from the working tree.
>
> See http://thread.gmane.org/gmane.comp.version-control.git/106109
Very cool. When you have unstaged changes git diff sends the local
filename as the 2nd argument so I changed the vim command to "wincmd
r" so that vim places the cursor on the right hand side.
> You have deleted all the '-' chars from git-command, but when using it as the
> name I think it's the preferred method, only when used as command then without
> slash.
I was wondering about that. I think I tried to follow the lead from
the git-diff.txt documentation, but "diff" is a builtin and thus
doesn't have an actual git-diff, so I see why they should be
different.
I've changed the docs as you suggested -- 'git-difftool' is used to
name the script while 'git difftool' is used in the SYNOPSIS section.
>> +SEE ALSO
>> +--------
>> +linkgit:git-diff[7]::
>
> [1]
>
>> + Show changes between commits, commit and working tree, etc
>> +
>> +linkgit:git-mergetool[1]::
>> + Run merge conflict resolution tools to resolve merge conflicts
>> +
>> +linkgit:git-config[7]::
>
> [1]
Oops, I don't know how that happened.
>
> Works fine for me, thanks.
>
> Markus
>
Thanks again for your help.
--
David
next prev parent reply other threads:[~2009-01-19 0:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 8:00 [PATCH] contrib: add 'git difftool' for launching common merge tools David Aguilar
2009-01-18 19:25 ` Markus Heidelberg
2009-01-19 0:25 ` [PATCH v2] contrib: add 'git-difftool' for launching common diff tools David Aguilar
2009-01-19 4:45 ` Markus Heidelberg
2009-01-19 0:34 ` David Aguilar [this message]
2009-01-19 5:03 ` [PATCH] contrib: add 'git difftool' for launching common merge tools Markus Heidelberg
2009-01-19 5:32 ` David Aguilar
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=402731c90901181634u32b39c87t6e88d9efef0d3485@mail.gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=markus.heidelberg@web.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).