<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/attr.c, branch v1.8.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.8.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.8.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2013-04-07T20:17:50Z</updated>
<entry>
<title>Sync with 1.8.1.6</title>
<updated>2013-04-07T20:17:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-07T16:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6466fbbeef67ec398f6f5d5b5da5d6f107a647b2'/>
<id>urn:sha1:6466fbbeef67ec398f6f5d5b5da5d6f107a647b2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1</title>
<updated>2013-04-07T15:45:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-07T15:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4bbb830a35c5134b612a990f04ee16678ec0c674'/>
<id>urn:sha1:4bbb830a35c5134b612a990f04ee16678ec0c674</id>
<content type='text'>
A pattern "dir" (without trailing slash) in the attributes file
stopped matching a directory "dir" by mistake with an earlier change
that wanted to allow pattern "dir/" to also match.

* jc/directory-attrs-regression-fix:
  t: check that a pattern without trailing slash matches a directory
  dir.c::match_pathname(): pay attention to the length of string parameters
  dir.c::match_pathname(): adjust patternlen when shifting pattern
  dir.c::match_basename(): pay attention to the length of string parameters
  attr.c::path_matches(): special case paths that end with a slash
  attr.c::path_matches(): the basename is part of the pathname
</content>
</entry>
<entry>
<title>attr.c::path_matches(): special case paths that end with a slash</title>
<updated>2013-03-29T04:47:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-28T21:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc09e9ec43c09cdf803cc4f39f1fcb8ebcf80eb1'/>
<id>urn:sha1:dc09e9ec43c09cdf803cc4f39f1fcb8ebcf80eb1</id>
<content type='text'>
The function is given a string that ends with a slash to signal that
the path is a directory to make sure that a pattern that ends with a
slash (i.e. MUSTBEDIR) can tell directories and non-directories
apart.  However, the pattern itself (pat-&gt;pattern and
pat-&gt;patternlen) that came from such a MUSTBEDIR pattern is
represented as a string that ends with a slash, but patternlen does
not count that trailing slash. A MUSTBEDIR pattern "element/" is
represented as a counted string &lt;"element/", 7&gt; and this must match
match pathname "element/".

Because match_basename() and match_pathname() want to see pathname
"element" to match against the pattern &lt;"element/", 7&gt;, reduce the
length of the path to exclude the trailing slash when calling
these functions.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>attr.c::path_matches(): the basename is part of the pathname</title>
<updated>2013-03-26T18:09:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-26T17:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bd2f371d34b495ebbc4689604cfc34a825c47d2b'/>
<id>urn:sha1:bd2f371d34b495ebbc4689604cfc34a825c47d2b</id>
<content type='text'>
The function takes two strings (pathname and basename) as if they
are independent strings, but in reality, the latter is always
pointing into a substring in the former.

Clarify this relationship by expressing the latter as an offset into
the former.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Sync with 1.8.1.5</title>
<updated>2013-03-01T21:17:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-01T21:17:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=06d67b876642822828596b0b38cda2f61d438335'/>
<id>urn:sha1:06d67b876642822828596b0b38cda2f61d438335</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make !pattern in .gitattributes non-fatal</title>
<updated>2013-03-01T20:24:45Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2013-03-01T20:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b1bd024154f0ee0d71a6befe9bbd96462e76abc'/>
<id>urn:sha1:8b1bd024154f0ee0d71a6befe9bbd96462e76abc</id>
<content type='text'>
Before 82dce99 (attr: more matching optimizations from .gitignore,
2012-10-15), .gitattributes did not have any special treatment of a
leading '!'.  The docs, however, always said

  The rules how the pattern matches paths are the same as in
  `.gitignore` files; see linkgit:gitignore[5].

By those rules, leading '!' means pattern negation.  So 82dce99
correctly determined that this kind of line makes no sense and should
be disallowed.

However, users who actually had a rule for files starting with a '!'
are in a bad position: before 82dce99 '!' matched that literal
character, so it is conceivable that users have .gitattributes with
such lines in them.  After 82dce99 the unescaped version was
disallowed in such a way that git outright refuses to run(!) most
commands in the presence of such a .gitattributes.  It therefore
becomes very hard to fix, let alone work with, such repositories.

Let's at least allow the users to fix their repos: change the fatal
error into a warning.

Reported-by: mathstuf@gmail.com
Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/fix-directory-attrs-off-by-one' into maint</title>
<updated>2013-01-29T19:20:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-29T19:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=025ea586e65bac27f7b15c4da8f1d3bd381c3a14'/>
<id>urn:sha1:025ea586e65bac27f7b15c4da8f1d3bd381c3a14</id>
<content type='text'>
The attribute mechanism didn't allow limiting attributes to be
applied to only a single directory itself with "path/" like the
exclude mechanism does.  The initial implementation of this that was
merged to 'maint' and 1.8.1.1 had severe performance degradations.

* nd/fix-directory-attrs-off-by-one:
  attr: avoid calling find_basename() twice per path
  attr: fix off-by-one directory component length calculation
</content>
</entry>
<entry>
<title>Merge branch 'nd/attr-debug-fix' into maint</title>
<updated>2013-01-28T19:13:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-28T19:13:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d7c1c88940320c2ccde9d996181826a38ff7a81'/>
<id>urn:sha1:6d7c1c88940320c2ccde9d996181826a38ff7a81</id>
<content type='text'>
* nd/attr-debug-fix:
  attr: make it build with DEBUG_ATTR again
</content>
</entry>
<entry>
<title>Merge branch 'nd/fix-directory-attrs-off-by-one'</title>
<updated>2013-01-22T17:34:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-22T17:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9a9f243f6426056058c7c29999c27a086f94e035'/>
<id>urn:sha1:9a9f243f6426056058c7c29999c27a086f94e035</id>
<content type='text'>
Fix performance regression introduced by an earlier change to let
attributes apply to directories.

Needs to be merged to maint, as 94bc671a was merged there already.

* nd/fix-directory-attrs-off-by-one:
  attr: avoid calling find_basename() twice per path
  attr: fix off-by-one directory component length calculation
</content>
</entry>
<entry>
<title>Merge branch 'nd/attr-debug-fix'</title>
<updated>2013-01-18T19:20:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-18T19:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a39fa750d891c72c96f4652fc6a85e2e1f17da7'/>
<id>urn:sha1:3a39fa750d891c72c96f4652fc6a85e2e1f17da7</id>
<content type='text'>
Fix debugging support that was broken in earlier change.

* nd/attr-debug-fix:
  attr: make it build with DEBUG_ATTR again
</content>
</entry>
</feed>
