From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH nd/attr-match-optim-more 2/2] attr: more matching optimizations from .gitignore
Date: Tue, 09 Oct 2012 08:10:38 +0200 [thread overview]
Message-ID: <5073BFDE.60707@viscovery.net> (raw)
In-Reply-To: <7vd30si665.fsf@alter.siamese.dyndns.org>
Am 10/9/2012 7:08, schrieb Junio C Hamano:
> Imagine if we allowed only one attribute per line, instead of
> multiple attributes on one line.
>
> - If you want to unset the attribute, you would write "path -attr".
>
> - If you want to reset the attribute to unspecified, you would
> write "path !attr".
>
> Both are used in conjunction with some other (typically more
> generic) pattern that sets, sets to a value, and/or unsets the
> attribute, to countermand its effect.
>
> If you were to allow "!path attr", what does it mean? It obviously
> is not about setting the attr to true or to a string value, but is
> it countermanding an earlier set and telling us to unset the attr,
> or make the attr unspecified?
If I have at the toplevel:
*.txt whitespace=tabwidth=4
and in a subdirectory
*.txt whitespace=tabwidth=8
!README.txt
it could be interpreted as "do not apply *.txt to REAME.txt in this
subdirectory". That is, it does not countermand some _particular_
attribute setting, but says "use the attributes collected elsewhere".
-- Hannes
next prev parent reply other threads:[~2012-10-09 6:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 2:24 [PATCH nd/attr-match-optim-more 1/2] gitignore: make pattern parsing code a separate function Nguyễn Thái Ngọc Duy
2012-10-09 2:24 ` [PATCH nd/attr-match-optim-more 2/2] attr: more matching optimizations from .gitignore Nguyễn Thái Ngọc Duy
2012-10-09 5:08 ` Junio C Hamano
2012-10-09 6:10 ` Johannes Sixt [this message]
2012-10-09 6:47 ` Junio C Hamano
2012-10-09 16:40 ` Junio C Hamano
2012-10-10 10:21 ` [PATCH v2 " Nguyễn Thái Ngọc Duy
2012-10-10 20:03 ` Junio C Hamano
2012-10-12 10:13 ` Nguyen Thai Ngoc Duy
2012-10-10 21:41 ` Junio C Hamano
2012-10-10 21:50 ` Junio C Hamano
2012-10-11 1:36 ` Nguyen Thai Ngoc Duy
2012-10-12 19:09 ` Junio C Hamano
2012-10-13 4:32 ` Nguyen Thai Ngoc Duy
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=5073BFDE.60707@viscovery.net \
--to=j.sixt@viscovery.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.