Re: [PATCH] sha1_file.c: make sure open_sha1_file does not open a directory
- From
Jeff King <peff@peff.net>
- Date
- Feb 9, 2015, 01:12 UTC
- Message-ID
- <20150209011159.GA21072@peff.net>
- In-Reply-To
- <20150209005444.GA16827@peff.net>
On Sun, Feb 08, 2015 at 07:54:44PM -0500, Jeff King wrote:
Show 6 quoted lines
> However, the first thing for_each_loose_file_in_objdir is going to do is > stick the path into a strbuf. So perhaps the most sensible thing is to > just teach it to take a strbuf from the caller. I'll work up a patch. > > It looks like a1b47246 isn't even in "next" yet, so I'll build it > directly on what is already in master, dropping Jonathan's patch.
Here it is. The first patch is a refactoring to allow this, and the second is the moral equivalent of Jonathon's patch. These replace a1b47246 on the tip of jk/prune-mtime.
[1/2]: for_each_loose_file_in_objdir: take an optional strbuf path [2/2]: sha1_file: fix iterating loose alternate objects
-Peff