git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitattributes.txt: mention exceptions to gitignore rules

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 4, 2011, 14:50 UTC
Message-ID
<4D2333C0.702@drmicha.warpmail.net>
In-Reply-To
<1294147915-1475-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy venit, vidit, dixit 04.01.2011 14:31:
Show 30 quoted lines
> 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.
+However, patterns terminated by a slash are not supported.
>  
>  When deciding what attributes are assigned to a path, git
>  consults `$GIT_DIR/info/attributes` file (which has the highest

Cheers, Michael

Previous: Nguyễn Thái Ngọc DuyNext: Marcin Wiśnicki
Message 2 of 5 in “gitattributes.txt: mention exceptions to gitignore rules”
  1. gitattributes.txt: mention exceptions to gitignore rulesNguyễn Thái Ngọc Duy, Jan 4, 2011
  2. Michael J GruberJan 4, 2011
  3. Marcin WiśnickiJan 4, 2011
  4. Junio C HamanoJan 4, 2011
  5. Marcin WiśnickiJan 4, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.