Merge branch 'rs/sha1-name-readdir-optim'

Optimize "what are the object names already taken in an alternate
object database?" query that is used to derive the length of prefix
an object name is uniquely abbreviated to.

* rs/sha1-name-readdir-optim:
  sha1_file: guard against invalid loose subdirectory numbers
  sha1_file: let for_each_file_in_obj_subdir() handle subdir names
  p4205: add perf test script for pretty log formats
  sha1_name: cache readdir(3) results in find_short_object_filename()
This commit is contained in:
Junio C Hamano
2017-07-05 13:32:56 -07:00
7 changed files with 90 additions and 39 deletions

View File

@ -68,7 +68,7 @@ static int prune_cruft(const char *basename, const char *path, void *data)
return 0;
}
static int prune_subdir(int nr, const char *path, void *data)
static int prune_subdir(unsigned int nr, const char *path, void *data)
{
if (!show_only)
rmdir(path);