On Thu, Oct 27, 2022 at 06:35:02PM +0200, René Scharfe wrote: > From: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> > > 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