Files
git/builtin
Michael Haggerty 3afcc46374 update-ref.c: extract a new function, parse_next_sha1()
Replace three functions, update_store_new_sha1(),
update_store_old_sha1(), and parse_next_arg(), with a single function,
parse_next_sha1().  The new function takes care of a whole argument,
including checking whether it is there, converting it to an SHA-1, and
emitting errors on EOF or for invalid values.  The return value
indicates whether the argument was present or absent, which requires
a bit of intelligence because absent values are represented
differently depending on whether "-z" was used.

The new interface means that the calling functions, parse_cmd_*(),
don't have to interpret the result differently based on the
line_termination mode that is in effect.  It also means that
parse_cmd_create() can distinguish unambiguously between an empty new
value and a zeros new value, which fixes a failure in t1400.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-07 12:09:13 -07:00
..
2014-03-14 14:25:31 -07:00
2014-02-27 14:01:46 -08:00
2014-03-18 13:47:57 -07:00
2014-03-28 13:51:11 -07:00
2014-03-14 14:25:31 -07:00
2014-01-17 12:21:20 -08:00
2014-02-27 14:01:30 -08:00
2014-03-28 13:51:11 -07:00
2014-03-25 11:02:02 -07:00
2013-12-17 12:02:44 -08:00
2013-07-15 10:56:07 -07:00
2014-02-27 14:01:48 -08:00
2014-01-17 12:21:20 -08:00
2014-03-21 12:47:39 -07:00