summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9116de5)
raw | patch | inline | side by side (parent: 9116de5)
author | Grégoire Barbier <gb@gbarbier.org> | |
Sat, 19 Jan 2008 15:22:48 +0000 (16:22 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 20 Jan 2008 23:17:58 +0000 (15:17 -0800) |
Failing instead of silently not updating remote refs makes the things
clearer for the user when trying to push on a repository while another
person do (or while a dandling locks are waiting for a 10 minutes
timeout).
When silently not updating remote refs, the user does not even know
that git has pushed the objects but leaved the refs as they were
before (e.g. a new bunch of commits on branch "master" is uploaded,
however the branch by itsel still points on the previous head commit).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
clearer for the user when trying to push on a repository while another
person do (or while a dandling locks are waiting for a 10 minutes
timeout).
When silently not updating remote refs, the user does not even know
that git has pushed the objects but leaved the refs as they were
before (e.g. a new bunch of commits on branch "master" is uploaded,
however the branch by itsel still points on the previous head commit).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 2c4e91d8749ba255d17713df5129487c330bbb93..e1984d3a0036d2852d13f2a4e0cfd0c61ea66c07 100644 (file)
--- a/http-push.c
+++ b/http-push.c
info_ref_lock = lock_remote("info/refs", LOCK_TIME);
if (info_ref_lock)
remote->can_update_info_refs = 1;
+ else {
+ fprintf(stderr, "Error: cannot lock existing info/refs\n");
+ rc = 1;
+ goto cleanup;
+ }
}
if (remote->has_info_packs)
fetch_indices();