contrib: git-c2t converts tag creating commits to tagsc2t
authorMichael J Gruber <git@drmicha.warpmail.net>
Fri, 27 May 2011 13:40:03 +0000 (15:40 +0200)
committerMichael J Gruber <git@drmicha.warpmail.net>
Fri, 27 May 2011 13:52:31 +0000 (15:52 +0200)
commit59fe17310157f99d5f20173ed65408d9e1f33462
treea8e397b439a0ccc038101d77a7abe6248a0ae052
parentd10669c288bf9206142fa7a4604166d58680388d
contrib: git-c2t converts tag creating commits to tags

Introduce git-c2t <commit> <tag> which converts a commit object <commit>
into a tag object (and tags it with <tagname>), under the provision that
<commit> has exactly one parent and has the same tree. That tag points
at the parent commit.

This is useful for converting "tag creating commits" such as those
produced by git-svn into proper git tags. Tag creating commits typically
create a "1-commit side branch" whereas the tag created by c2t points at
the pseudo fork point (the commit being tagged).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
contrib/git-c2t.sh [new file with mode: 0755]