summaryrefslogtreecommitdiff
path: root/builtin/update-ref.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-08 19:00:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-04-08 19:00:22 (GMT)
commit9b30a0339db28e6de9653b5631247d398cce626c (patch)
treee7710fd76ce6c4749e0935a98b8ac145c176d802 /builtin/update-ref.c
parentb389e04031ffe4c725161a082ff748bd33688641 (diff)
parentb9d56b5dd9a8819c900725b8618f8bd994a5054f (diff)
downloadgit-9b30a0339db28e6de9653b5631247d398cce626c.zip
git-9b30a0339db28e6de9653b5631247d398cce626c.tar.gz
git-9b30a0339db28e6de9653b5631247d398cce626c.tar.bz2
Merge branch 'mh/update-ref-batch-create-fix'
* mh/update-ref-batch-create-fix: update-ref: fail create operation over stdin if ref already exists
Diffstat (limited to 'builtin/update-ref.c')
-rw-r--r--builtin/update-ref.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 1292cfe..5c208bb 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);