branch: elpa/magit
commit bec296e8d7d524beabcb9f56d9befb3f8e4d29fb
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-push: Add --follow-tags and --tags
Previously users were expected to push tags explicitly either
individually (using "T"/`magit-push-tag') or all at once (using
"t"/`magit-push-tags').
The goal of this design was to avoid pushing tags only intended for
local use. The actual result is that many users often forget to push
tags. The fact that the release tags of many Emacs packages lag
behind the Package-Requires headers is a strong indication of that.
Git provides a better mechanism to ensure "public" tags are always
pushed:
--follow-tags
Push all the refs that would be pushed without this option, and
also push annotated tags in refs/tags that are missing from the
remote but are pointing at commit-ish that are reachable from the
refs being pushed. This can also be specified with configuration
variable push.followTags. For more information, see push.followTags
in git-config(1).
To take full advantage of that, one should set `push.followTags' to
true and then *always* annotate "public" tags and *never* annotate
"private" tags.
Of course not everyone knows that, so we stop short of enabling
`--follow-tags' by default (but if you see this, I strongly recommend
that you enable it locally). Instead we make both `--follow-tags' and
`--tags' *available* by default and use verbose descriptions that spell
out the difference between the two.
---
lisp/magit-push.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/magit-push.el b/lisp/magit-push.el
index 51bd4f3b395..ca90b62d4ea 100644
--- a/lisp/magit-push.el
+++ b/lisp/magit-push.el
@@ -39,8 +39,9 @@
("-F" "Force" ("-f" "--force"))
("-h" "Disable hooks" "--no-verify")
("-n" "Dry run" ("-n" "--dry-run"))
- (5 "-u" "Set upstream" "--set-upstream")
- (7 "-t" "Follow tags" "--follow-tags")]
+ ("-u" "Set upstream" "--set-upstream" :level 5)
+ ("-T" "Include all tags" "--tags")
+ ("-t" "Include related annotated tags" "--follow-tags")]
[:if magit-get-current-branch
:description (lambda ()
(format (propertize "Push %s to" 'face 'transient-heading)