Re: [PATCH] libify git-ls-files directory traversal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 16 May 2006, Linus Torvalds wrote:
> 
> NOTE! Not all of git-ls-files is libified by this.  The index matching
> and pathspec prefix calculation is still in ls-files.c, but this is a
> big part of it.

Side note: the reason I held off on the index matching is that 
git-ls-files currently uses a pretty disgusting trick to make the index 
accesses faster for the common subdirectory case, namely it basically 
rewrites the index so that it only contains the entries defined by a 
common prefix.

Now, that's fine for git-ls-files, but it's not fine for a library 
function where the caller may well want to actually use the index that it 
has read in (eg "git add" and "git commit" both want to work with the 
full index).

So libification of that part will require more than splitting things into 
a new file and passing in a structure pointer that contains the data for 
the function.

That said, a lot of the current shell scripts seem to use mainly 
"git-ls-files" with the "--others" flag, and in that case the current 
libification should be already sufficient.

		Linus
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]