From 31fff305bcc6db3b8082eac7fc9e441b27964fea Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 9 May 2006 01:43:38 +0400 Subject: Separate object name errors from usage errors Separate object name errors from usage errors. Signed-off-by: Dmitry V. Levin Signed-off-by: Junio C Hamano --- update-ref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'update-ref.c') diff --git a/update-ref.c b/update-ref.c index ba4bf5153e..fd487421cd 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); -- cgit v1.2.3