From 1bb3471bcbaf108667a6d9b64b049227e9a6befa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miros=C5=82aw=20Zalewski?= Date: Wed, 1 Nov 2017 11:53:30 +0100 Subject: [PATCH] Encourage usage of git push --follow-tags --follow-tags pushes both new commits and their tags in one transaction. It is functional equivalent of git push && git push --tags, but with less typing. It is available since git 1.8.3 released in April 2013. --- src/tito/common.py | 2 +- src/tito/tagger/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tito/common.py b/src/tito/common.py index cc189dd..38a4a2c 100644 --- a/src/tito/common.py +++ b/src/tito/common.py @@ -604,7 +604,7 @@ def check_tag_exists(tag, offline=False): upstream_tag_sha1 = get_remote_tag_sha1(tag) if upstream_tag_sha1 == "": error_out(["Tag does not exist in remote git repo: %s" % tag, - "You must tag, then git push and git push --tags"]) + "You must tag, then git push --follow-tags"]) debug("Remote tag SHA1: %s" % upstream_tag_sha1) diff --git a/src/tito/tagger/main.py b/src/tito/tagger/main.py index a20fdab..52d46c6 100644 --- a/src/tito/tagger/main.py +++ b/src/tito/tagger/main.py @@ -493,7 +493,7 @@ class VersionTagger(ConfigObject): info_out("Created tag: %s" % new_tag) print(" View: git show HEAD") print(" Undo: tito tag -u") - print(" Push: git push origin && git push origin %s" % new_tag) + print(" Push: git push --follow-tags origin") def _check_tag_does_not_exist(self, new_tag): status, output = getstatusoutput(