X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-update-ref.c;h=90a3da53ad003a82781e6d4acfc7815c8f15f24f;hb=a28383770ec44357bfce4af834dc09bf14d9410e;hp=5bd71825fdc48392952faf170efe98c072c7e482;hpb=7061cf0f205e86613c3a3306fdfedf2a5dcc8a65;p=git.git diff --git a/builtin-update-ref.c b/builtin-update-ref.c index 5bd71825f..90a3da53a 100644 --- a/builtin-update-ref.c +++ b/builtin-update-ref.c @@ -44,7 +44,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) if (get_sha1(value, sha1)) die("%s: not a valid SHA1", value); - memset(oldsha1, 0, 20); + hashclr(oldsha1); if (oldval && get_sha1(oldval, oldsha1)) die("%s: not a valid old SHA1", oldval);