From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH/RFC 3/3] diff.c: add --relative-names to be used with --name-only
Date: Mon, 27 Jun 2016 15:35:42 -0400 [thread overview]
Message-ID: <20160627193542.GC10877@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8BYsPCLiEM2syrGUa_VOCHnR3W+sSiG3sNFme1L0Hx7XA@mail.gmail.com>
On Mon, Jun 27, 2016 at 09:33:18PM +0200, Duy Nguyen wrote:
> On Mon, Jun 27, 2016 at 9:24 PM, Jeff King <peff@peff.net> wrote:
> > On Sun, Jun 26, 2016 at 07:16:16PM +0200, Nguyễn Thái Ngọc Duy wrote:
> >
> >> The difference with --relative option is, this option does not filter
> >> paths outside cwd. You can add two more chars " ." on your command
> >> line for that.
> >
> > Another difference seems to be that it applies only to --name-only, and
> > not to other forms. I can see how "-p --relative-names" might be weird,
> > because you'll get:
> >
> > diff --git a/../foo/bar b/../foo/bar
> >
> > or something. But surely things like --name-status would want to support
> > it?
>
> That's my plan :) Anything that does not start with a/ or b/ should
> respect this new option.
I guess it seems a bit unfortunate that:
git log -p --relative-names .
would not be equivalent to:
git log -p --relative
I am not entirely convinced that "a/../Documentation/git.txt" is that
unreasonable. Sure, it looks weird, and probably nobody will be able to
apply the patch. But it is what the user asked for.
-Peff
next prev parent reply other threads:[~2016-06-27 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 17:16 [PATCH 0/3] diff: add --relative-names Nguyễn Thái Ngọc Duy
2016-06-26 17:16 ` [PATCH 1/3] diff.c: refactor strip_prefix() Nguyễn Thái Ngọc Duy
2016-06-26 17:16 ` [PATCH 2/3] diff.c: separate "prefix" from RELATIVE_NAME (aka --relative) Nguyễn Thái Ngọc Duy
2016-06-26 17:16 ` [PATCH/RFC 3/3] diff.c: add --relative-names to be used with --name-only Nguyễn Thái Ngọc Duy
2016-06-26 23:05 ` Eric Sunshine
2016-06-27 19:24 ` Jeff King
2016-06-27 19:33 ` Duy Nguyen
2016-06-27 19:35 ` Jeff King [this message]
2016-06-27 19:39 ` Duy Nguyen
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=20160627193542.GC10877@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
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).