public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
To: git@vger•kernel.org, "Junio C Hamano" <gitster@pobox•com>,
	"Marcin Wiśnicki" <mwisnicki@gmail•com>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Subject: [PATCH] gitattributes.txt: mention exceptions to gitignore rules
Date: Tue,  4 Jan 2011 20:31:55 +0700	[thread overview]
Message-ID: <1294147915-1475-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <iftvu6@dough.gmane.org>

gitattr and .gitignore are supposed to use the same rules for matching
patterns. Unfortunately it's not exactly the same in reality. Mention
the differences so users won't be surprised, until gitattr gets
updates.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail•com>
---
 2011/1/4 Marcin Wiśnicki <mwisnicki@gmail•com>:
 > I think that for the time being at least the manual page must change to
 > reflect reality.

 Looks like changes will be more than just a few lines because path_matches()
 needs to learn about directories (iow less likely to get fixed right away).
 So, yes, good idea.

 I skimmed through excluded_from_list() (gitignore) and path_matches (gitattr).
 Seems no other differences.

 Documentation/gitattributes.txt |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 5a7f936..cfaf107 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -56,6 +56,7 @@ When more than one pattern matches the path, a later line
 overrides an earlier line.  This overriding is done per
 attribute.  The rules how the pattern matches paths are the
 same as in `.gitignore` files; see linkgit:gitignore[5].
+However patterns that end with a slash is not supported.
 
 When deciding what attributes are assigned to a path, git
 consults `$GIT_DIR/info/attributes` file (which has the highest
-- 
1.7.3.4.878.g439c7

       reply	other threads:[~2011-01-04 13:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <iftvu6@dough.gmane.org>
2011-01-04 13:31 ` Nguyễn Thái Ngọc Duy [this message]
2011-01-04 14:50   ` [PATCH] gitattributes.txt: mention exceptions to gitignore rules Michael J Gruber
2011-01-04 15:40   ` Marcin Wiśnicki
2011-01-04 19:17   ` Junio C Hamano
2011-01-04 21:17     ` Marcin Wiśnicki

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=1294147915-1475-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mwisnicki@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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