git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: Laurent Arnoud <laurent@spkdev.net>,
	phillip.wood@dunelm.org.uk,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	git@vger.kernel.org
Subject: Re: [PATCH v5] diff: add config option relative
Date: Tue, 19 May 2020 11:00:54 -0700	[thread overview]
Message-ID: <xmqqv9krztwp.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200519003006.GC1999@danh.dev> ("Đoàn Trần Công Danh"'s message of "Tue, 19 May 2020 07:30:06 +0700")

Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:

> Sane people wouldn't want to read that document when we don't have the
> config for diff.relative
>
> But, now, we have. Let's document --no-relative, specifically for
> git-format-patch(1).
>
> Perhaps something like this (maybe just fixing up to Laurent's)

I love it when a contributor pushes back with a well thought out
counter-argument.  Yes, I think the reasoning along the line makes
sense.

If a project binds another project with -Xsubtree=<path>, a change
to that part would be a good candidate to use "format-patch" with
the "--relative=<path>".  We didn't consider it a use case that is
interesting enough, but it may be, which gives another reason why
documenting "--[no-]relative[=<path>]" for the command may not be a
bad thing, not just for the purpose of defeating "diff.relative".

For that reason, it may even make sense to use the same text for
--no-relative and --relative[=<path>] we use for other commands in
the diff family, i.e. leaving only -R inside the ifndef block.

Thanks.

> -----------------8<--------------
> From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
>  <congdanhqx@gmail.com>
> Date: Tue, 19 May 2020 07:24:48 +0700
> Subject: [PATCH] Documentation: document --no-relative for format-patch
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> git-format-patch(1) accepts --relative for a long time, but the
> generated patch couldn't be applied without accompanying information.
>
> Hence, we've never document --relative for git-format-patch(1).
>
> Now, we've introduced `diff.relative` config, let's tell Git's users
> that they have an option to override it.
>
> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
> ---
>  Documentation/diff-options.txt | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
> index 167b451b89..0f5c108324 100644
> --- a/Documentation/diff-options.txt
> +++ b/Documentation/diff-options.txt
> @@ -654,6 +654,11 @@ ifndef::git-format-patch[]
>  	`--no-relative` can be used to countermand both `diff.relative` config
>  	option and previous `--relative`.
>  endif::git-format-patch[]
> +ifdef::git-format-patch[]
> +--no-relative::
> +	Countermand `diff.relative` config. Show all changes in the repository
> +	with pathname relative to top-level directory of the repository.
> +endif::git-format-patch[]
>  
>  -a::
>  --text::

  reply	other threads:[~2020-05-19 18:01 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 15:57 [PATCH] diff: add config option relative Laurent Arnoud
2020-05-15 22:22 ` Philip Oakley
2020-05-16 17:30   ` Laurent Arnoud
2020-05-15 23:31 ` brian m. carlson
2020-05-16  0:04   ` Junio C Hamano
2020-05-16 17:35     ` Laurent Arnoud
2020-05-16 17:38     ` [PATCH v3] " Laurent Arnoud
2020-05-16 18:33       ` Phillip Wood
2020-05-16 19:40         ` [PATCH v4] " Laurent Arnoud
2020-05-17  2:14           ` Đoàn Trần Công Danh
2020-05-17  2:48             ` Danh Doan
2020-05-17 15:12             ` Junio C Hamano
2020-05-18  9:40               ` [PATCH v5] " Laurent Arnoud
2020-05-18 11:46                 ` Shourya Shukla
2020-05-18 13:04                   ` Đoàn Trần Công Danh
2020-05-18 17:25                   ` Laurent Arnoud
2020-05-18 13:56                 ` Đoàn Trần Công Danh
2020-05-18 16:57                   ` Junio C Hamano
2020-05-18 19:12                     ` Đoàn Trần Công Danh
2020-05-18 20:37                       ` Junio C Hamano
2020-05-19  0:30                         ` Đoàn Trần Công Danh
2020-05-19 18:00                           ` Junio C Hamano [this message]
2020-05-19 19:39                             ` [PATCH v7] " Laurent Arnoud
2020-05-19 23:01                               ` Đoàn Trần Công Danh
2020-05-22 10:46                                 ` [PATCH v8] " Laurent Arnoud
2020-05-23  2:14                                   ` Đoàn Trần Công Danh
2020-05-22 10:48                                 ` [PATCH v7] " Laurent Arnoud
2020-05-18 17:03                   ` [PATCH v5] " Junio C Hamano
2020-05-18 17:21                     ` [PATCH v6] " Laurent Arnoud
2020-05-18 17:31                       ` Junio C Hamano
2020-05-18 17:33                         ` Junio C Hamano
2020-05-18 17:34                       ` Eric Sunshine
2020-05-18 19:19                       ` Đoàn Trần Công Danh
2020-05-18 20:02                         ` Junio C Hamano
2020-05-18 17:32                   ` [PATCH v5] " Laurent Arnoud
2020-05-18 16:19                 ` Eric Sunshine
2020-05-18 17:26                   ` Laurent Arnoud
2020-05-18  9:43             ` [PATCH v4] " Laurent Arnoud
2020-05-17 15:07         ` [PATCH v3] " 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=xmqqv9krztwp.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=laurent@spkdev.net \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sandals@crustytoothpaste.net \
    /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).