<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.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>dir.c::match_pathname(): pay attention to the length of string parameters</title>
<updated>2013-03-29T04:48:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-03-28T21:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab3aebc15c13d083013591777688cecbcb703fb2'/>
<id>urn:sha1:ab3aebc15c13d083013591777688cecbcb703fb2</id>
<content type='text'>
This function takes two counted strings: a &lt;pattern, patternlen&gt; pair
and a &lt;pathname, pathlen&gt; pair. But we end up feeding the result to
fnmatch, which expects NUL-terminated strings.

We can fix this by calling the fnmatch_icase_mem function, which
handles re-allocating into a NUL-terminated string if necessary.

While we're at it, we can avoid even calling fnmatch in some cases. In
addition to patternlen, we get "prefix", the size of the pattern that
contains no wildcard characters. We do a straight match of the prefix
part first, and then use fnmatch to cover the rest. But if there are
no wildcards in the pattern at all, we do not even need to call
fnmatch; we would simply be comparing two empty strings.

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>dir.c::match_pathname(): adjust patternlen when shifting pattern</title>
<updated>2013-03-29T04:48:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-03-28T21:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=982ac87316a1cf5126888157bdcbfa32268ebe47'/>
<id>urn:sha1:982ac87316a1cf5126888157bdcbfa32268ebe47</id>
<content type='text'>
If we receive a pattern that starts with "/", we shift it
forward to avoid looking at the "/" part. Since the prefix
and patternlen parameters are counts of what is in the
pattern, we must decrement them as we increment the pointer.

We remembered to handle prefix, but not patternlen. This
didn't cause any bugs, though, because the patternlen
parameter is not actually used. Since it will be used in
future patches, let's correct this oversight.

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>dir.c::match_basename(): pay attention to the length of string parameters</title>
<updated>2013-03-29T04:48:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-28T21:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b6e56dfe6c7f75c2a02cc0cf8731c9e62b6d3d1'/>
<id>urn:sha1:0b6e56dfe6c7f75c2a02cc0cf8731c9e62b6d3d1</id>
<content type='text'>
The function takes two counted strings (&lt;basename, basenamelen&gt; and
&lt;pattern, patternlen&gt;) as parameters, together with prefix (the
length of the prefix in pattern that is to be matched literally
without globbing against the basename) and EXC_* flags that tells it
how to match the pattern against the basename.

However, it did not pay attention to the length of these counted
strings.  Update them to do the following:

 * When the entire pattern is to be matched literally, the pattern
   matches the basename only when the lengths of them are the same,
   and they match up to that length.

 * When the pattern is "*" followed by a string to be matched
   literally, make sure that the basenamelen is equal or longer than
   the "literal" part of the pattern, and the tail of the basename
   string matches that literal part.

 * Otherwise, use the new fnmatch_icase_mem helper to make
   sure we only lookmake sure we use only look at the
   counted part of the strings.  Because these counted strings are
   full strings most of the time, we check for termination
   to avoid unnecessary allocation.

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>Merge branch 'ap/status-ignored-in-ignored-directory' into maint</title>
<updated>2013-01-28T19:10:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-28T19:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=85fd059a89c7328ca37edd31f2d8daa4d0d61de5'/>
<id>urn:sha1:85fd059a89c7328ca37edd31f2d8daa4d0d61de5</id>
<content type='text'>
Output from "git status --ignored" did not work well when used with
"--untracked".

* ap/status-ignored-in-ignored-directory:
  status: always report ignored tracked directories
  git-status: Test --ignored behavior
  dir.c: Make git-status --ignored more consistent
</content>
</entry>
<entry>
<title>Merge branch 'nd/retire-fnmatch'</title>
<updated>2013-01-25T20:34:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-25T20:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ecd9f5dc300235593e4d3e4ecff4448f2500bad'/>
<id>urn:sha1:9ecd9f5dc300235593e4d3e4ecff4448f2500bad</id>
<content type='text'>
Replace our use of fnmatch(3) with a more feature-rich wildmatch.
A handful patches at the bottom have been moved to nd/wildmatch to
graduate as part of that branch, before this series solidifies.

We may want to mark USE_WILDMATCH as an experimental curiosity a
bit more clearly (i.e. should not be enabled in production
environment, because it will make the behaviour between builds
unpredictable).

* nd/retire-fnmatch:
  Makefile: add USE_WILDMATCH to use wildmatch as fnmatch
  wildmatch: advance faster in &lt;asterisk&gt; + &lt;literal&gt; patterns
  wildmatch: make a special case for "*/" with FNM_PATHNAME
  test-wildmatch: add "perf" command to compare wildmatch and fnmatch
  wildmatch: support "no FNM_PATHNAME" mode
  wildmatch: make dowild() take arbitrary flags
  wildmatch: rename constants and update prototype
</content>
</entry>
<entry>
<title>Merge branch 'as/check-ignore'</title>
<updated>2013-01-24T05:19:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-24T05:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a39b15b4f6a3f08b67b17d968935d177821e680f'/>
<id>urn:sha1:a39b15b4f6a3f08b67b17d968935d177821e680f</id>
<content type='text'>
Add a new command "git check-ignore" for debugging .gitignore
files.

The variable names may want to get cleaned up but that can be done
in-tree.

* as/check-ignore:
  clean.c, ls-files.c: respect encapsulation of exclude_list_groups
  t0008: avoid brace expansion
  add git-check-ignore sub-command
  setup.c: document get_pathspec()
  add.c: extract new die_if_path_beyond_symlink() for reuse
  add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse
  pathspec.c: rename newly public functions for clarity
  add.c: move pathspec matchers into new pathspec.c for reuse
  add.c: remove unused argument from validate_pathspec()
  dir.c: improve docs for match_pathspec() and match_pathspec_depth()
  dir.c: provide clear_directory() for reclaiming dir_struct memory
  dir.c: keep track of where patterns came from
  dir.c: use a single struct exclude_list per source of excludes

Conflicts:
	builtin/ls-files.c
	dir.c
</content>
</entry>
<entry>
<title>Merge branch 'ap/status-ignored-in-ignored-directory'</title>
<updated>2013-01-14T16:15:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-14T16:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a9a787fca09878f993ad37c71a9646277222a6b'/>
<id>urn:sha1:0a9a787fca09878f993ad37c71a9646277222a6b</id>
<content type='text'>
Output from "git status --ignored" showed an unexpected interaction
with "--untracked".

* ap/status-ignored-in-ignored-directory:
  status: always report ignored tracked directories
  git-status: Test --ignored behavior
  dir.c: Make git-status --ignored more consistent
</content>
</entry>
<entry>
<title>Merge branch 'as/dir-c-cleanup'</title>
<updated>2013-01-10T21:47:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-10T21:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d912b0e44f82dc430a4aac8566a8217b60629638'/>
<id>urn:sha1:d912b0e44f82dc430a4aac8566a8217b60629638</id>
<content type='text'>
Refactor and generally clean up the directory traversal API
implementation.

* as/dir-c-cleanup:
  dir.c: rename free_excludes() to clear_exclude_list()
  dir.c: refactor is_path_excluded()
  dir.c: refactor is_excluded()
  dir.c: refactor is_excluded_from_list()
  dir.c: rename excluded() to is_excluded()
  dir.c: rename excluded_from_list() to is_excluded_from_list()
  dir.c: rename path_excluded() to is_path_excluded()
  dir.c: rename cryptic 'which' variable to more consistent name
  Improve documentation and comments regarding directory traversal API
  api-directory-listing.txt: update to match code
</content>
</entry>
</feed>
