-static void update_store_new_sha1(const char *command,
- struct ref_update *update,
- const char *newvalue)
-{
- if (*newvalue && get_sha1(newvalue, update->new_sha1))
- die("%s %s: invalid <newvalue>: %s",
- command, update->ref_name, newvalue);
-}
-
-static void update_store_old_sha1(const char *command,
- struct ref_update *update,
- const char *oldvalue)
-{
- if (*oldvalue && get_sha1(oldvalue, update->old_sha1))
- die("%s %s: invalid <oldvalue>: %s",
- command, update->ref_name, oldvalue);
-
- /* We have an old value if non-empty, or if empty without -z */
- update->have_old = *oldvalue || line_termination;
-}
-