Re: [PATCH 3/3] git add --intent-to-add: do not let an empty blob committed by accident
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 1, 2008, 09:24 UTC
- Message-ID
- <7vhc5os0xw.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20081130191444.GC10981@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> On Fri, Nov 28, 2008 at 07:56:34PM -0800, Junio C Hamano wrote:
> ...
>> case WRITE_TREE_UNMERGED_INDEX:
>> - die("%s: error building trees; the index is unmerged?", me);
>> + die("%s: error building trees", me);
>
> This caught me by surprise while reading, but I assume the rationale is
> "now there is a new, different reason not to be able to build the trees,
> so our guess is less likely to be correct". I wonder if we can do better
> by actually passing out a more exact error value (though it looks like
> we will already have said "foo: not added yet" by that point anyway, so
> maybe it is just pointless to say more).The places that detect the "unmerged" (and then newly added "intent-only") entries already have issued error messages in the codepath that leads to this error.
>> diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh > > Why in t3701?
Good question. Brain fart, perhaps.