Jeff King <peff@xxxxxxxx> writes: > If removing either of the directories fails, we set ret to "-1". Make > sense. But... > >> + ret = for_each_root_ref(refs, remove_one_root_ref, &data); >> + if (ret < 0) >> + ret = -1; > > ...then we unconditionally overwrite it, forgetting the earlier error. Ouch. > Is that a mistake, or are we normalizing other negative values? Maybe > just: > > if (for_each_root_ref(refs, remove_one_root_ref, &data) < 0) > ret = -1; > > would work? Sounds sensible. Thanks for carefully reading.