From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jan Larres <jan@majutsushi.net>, git@vger.kernel.org
Subject: Re: check-attr doesn't respect recursive definitions
Date: Tue, 2 Apr 2013 12:30:34 -0400 [thread overview]
Message-ID: <20130402163034.GA19252@sigill.intra.peff.net> (raw)
In-Reply-To: <7vtxnogbft.fsf@alter.siamese.dyndns.org>
On Tue, Apr 02, 2013 at 09:11:02AM -0700, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > Yes, it is the expected behavior, though I cannot offhand think of
> > anything that would break if we did apply it recursively.
>
> Conceptually that breaks our brain. "All files in doc/ directories
> are text" and "doc/ directory is text" are two different things, no?
In some systems, yes, but git does not have any notion of "doc/" as an
item (after all, we track content in files, not directories), so I do
not see what it means to specify a directory except to say "everything
under it has this property".
We already treat "foo/" in gitignore this way (i.e., "everything under
foo is ignored"). And we treat export-ignore the same way in
git-archive.
I agree that saying "Documentation diff=text" is not something I would
expect people to do, but what _should_ it do? Recursively applying under
the directory seems a sane option. I would not want to paint us into a
corner, but I cannot think of any other reasonable thing to do with it
(which is why I phrased it as "I cannot think of anything that would
break", and not "this is a great idea"; counterpoints are welcome).
I am sympathetic to Jan's issue, though. If git were consistent about
applying attributes only to paths, then the repo owner would have
written "dir/* export-ignore", not "dir". But it is not, and git-archive
does ask for attributes on directories, but without providing a good
mechanism for doing those attribute lookups from external programs.
-Peff
next prev parent reply other threads:[~2013-04-02 16:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-30 9:45 check-attr doesn't respect recursive definitions Jan Larres
2013-04-02 14:31 ` Jeff King
2013-04-02 14:48 ` Jeff King
2013-04-02 16:11 ` Junio C Hamano
2013-04-02 16:30 ` Jeff King [this message]
2013-04-02 16:43 ` Junio C Hamano
2013-04-02 16:51 ` Jeff King
2013-04-02 17:15 ` Jeff King
2013-04-02 17:16 ` Junio C Hamano
2013-04-02 19:16 ` Jeff King
2013-04-03 10:05 ` Jan Larres
2013-04-05 2:09 ` Duy Nguyen
2013-04-05 12:04 ` Jan Larres
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=20130402163034.GA19252@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jan@majutsushi.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.
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 NNTP newsgroup(s).