git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "John Cai via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>,
	John Cai <johncai86@gmail.com>
Subject: Re: [PATCH v4] attr: teach "--attr-source=<tree>" global option to "git"
Date: Mon, 01 May 2023 09:21:44 -0700	[thread overview]
Message-ID: <xmqqh6sw6mzr.fsf@gitster.g> (raw)
In-Reply-To: <pull.1470.v4.git.git.1682822352360.gitgitgadget@gmail.com> (John Cai via GitGitGadget's message of "Sun, 30 Apr 2023 02:39:12 +0000")

"John Cai via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: John Cai <johncai86@gmail.com>
>
> Earlier, 47cfc9bd (attr: add flag `--source` to work with tree-ish,
> 2023-01-14) taught "git check-attr" the "--source=<tree>" option to
> allow it to read attribute files from a tree-ish, but did so only
> for the command.  Just like "check-attr" users wanted a way to use
> attributes from a tree-ish and not from the working tree files,
> users of other commands (like "git diff") would benefit from the
> same.
>
> Undo most of the UI change the commit made, while keeping the
> internal logic to read attributes from a given tree-ish. Expose the
> internal logic via a new "--attr-source=<tree>" command line option
> given to "git", so that it can be used with any git command that
> runs as part of the main git process.
>
> Additionally, add an environment variable GIT_ATTR_SOURCE that is set
> when --attr-source is passed in, so that subprocesses use the same value
> for the attributes source tree.
>
> Signed-off-by: John Cai <johncai86@gmail.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>     attr: teach "--attr-source=" global option to "git"
>     
>     [1] aimed to allow gitattributes to be read from bare repositories when
>     running git-diff(1). Through discussion, a more general solution emerged
>     (represented by this patch), which allows the attribute machinery to
>     read attributes from a source passed in through a git flag.
>     
>     Changes since v3:
>     
>      * fixed documentation link
>      * simplified error message handling when --attr-source or
>        GIT_ATTR_SOURCE is bad

Looking good.  Will queue; let's merge it down to 'next' soonish.

Thanks.

  reply	other threads:[~2023-05-01 16:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  3:25 [PATCH] attr: teach "--attr-source=<tree>" global option to "git" John Cai via GitGitGadget
2023-03-27 17:02 ` [PATCH v2] " John Cai via GitGitGadget
2023-03-27 18:29   ` Junio C Hamano
2023-03-27 19:40     ` John Cai
2023-04-27 14:02   ` Christian Couder
2023-04-27 14:07     ` Christian Couder
2023-04-28 18:50   ` [PATCH v3] " John Cai via GitGitGadget
2023-04-28 20:22     ` Christian Couder
2023-04-30  2:22       ` John Cai
2023-04-30  2:39     ` [PATCH v4] " John Cai via GitGitGadget
2023-05-01 16:21       ` Junio C Hamano [this message]
2023-05-03 15:10       ` Christian Couder
2023-05-03 18:40         ` John Cai
2023-05-03 20:09       ` [PATCH v5] " John Cai via GitGitGadget
2023-05-04  9:50         ` Christian Couder
2023-05-06  4:15         ` [PATCH v6] " John Cai via GitGitGadget

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=xmqqh6sw6mzr.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johncai86@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).