<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/dir.h, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-06-28T22:19:57Z</updated>
<entry>
<title>Merge branch 'nd/exclude-workaround-top-heavy'</title>
<updated>2012-06-28T22:19:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-28T22:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=653111f99c6bfa3bb5effd61c138bf925f19fbdb'/>
<id>urn:sha1:653111f99c6bfa3bb5effd61c138bf925f19fbdb</id>
<content type='text'>
Attempt to optimize matching with an exclude pattern with a deep
directory hierarchy by taking the part that specifies leading path
without wildcard literally.
</content>
</entry>
<entry>
<title>Merge branch 'jc/ls-files-i-dir'</title>
<updated>2012-06-21T21:42:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-21T21:42:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1966babf6e8e5c67e2dec05aa00437246ded0497'/>
<id>urn:sha1:1966babf6e8e5c67e2dec05aa00437246ded0497</id>
<content type='text'>
"git ls-files --exclude=t -i" did not consider anything under t/
as excluded, as it did not pay attention to exclusion of leading
paths while walking the index.  Other two users of excluded() are
also updated.

* jc/ls-files-i-dir:
  dir.c: make excluded() file scope static
  unpack-trees.c: use path_excluded() in check_ok_to_remove()
  builtin/add.c: use path_excluded()
  path_excluded(): update API to less cache-entry centric
  ls-files -i: micro-optimize path_excluded()
  ls-files -i: pay attention to exclusion of leading paths
</content>
</entry>
<entry>
<title>exclude: do strcmp as much as possible before fnmatch</title>
<updated>2012-06-07T18:33:38Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2012-06-07T07:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f9f6e2ce26e25661245a6faaf0b254524c1bfbd4'/>
<id>urn:sha1:f9f6e2ce26e25661245a6faaf0b254524c1bfbd4</id>
<content type='text'>
this also avoids calling fnmatch() if the non-wildcard prefix is
longer than basename

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>dir.c: make excluded() file scope static</title>
<updated>2012-06-06T05:26:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-06T05:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=0d316f0ceff1c416c25327f40bc5fbdded98a01a'/>
<id>urn:sha1:0d316f0ceff1c416c25327f40bc5fbdded98a01a</id>
<content type='text'>
Now there no longer is external callers of this interface, so we can
make it static.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path_excluded(): update API to less cache-entry centric</title>
<updated>2012-06-06T04:22:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-06T04:17:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=782cd4c0f6e0fef5147cb738009dde6e778f4932'/>
<id>urn:sha1:782cd4c0f6e0fef5147cb738009dde6e778f4932</id>
<content type='text'>
It was stupid of me to make the API too much cache-entry specific;
the caller may want to check arbitrary pathname without having a
corresponding cache-entry to see if a path is ignored.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ls-files -i: pay attention to exclusion of leading paths</title>
<updated>2012-06-03T23:05:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-06-01T18:28:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=eb41775ecc031cd8e38aebbd26826d74922a0db9'/>
<id>urn:sha1:eb41775ecc031cd8e38aebbd26826d74922a0db9</id>
<content type='text'>
"git ls-files --exclude=t/ -i" does not show paths in directory t/
that have been added to the index, but it should.

The excluded() API was designed for callers who walk the tree from
the top, checking each level of the directory hierarchy as it
descends if it is excluded, and not even bothering to recurse into
an excluded directory.  This would allow us optimize for a common
case by not having to check if the exclude pattern "foo/" matches
when looking at "foo/bar", because the caller should have noticed
that "foo" is excluded and did not even bother to read "foo/bar"
out of opendir()/readdir() to call it.

The code for "ls-files -i" however walks the index linearly, feeding
paths without checking if the leading directory is already excluded.

Introduce a helper function path_excluded() to let this caller
properly call excluded() check for higher hierarchies as necessary.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remove_dir_recursively(): Add flag for skipping removal of toplevel dir</title>
<updated>2012-03-15T18:12:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-03-15T14:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c844a8035617a602015d74ce329ee88f9b003bf9'/>
<id>urn:sha1:c844a8035617a602015d74ce329ee88f9b003bf9</id>
<content type='text'>
Add the REMOVE_DIR_KEEP_TOPLEVEL flag to remove_dir_recursively() for
deleting everything inside the given directory, but _not_ the given
directory itself.

Note that this does not pass the REMOVE_DIR_KEEP_NESTED_GIT flag, if set,
to the recursive invocations of remove_dir_recursively().  It is likely to
be a a bug that has been present since REMOVE_DIR_KEEP_NESTED_GIT was
introduced (a0f4afb), but this commit keeps the same behaviour for now.

Signed-off-by: Johan Herland &lt;johan@herland.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rename pathspec_prefix() to common_prefix() and move to dir.[ch]</title>
<updated>2011-09-12T21:38:32Z</updated>
<author>
<name>Clemens Buchacher</name>
<email>drizzd@aon.at</email>
</author>
<published>2011-09-04T10:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=f950eb956092831730182daa7160eaa352277fa9'/>
<id>urn:sha1:f950eb956092831730182daa7160eaa352277fa9</id>
<content type='text'>
Also make common_prefix_len() static as this refactoring makes dir.c
itself the only caller of this helper function.

Signed-off-by: Clemens Buchacher &lt;drizzd@aon.at&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>consolidate pathspec_prefix and common_prefix</title>
<updated>2011-09-06T19:54:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-09-06T19:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4a085b16f430bcfe1b6e2e84e7a569f4e191e906'/>
<id>urn:sha1:4a085b16f430bcfe1b6e2e84e7a569f4e191e906</id>
<content type='text'>
The implementation from pathspec_prefix (slightly modified) replaces the
current common_prefix, because it also respects glob characters.

Based on a patch by Clemens Buchacher.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/maint-setup'</title>
<updated>2011-05-02T22:58:30Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-02T22:58:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=c67e367c50304c5a0701ae2bb8ecb7291f481ffd'/>
<id>urn:sha1:c67e367c50304c5a0701ae2bb8ecb7291f481ffd</id>
<content type='text'>
* nd/maint-setup:
  Kill off get_relative_cwd()
  setup: return correct prefix if worktree is '/'

Conflicts:
	dir.c
	setup.c
</content>
</entry>
</feed>
