summaryrefslogtreecommitdiff
path: root/gettext.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2014-04-07 15:48:05 +0200
committerJunio C Hamano <gitster@pobox.com>2014-04-07 12:09:13 -0700
commit3afcc4637452100c68b469de7757dd2b45b4d29c (patch)
treea807097b5fffd560f9dd598745e7264d29a60fd1 /gettext.h
parent191f241b528c10e242d045bde2cef70fb013a6e5 (diff)
downloadgit-3afcc4637452100c68b469de7757dd2b45b4d29c.tar.gz
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>
Diffstat (limited to 'gettext.h')
0 files changed, 0 insertions, 0 deletions