summaryrefslogtreecommitdiff
path: root/update-ref.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2006-05-08 21:43:38 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-08 23:25:33 (GMT)
commit31fff305bcc6db3b8082eac7fc9e441b27964fea (patch)
tree1681e28441508afae3f3e1bf602c4b0914d9c820 /update-ref.c
parentafb4ff206967c6b3e481994cc6d0d86139792169 (diff)
downloadgit-31fff305bcc6db3b8082eac7fc9e441b27964fea.zip
git-31fff305bcc6db3b8082eac7fc9e441b27964fea.tar.gz
git-31fff305bcc6db3b8082eac7fc9e441b27964fea.tar.bz2
Separate object name errors from usage errors
Separate object name errors from usage errors. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'update-ref.c')
-rw-r--r--update-ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/update-ref.c b/update-ref.c
index ba4bf51..fd48742 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);