Re: How to create tags outside of refs/tags?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Halstrick venit, vidit, dixit 22.02.2011 23:08:
> Hi,
> 
>> How about taking advantage of the fact that you do not have to treat tag
>> namespace as a global thing?  For the "release tool" to "get a commit ID"
>> and do something useful, the "release tool" must be working on a git
>> repository, and hopefully that repository is something other than the ones
>> developers directly play with (by checking out random branches in its
>> working tree and compiling, etc.).
> 
> These assumptions are all correct. The "release tool" works on his clone
> of a central repo. The release tool may even modify the content (e.g. increasing
> release numbers in project metadata files) and create new git commits.
> In the end it wants to create tags/refs locally und push these tags back
> so that in the central repo the commits are not gc'ed.
> 
> Something like:
> 
> cd <releaseRepo>
> git fetch origin
> git checkout <commitIdToRelease>
> edit pom.xml; git add pom.xml
> git commit -m "release ..."
> git tag <releaseName>
> git push origin 'refs/tags/<releaseName>:refs/releases/<releaseName>'
> 
> should do the job, or?

Yep. Also, if you do

git tag release/<releasename>

then a simple push refspec 'refs/tags/release/*:refs/releases/*' in your
config does the job. (Assuming you don't have any other tags in release/.)

Michael
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]