From: George King <george.w.king@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Git diff --no-index --no-prefix output loses leading slash in paths
Date: Mon, 18 Jun 2018 11:01:11 -0400 [thread overview]
Message-ID: <9852F27B-0FB8-4A7E-97C1-52B5D0D9377E@gmail.com> (raw)
In-Reply-To: <CACsJy8Cgm6gryO=X2GmztynbkkEEV=nz_J+QZG-93fS7D4eDRQ@mail.gmail.com>
This is a feature request; sorry for the confusion. My guess is that it's a corner case that was not considered due to the default prefixing.
> On Jun 18, 2018, at 10:59 AM, Duy Nguyen <pclouds@gmail.com> wrote:
>
> On Mon, Jun 18, 2018 at 4:36 PM George King <george.w.king@gmail.com> wrote:
>>
>> As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following:
>
> I checked as far back as v1.4.0 and git behaved the same way too. What
> version did it work for you? Or is this not a regression, rather a
> feature request?
>
>> diff --git relative/path absolute/path
>> index XXXXXXX..YYYYYYY ZZZZZZ
>> --- relative/path
>> +++ absolute/path
>>
>> The leading slash on `absolute/path` is lost. This is unfortunate; my use case is a diff highlighter that parses and reformats paths so that code editors can autodetect them and link to the files.
>>
>> Would the maintainers please consider fixing the output to preserve absolute paths?
>>
>> Thank you,
>> George King
>>
> --
> Duy
prev parent reply other threads:[~2018-06-18 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-18 14:33 Git diff --no-index --no-prefix output loses leading slash in paths George King
2018-06-18 14:59 ` Duy Nguyen
2018-06-18 15:01 ` George King [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9852F27B-0FB8-4A7E-97C1-52B5D0D9377E@gmail.com \
--to=george.w.king@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox