git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH] Introduce "precious" file concept
Date: Fri, 12 Apr 2019 10:28:00 +0900	[thread overview]
Message-ID: <xmqqbm1c107z.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CACsJy8Ct6A7a7FzzH7ZUv9R2+k=G6qhzZ8Yjq8GUDBdTr_QBQA@mail.gmail.com> (Duy Nguyen's message of "Wed, 10 Apr 2019 16:36:05 +0700")

Duy Nguyen <pclouds@gmail.com> writes:

> But gitattributes.txt explicitly says that it's wrong. One would need
> to do "path/** precious" to achieve the same thing.
>
> So yeah maybe doing this before S_ISDIR() is wrong. The definition of
> `precious` also only says "... is set on _files_". Maybe best to
> ignore attributes on directories? At least it looks like that's how
> all other attributes do.

I could be persuaded in the other direction if there are widespread
uses (or misuses---but once it gets widespread in the wild and turns
out to be useful, it ceases to be misuses and becomes a feature) of
giving an attribute to a directory that affects the treatment of
that directory *itself*, but if there is none, I'd prefer to keep
the attribute "what's tracked only".

Whether it is a good idea to give an attribute to a directory to
affect the treatement of the directory *itself* (eh, rather,
especially if it were a good idea), I'd consider it a misuse as a
short-hand for giving all paths within it the same attribute, given
"path/**" is available, as that would make it impossible to say "I'd
want to affect this directory, but not any of the directories or
files in it".

And if that is not clear in the current documentation set that faces
our developers, perhaps we should make it so.

Thanks.

  reply	other threads:[~2019-04-12  1:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 10:28 What's cooking in git.git (Apr 2019, #01; Thu, 4) Junio C Hamano
2019-04-04 11:08 ` Duy Nguyen
2019-04-04 21:29   ` Junio C Hamano
2019-04-06 20:28     ` Ævar Arnfjörð Bjarmason
2019-04-08  4:14       ` Junio C Hamano
2019-04-09 10:26         ` [PATCH] Introduce "precious" file concept Nguyễn Thái Ngọc Duy
2019-04-09 11:31           ` Junio C Hamano
2019-04-10  9:36             ` Duy Nguyen
2019-04-12  1:28               ` Junio C Hamano [this message]
2019-04-09 17:44           ` Eric Sunshine
2019-04-12 21:54           ` Ævar Arnfjörð Bjarmason
2019-04-13 10:19             ` Duy Nguyen
2019-04-05  1:05 ` What's cooking in git.git (Apr 2019, #01; Thu, 4) Todd Zullinger
2019-04-05  5:41   ` Junio C Hamano
2019-04-06 19:28 ` Ævar Arnfjörð Bjarmason
2019-04-08  4:18   ` Junio C Hamano
2019-04-06 19:57 ` Ævar Arnfjörð Bjarmason
2019-04-08  4:28   ` Junio C Hamano
2019-04-08 21:18     ` Josh Steadmon

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=xmqqbm1c107z.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=avarab@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.
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).