Re: [PATCH 1/8] write_ref_sha1(): remove check for lock == NULL
- From
Jeff King <peff@peff.net>
- Date
- Feb 11, 2015, 00:06 UTC
- Message-ID
- <20150211000600.GB30561@peff.net>
- In-Reply-To
- <CAGZ79kbCHAS3kbF_rwiGFxNCG1movygkcyOddELM7ikOM+wKBQ@mail.gmail.com>
On Tue, Feb 10, 2015 at 02:52:23PM -0800, Stefan Beller wrote:
Show 10 quoted lines
> On Mon, Feb 9, 2015 at 1:12 AM, Michael Haggerty <mhagger@alum.mit.edu> wrote: > > None of the callers pass NULL to this function, and there doesn't seem > > to be any usefulness to allowing them to do so. > > Usually I'd oppose this change, as it seems to be a good defensive > measure. (I cannot assume future me or anybody knows what they're > doing), but as this function (write_ref_sha1) is not widely exposed > any more since aae383db8 (Apr 28, refs.c: make write_ref_sha1 static), > I think it's safe to assume changes affecting this call are well > understood in the future.
Thanks, I was iffy on this change for the same reason, but after your explanation, I too think it is reasonable.
-Peff