From 631b5ef219c41027c144218e25075062b91f9471 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 8 Jul 2013 14:42:40 -0700 Subject: push --force-with-lease: tie it all together This teaches the deepest part of the callchain for "git push" (and "git send-pack") to enforce "the old value of the ref must be this, otherwise fail this push" (aka "compare-and-swap" / "--lockref"). Signed-off-by: Junio C Hamano --- builtin/send-pack.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'builtin/send-pack.c') diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 6027ead5a9..41dc51221c 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -55,6 +55,11 @@ static void print_helper_status(struct ref *ref) msg = "needs force"; break; + case REF_STATUS_REJECT_STALE: + res = "error"; + msg = "stale info"; + break; + case REF_STATUS_REJECT_ALREADY_EXISTS: res = "error"; msg = "already exists"; -- cgit v1.2.3