git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Dmitry Nikulin <pastafariant@gmail.com>,
	phillip.wood@dunelm.org.uk, git@vger.kernel.org
Subject: Re: git-diff passes <rev>:<path> args to GIT_EXTERNAL_DIFF incorrectly?
Date: Fri, 30 Aug 2019 09:26:58 -0700	[thread overview]
Message-ID: <xmqqlfvazkj1.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190830142932.GJ8571@szeder.dev> ("SZEDER Gábor"'s message of "Fri, 30 Aug 2019 16:29:32 +0200")

SZEDER Gábor <szeder.dev@gmail.com> writes:

> Another Python 2 vs 3 issue, perhaps?
>
>   # Python2, good:
>    ...
>    'f8fd6737fbe5a45c97ba9c9de495dc46ff11eccd',
>    '100644',
>    'file1-mv.txt',
>    'similarity index 90%\nrename from file1.txt\nrename to
>   file1-mv.txt\nindex 2bef330..f8fd673 100644\n']
>   # Python3, bad:
>   ...
>    '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']
>
> Let's just stick to plain old printf for now, as suggested by Phillip
> earlier, to reduce unnecessary confusion.

I notice that the latter is pretty-printed.  Pay attention to the
last few lines that end without a trailing comma.  Literal string
concatenation taking place to form a single string here, in which
case both are giving us the same string?

By the way, sorry for an earlier response based on what I
misremembered, which may have confused the discussion unnecessarily.
Ever since 65056021 ("built-in diff.", 2006-04-28) made "git diff" a
built-in, we had used (or at least attempted to use) <path> from
<treeish>:<path>, so it is not unexpected to see paths in two blob
diff output.

      reply	other threads:[~2019-08-30 16:27 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
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 [this message]

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=xmqqlfvazkj1.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pastafariant@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=szeder.dev@gmail.com \
    /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).