From: Junio C Hamano Date: Thu, 02 Apr 2026 19:56:08 GMT Subject: Re: [GSoC PATCH v2] backfill: error out when HEAD cannot be parsed Message-ID: In-Reply-To: <20260402191359.11304-1-viking4@gmail.com> Trieu Huynh writes: > From: Trieu Huynh > > handle_revision_arg() returns non-zero on failure, but do_backfill() > ignores the return value. On an empty repo with no commits, HEAD is > unborn and handle_revision_arg() fails, but backfill silently > continues with an empty revision walk and exists with a zero return > code. "exists" -> "exits", I think. But more importantly (with Devil's advocate hat on), what's the downside of the current behaviour? You tell the command to backfill, the machinery does not find anything necessary to fetch to backfill, and successfully, quickly, and quietly exits. That sounds like a graceful exit to me. Is there anything wrong with that? > +test_expect_success 'backfill on empty repo fails gracefully' ' > + git init empty-repo && > + test_must_fail git -C empty-repo backfill 2>err && > + test_grep "unable to parse HEAD" err > +'