git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt
Date: Wed, 25 Feb 2009 08:54:42 +0100	[thread overview]
Message-ID: <49A4F942.1090907@viscovery.net> (raw)
In-Reply-To: <7vskm3hh8n.fsf@gitster.siamese.dyndns.org>

From: Johannes Sixt <j6t@kdbg.org>

The rules how the patterns are matched against path names are the same
for .gitattribute and .gitignore files.

This also replace the notion "glob pattern" by "pattern" because
gitignore.txt talks about "glob" only in some contexts where the pattern
is mentioned.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Junio C Hamano schrieb:
 > Actually, while I was responding to your message, I looked at
 > gitattributes documentation and noticed that it does not say anything
 > about how the "glob" is used to match paths.

 Here's a patch.

 -- Hannes

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

diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 227934f..55668e3 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -18,10 +18,10 @@ A `gitattributes` file is a simple text

 Each line in `gitattributes` file is of form:

-	glob	attr1 attr2 ...
+	pattern	attr1 attr2 ...

-That is, a glob pattern followed by an attributes list,
-separated by whitespaces.  When the glob pattern matches the
+That is, a pattern followed by an attributes list,
+separated by whitespaces.  When the pattern matches the
 path in question, the attributes listed on the line are given to
 the path.

@@ -48,13 +48,14 @@ Set to a value::

 Unspecified::

-	No glob pattern matches the path, and nothing says if
+	No pattern matches the path, and nothing says if
 	the path has or does not have the attribute, the
 	attribute for the path is said to be Unspecified.

-When more than one glob pattern matches the path, a later line
+When more than one pattern matches the path, a later line
 overrides an earlier line.  This overriding is done per
-attribute.
+attribute.  The rules how the pattern matches paths are the
+same as in `.gitignore` files; see linkgit:gitignore[5].

 When deciding what attributes are assigned to a path, git
 consults `$GIT_DIR/info/attributes` file (which has the highest
-- 
1.6.2.rc0.81.g1e300

  reply	other threads:[~2009-02-25  7:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  8:01 [PATCH] git-gui: Fix file name pattern in .gitattributes Johannes Sixt
2009-02-24  8:44 ` Junio C Hamano
2009-02-24  9:25   ` Johannes Sixt
2009-02-24 17:33     ` Junio C Hamano
2009-02-25  7:54       ` Johannes Sixt [this message]
2009-02-25  8:00         ` [PATCH 1/2] gitattributes.txt: Path matching rules are explained in gitignore.txt Johannes Sixt

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=49A4F942.1090907@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /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).