Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v2 3/3] clean: improve performance when removing lots of directories

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:28

Jeff King [off-list ref] writes:
quoted
Option 1:
 Plug the hole in my new is_git_repository function. A quick and dirty
 fix that passes the above test would be:
I think that makes sense. It would be nice if you could just call
read_gitfile, but that function is very anxious to die on error. So the
prerequisite step would probably be to refactor that into a
read_gitfile_gently that returns an error code.
I agree.

I was looking at the repository discovery loop to see if it makes
sense to update is-git-directory() to take a gitfile, but I do not
think it is a good idea (typically after is-git-directory() says
"yes", we would append paths e.g. "refs/heads/master" after it to
pass the result to system calls like open()).  I agree that adding
read-gitfile-gently and call it before running is-git-directory
would be a good solution for this change.
PS Thank you for working on this.
That too.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help