Re: git clone -b
- From
Fredrik Gustafsson <iveqy@iveqy.com>
- Date
- Jun 28, 2013, 12:18 UTC
- Message-ID
- <20130628121847.GB1351@paksenarrion.iveqy.com>
- In-Reply-To
- <51CD7AB7.3040409@atlas-elektronik.com>
On Fri, Jun 28, 2013 at 01:59:51PM +0200, Stefan Näwe wrote:
Show 18 quoted lines
> Hi there! > > Is there any reason why 'git clone -b' only takes a branch (from refs/heads/) > or a tag (from refs/tags/) ? > > Background: At $dayjob we're using some kind of 'hidden' refs (in refs/releases/) > to communicate between the 'branch integrator' (who creates the ref in refs/releases/) > and the 'build master' who wants to build that ref. > > It would be a little easier if the build master could simply say > > git clone -b refs/releases/the-release-for-today URL > > instead of: git clone... ; cd ... ; git fetch... ; git checkout.... > > Any answer or even a better idea to solve that is appreciated. > > Stefan
I don't understand what the alternative should be. You can't look in /refs/* because there's a lot of other stuff like bisect/remotes etc. there.
Of course you could add to also look in /refs/releases/ but as I understand you that a special solution for your company. Why should all git users have that addition?
Two questions about your setup:
1. Why do you always clone your repository? To me clone is a one time operation.
2. Why don't you tag your releases with an ordinary tag?
-- Med vänliga hälsningar Fredrik Gustafsson tel: 0733-608274 e-post: iveqy@iveqy.com