Git development
 help / color / mirror / Atom feed
From: George King <george.w.king@gmail.com>
To: git@vger.kernel.org
Subject: Git diff --no-index --no-prefix output loses leading slash in paths
Date: Mon, 18 Jun 2018 10:33:16 -0400	[thread overview]
Message-ID: <DFDB0568-9543-4135-A56D-821D4244DC8A@gmail.com> (raw)

As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following:

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


             reply	other threads:[~2018-06-18 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 14:33 George King [this message]
2018-06-18 14:59 ` Git diff --no-index --no-prefix output loses leading slash in paths Duy Nguyen
2018-06-18 15:01   ` George King

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=DFDB0568-9543-4135-A56D-821D4244DC8A@gmail.com \
    --to=george.w.king@gmail.com \
    --cc=git@vger.kernel.org \
    /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