summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorChris Rorvick <chris@rorvick.com>2012-11-30 01:41:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-02 09:39:50 (GMT)
commitb24e6047a8da3cddfd686e6a9157ed4bac28ed4f (patch)
tree6cb17f7ea002a44c823a5c034f5cb856249afe81 /transport.c
parent10643d4ec3b9c5898d93d1c20e98b2ff1906bf79 (diff)
downloadgit-b24e6047a8da3cddfd686e6a9157ed4bac28ed4f.zip
git-b24e6047a8da3cddfd686e6a9157ed4bac28ed4f.tar.gz
git-b24e6047a8da3cddfd686e6a9157ed4bac28ed4f.tar.bz2
push: add advice for rejected tag reference
Advising the user to fetch and merge only makes sense if the rejected reference is a branch. If none of the rejections are for branches, just tell the user the reference already exists. Signed-off-by: Chris Rorvick <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/transport.c b/transport.c
index d4568e7..bc31e8e 100644
--- a/transport.c
+++ b/transport.c
@@ -740,6 +740,8 @@ void transport_print_push_status(const char *dest, struct ref *refs,
ref->status != REF_STATUS_OK)
n += print_one_push_status(ref, dest, n, porcelain);
if (ref->status == REF_STATUS_REJECT_NONFASTFORWARD) {
+ if (ref->not_forwardable)
+ *reject_reasons |= REJECT_ALREADY_EXISTS;
if (!strcmp(head, ref->name))
*reject_reasons |= REJECT_NON_FF_HEAD;
else