Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be able to use an actual annotated tag for splitted repositories #2

Open
simensen opened this issue Jul 16, 2012 · 1 comment

Comments

@simensen
Copy link
Member

Currently we simply push the most recent hash to refs/tags/${originalTag} but this may look weird and may be unexpected. We should be able to optionally create an annotated tag that can be pushed up instead. This would probably entail being able to specify a message template ( "Version %tag%", "Tagging %tag%" ) that can result in replacing %tag% with the tag in question.

--tag-message-template="Version %tag%"

... would result in something similar to the following for the tag "v1.0.0":

git tag -a -m "Version v1.0.0" 
@simensen
Copy link
Member Author

Could also take the message from the original annotated tag. Unclear how to safely push the new tag up to the remote one at a time. Possibly git push [remote] [local-mangled-tag-name]:[actual-tag-name]?

if [ "tag" = "$(git cat-file -t ${TAG})" ]
then
    LOCAL_TAG=SOMETHING_NEW-annotated-tag-$TAG
    git cat-file $TAG | git tag -a -F - "$LOCAL_TAG" "$LOCAL_BRANCH"
else
    LOCAL_TAG="$LOCAL_BRANCH"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant