From: Dmitry Nikulin <pastafariant@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: git-diff passes <rev>:<path> args to GIT_EXTERNAL_DIFF incorrectly?
Date: Fri, 30 Aug 2019 16:23:13 +0300 [thread overview]
Message-ID: <CAH53SykQWLtjt0gWVrz5KyH-9WyqaQ0GtkhmyLt09QEqcAS_dw@mail.gmail.com> (raw)
In-Reply-To: <9c280a3f-6a1a-61d1-a255-1dcf0671d39c@gmail.com>
On Fri, 30 Aug 2019 at 13:16, Phillip Wood <phillip.wood123@gmail.com> wrote:
> I'm not sure why the last argument is being split in
> your example. It is not split in the example below
I have replicated the splitting issue on my small demo repo [1]:
$ env GIT_EXTERNAL_DIFF=./print_argv.py git diff -M origin/branch1
origin/branch1-mv -- file1.txt file1-mv.txt
['./print_argv.py',
'file1.txt',
'/tmp/EWaCSc_file1.txt',
'2bef330804cb3f6962e45a72a12a3071ee9b5888',
'100644',
'/tmp/mtEiSc_file1-mv.txt',
'f8fd6737fbe5a45c97ba9c9de495dc46ff11eccd',
'100644',
'file1-mv.txt',
'similarity index 90%\n'
'rename from file1.txt\n'
'rename to file1-mv.txt\n'
'index 2bef330..f8fd673 100644\n']
This is, however, tangential to the original problem: documenting the
external diff CLI interface for diffing two blobs. Here is what I am
seeing:
$ env GIT_EXTERNAL_DIFF=./print_argv.py git diff
origin/branch1:file1.txt origin/branch1-mv:file1-mv.txt
['./print_argv.py',
'file1.txt',
'/tmp/n9USvy_file1.txt',
'2bef330804cb3f6962e45a72a12a3071ee9b5888',
'100644',
'/tmp/Zst0uy_file1-mv.txt',
'f8fd6737fbe5a45c97ba9c9de495dc46ff11eccd',
'100644',
'file1-mv.txt',
'index 2bef330..f8fd673 100644\n']
The meaning and origin of the last arg remains mysterious, and the
other args do not conform to the published documentation[2], which
states that the args should be:
path old-file old-hex old-mode new-file new-hex new-mode
Instead the args that are passed are:
path old-filename old-file old-hex old-mode new-file new-hex
new-mode new-filename something
[1]: https://github.com/dniku/git-external-diff-argv
[2]: https://www.git-scm.com/docs/git#Documentation/git.txt-codeGITEXTERNALDIFFcode
next prev parent reply other threads:[~2019-08-30 13:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 18:24 git-diff passes <rev>:<path> args to GIT_EXTERNAL_DIFF incorrectly? Dmitry Nikulin
2019-08-27 22:25 ` Dmitry Nikulin
2019-08-29 3:54 ` Junio C Hamano
2019-08-29 14:36 ` Dmitry Nikulin
2019-08-30 10:16 ` Phillip Wood
2019-08-30 13:23 ` Dmitry Nikulin [this message]
2019-08-30 14:17 ` Phillip Wood
2019-08-30 14:27 ` Jeff King
2019-08-30 15:28 ` Dmitry Nikulin
2019-08-30 15:51 ` Dmitry Nikulin
2019-08-30 14:29 ` SZEDER Gábor
2019-08-30 16:26 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAH53SykQWLtjt0gWVrz5KyH-9WyqaQ0GtkhmyLt09QEqcAS_dw@mail.gmail.com \
--to=pastafariant@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).