Re: [PATCH 1/8] merge: remove always-the-same "verbose" arguments
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 29, 2022, 18:12 UTC
- Message-ID
- <Y11s+XokKbbJ1WTL@nand.local>
- In-Reply-To
- <0cae80c0-2576-8be7-48f7-06a0a135961f@web.de>
On Thu, Oct 27, 2022 at 06:35:02PM +0200, René Scharfe wrote:
Show 23 quoted lines
> From: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > > Simplify the code that builds the arguments for the "read-tree" > invocation in reset_hard() and read_empty() to remove the "verbose" > parameter. > > Before 172b6428d06 (do not overwrite untracked during merge from > unborn branch, 2010-11-14) there was a "reset_hard()" function that > would be called in two places, one of those passed a "verbose=1", the > other a "verbose=0". > > After 172b6428d06 when read_empty() was split off from reset_hard() > both of these functions only had one caller. The "verbose" in > read_empty() would always be false, and the one in reset_hard() would > always be true. > > There was never a good reason for the code to act this way, it > happened because the read_empty() function was a copy/pasted and > adjusted version of reset_hard(). > > Since we're no longer conditionally adding the "-v" parameter > here (and we'd only add it for "reset_hard()" we'll be able to move to > a simpler and safer run-command API in the subsequent commit.
All looks reasonable here. Thanks for the detailed explanation of when and why these changed and at which point they became redundant.
Thanks, Taylor