X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=update-ref.c;h=fd487421cd36763dd94f5439b3c40d0ed97c2c96;hb=refs%2Fheads%2Fmaint;hp=ba4bf5153efb38914f66658c59784b58d8b69a0a;hpb=be1295d16a2593dcf468fef7d9e811d057d9039f;p=git.git diff --git a/update-ref.c b/update-ref.c index ba4bf515..fd487421 100644 --- a/update-ref.c +++ b/update-ref.c @@ -32,10 +32,10 @@ int main(int argc, char **argv) refname = argv[1]; value = argv[2]; oldval = argv[3]; - if (get_sha1(value, sha1) < 0) + if (get_sha1(value, sha1)) die("%s: not a valid SHA1", value); memset(oldsha1, 0, 20); - if (oldval && get_sha1(oldval, oldsha1) < 0) + if (oldval && get_sha1(oldval, oldsha1)) die("%s: not a valid old SHA1", oldval); path = resolve_ref(git_path("%s", refname), currsha1, !!oldval);