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.