From b9d56b5dd9a8819c900725b8618f8bd994a5054f Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Wed, 2 Apr 2014 10:09:54 +0200 Subject: update-ref: fail create operation over stdin if ref already exists Signed-off-by: Aman Gupta Signed-off-by: Michael Haggerty Acked-by: Brad King Signed-off-by: Junio C Hamano --- builtin/update-ref.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin') diff --git a/builtin/update-ref.c b/builtin/update-ref.c index 1292cfea11..5c208bb1fc 100644 --- a/builtin/update-ref.c +++ b/builtin/update-ref.c @@ -147,6 +147,7 @@ static void parse_cmd_create(const char *next) struct ref_update *update; update = update_alloc(); + update->have_old = 1; if ((next = parse_first_arg(next, &ref)) != NULL && ref.buf[0]) update_store_ref_name(update, ref.buf); -- cgit v1.2.3