<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/dir.c, branch v1.6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.4</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-07-10T03:05:19Z</updated>
<entry>
<title>Avoid using 'lstat()' to figure out directories</title>
<updated>2009-07-10T03:05:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-09T20:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=443e061a41bee30de34793648793ed70477ac575'/>
<id>urn:sha1:443e061a41bee30de34793648793ed70477ac575</id>
<content type='text'>
If we have an up-to-date index entry for a file in that directory, we
can know that the directories leading up to that file must be
directories.  No need to do an lstat() on the directory.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Avoid doing extra 'lstat()'s for d_type if we have an up-to-date cache entry</title>
<updated>2009-07-09T08:11:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-09T02:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=caa6b7825aaddb8a97a5b793ca61df0c1ec9b76b'/>
<id>urn:sha1:caa6b7825aaddb8a97a5b793ca61df0c1ec9b76b</id>
<content type='text'>
On filesystems without d_type, we can look at the cache entry first.
Doing an lstat() can be expensive.

Reported by Dmitry Potapov for Cygwin.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Simplify read_directory[_recursive]() arguments</title>
<updated>2009-07-09T08:11:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-07-09T02:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dba2e2037f40685bffc87d3e7114a02c5bda1eff'/>
<id>urn:sha1:dba2e2037f40685bffc87d3e7114a02c5bda1eff</id>
<content type='text'>
Stop the insanity with separate 'path' and 'base' arguments that must
match.  We don't need that crazy interface any more, since we cleaned up
handling of 'path' in commit da4b3e8c28b1dc2b856d2555ac7bb47ab712598c.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add 'fill_directory()' helper function for directory traversal</title>
<updated>2009-07-09T08:11:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-05-14T20:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d8842d921cc2695f155f4a10904eeffad085c77'/>
<id>urn:sha1:1d8842d921cc2695f155f4a10904eeffad085c77</id>
<content type='text'>
Most of the users of "read_directory()" actually want a much simpler
interface than the whole complex (but rather powerful) one.

In fact 'git add' had already largely abstracted out the core interface
issues into a private "fill_directory()" function that was largely
applicable almost as-is to a number of callers.  Yes, 'git add' wants to
do some extra work of its own, specific to the add semantics, but we can
easily split that out, and use the core as a generic function.

This function does exactly that, and now that much simplified
'fill_directory()' function can be shared with a number of callers,
while also ensuring that the rather more complex calling conventions of
read_directory() are used by fewer call-sites.

This also makes the 'common_prefix()' helper function private to dir.c,
since all callers are now in that file.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Convert existing die(..., strerror(errno)) to die_errno()</title>
<updated>2009-06-27T18:14:53Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-06-27T15:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d824cbba02a4061400a0e382f9bd241fbbff34f0'/>
<id>urn:sha1:d824cbba02a4061400a0e382f9bd241fbbff34f0</id>
<content type='text'>
Change calls to die(..., strerror(errno)) to use the new die_errno().

In the process, also make slight style adjustments: at least state
_something_ about the function that failed (instead of just printing
the pathname), and put paths in single quotes.

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>git-add: no need for -f when resolving a conflict in already tracked path</title>
<updated>2009-05-31T22:59:16Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2009-05-30T21:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e4f981ffb88c8a9d3d6128314f4dd4f54ffb8a8'/>
<id>urn:sha1:6e4f981ffb88c8a9d3d6128314f4dd4f54ffb8a8</id>
<content type='text'>
When a path F that matches ignore pattern has a conflict, "git add F"
insisted the -f option be given, which did not make sense.  It would have
required -f when the path was originally added, but when resolving a
conflict, it already is tracked.

So this should work (and does):

  $ echo file &gt;.gitignore
  $ echo content &gt;file
  $ git add -f file ;# need -f because we are adding new path
  $ echo more content &gt;&gt;file
  $ git add file ;# don't need -f; it is not actually an "other" file

This is handled under the hood by the COLLECT_IGNORED option to
read_directory. When that code finds an ignored file, it checks the
index to make sure it is not actually a tracked file. However, the test
it uses does not take into account unmerged entries, and considers them
to still be ignored. "git ls-files" uses a more elaborate test and gets
the right answer and the same test should be used here.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>dir.c: clean up handling of 'path' parameter in read_directory_recursive()</title>
<updated>2009-05-17T05:41:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-05-14T20:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da4b3e8c28b1dc2b856d2555ac7bb47ab712598c'/>
<id>urn:sha1:da4b3e8c28b1dc2b856d2555ac7bb47ab712598c</id>
<content type='text'>
Right now we pass two different pathnames ('path' and 'base') down to
read_directory_recursive(), and the only real reason for that is that we
want to allow an empty 'base' parameter, but when we do so, we need the
pathname to "opendir()" to be "." rather than the empty string.

And rather than handle that confusion in the caller, we can just fix
read_directory_recursive() to handle the case of an empty path itself,
by just passing opendir() a "." ourselves if the path is empty.

This would allow us to then drop one of the pathnames entirely from the
calling convention, but rather than do that, we'll start separating them
out as a "filesystem pathname" (the one we use for filesystem accesses)
and a "git internal base name" (which is the name that we use for git
internally).

That will eventually allow us to do things like handle different
encodings (eg the filesystem pathnames might be Latin1, while git itself
would use UTF-8 for filename information).

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2009-05-06T05:52:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-05-06T05:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8146f19762c8fd67f6df3da4ba87a4e5ea880909'/>
<id>urn:sha1:8146f19762c8fd67f6df3da4ba87a4e5ea880909</id>
<content type='text'>
* maint:
  improve error message in config.c
  t4018-diff-funcname: add cpp xfuncname pattern to syntax test
  Work around BSD whose typeof(tv.tv_sec) != time_t
  git-am.txt: reword extra headers in message body
  git-am.txt: Use date or value instead of time or timestamp
  git-am.txt: add an 'a', say what 'it' is, simplify a sentence
  dir.c: Fix two minor grammatical errors in comments
  git-svn: fix a sloppy Getopt::Long usage
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.6.0' into maint</title>
<updated>2009-05-06T05:51:31Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-05-06T05:51:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41f64ad34b10697ceac68e3a3ad9df3baca9be34'/>
<id>urn:sha1:41f64ad34b10697ceac68e3a3ad9df3baca9be34</id>
<content type='text'>
* maint-1.6.0:
  dir.c: Fix two minor grammatical errors in comments
</content>
</entry>
<entry>
<title>dir.c: Fix two minor grammatical errors in comments</title>
<updated>2009-05-06T05:04:16Z</updated>
<author>
<name>Allan Caffee</name>
<email>allan.caffee@gmail.com</email>
</author>
<published>2009-05-04T17:37:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2c5b0115038ab283b346fbb8059b93973ff4c8f2'/>
<id>urn:sha1:2c5b0115038ab283b346fbb8059b93973ff4c8f2</id>
<content type='text'>
Signed-off-by: Allan Caffee &lt;allan.caffee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
