Re: [PATCH 13/26] update-ref --stdin: Simplify error messages for missing oldvalues
- From
Brad King <brad.king@kitware.com>
- Date
- Mar 10, 2014, 17:08 UTC
- Message-ID
- <531DF195.7020304@kitware.com>
- In-Reply-To
- <1394455603-2968-14-git-send-email-mhagger@alum.mit.edu>
On 03/10/2014 08:46 AM, Michael Haggerty wrote:
Show 7 quoted lines
> Instead of, for example, > > fatal: update refs/heads/master missing [<oldvalue>] NUL > > emit > > fatal: update refs/heads/master missing <oldvalue>
[snip]
> - die("update %s missing [<oldvalue>] NUL", update->ref_name);
> + die("update %s missing <oldvalue>", update->ref_name);The reason for the original wording is that the <oldvalue> is indeed optional. This can only occur at end-of-input, and it is actually the *NUL* that is missing because an empty old value can be specified to mean that it it intentionally missing.
-Brad