Re: [PATCH 2/6] object.c: remove "gently" argument to type_from_string_gently()
- From
Jeff King <peff@peff.net>
- Date
- Apr 9, 2021, 18:10 UTC
- Message-ID
- <YHCYqpYi6TxWh/KC@coredump.intra.peff.net>
- In-Reply-To
- <patch-2.6-daed40c479-20210409T082935Z-avarab@gmail.com>
On Fri, Apr 09, 2021 at 10:32:50AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 16 quoted lines
> Get rid of the "gently" argument to type_from_string_gently() to make > it consistent with most other *_gently() functions. It's already a > "gentle" function, it shouldn't need a boolean argument telling it to > be gentle. > > The reason it had a "gentle" parameter was because until the preceding > commit "type_from_string()" was a macro resolving to > "type_from_string_gently()", it's now a function. > > This refactoring of adding a third parameter was done in > fe8e3b71805 (Refactor type_from_string() to allow continuing after > detecting an error, 2014-09-10) in preparation for its use in > fsck.c. > > Simplifying this means we can move the die() into the simpler > type_from_string() function.
Yeah, this makes sense (and the change of signature will catch any callers in topics-in-flight).
-Peff