X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-update-ref.c;h=5ee960bf41c4518b6c5530acb123a7ed668538fc;hb=331b51d24050c221221049421a924c1a150887db;hp=b34e5987dd256e0b7d9fae46fe89f66dd18ad91f;hpb=2a54323ce5241992c272c90ebf2be14eaac873eb;p=git.git diff --git a/builtin-update-ref.c b/builtin-update-ref.c index b34e5987d..5ee960bf4 100644 --- a/builtin-update-ref.c +++ b/builtin-update-ref.c @@ -13,7 +13,6 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) int i, delete; delete = 0; - setup_ident(); git_config(git_default_config); for (i = 1; i < argc; i++) { @@ -62,10 +61,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) lock = lock_any_ref_for_update(refname, oldval ? oldsha1 : NULL); if (!lock) - return 1; + die("%s: cannot lock the ref", refname); if (write_ref_sha1(lock, sha1, msg) < 0) - return 1; - - /* write_ref_sha1 always unlocks the ref, no need to do it explicitly */ + die("%s: cannot update the ref", refname); return 0; }