diff options
author | Aman Gupta <aman@tmm1.net> | 2014-04-02 10:09:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-02 10:40:43 -0700 |
commit | b9d56b5dd9a8819c900725b8618f8bd994a5054f (patch) | |
tree | a0193e8f5125fc9177711e01f324771b9b924516 /builtin | |
parent | Git 1.9.0 (diff) | |
download | tgif-b9d56b5dd9a8819c900725b8618f8bd994a5054f.tar.xz |
update-ref: fail create operation over stdin if ref already exists
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/update-ref.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |