| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> | 
|---|---|
| To: | Bruce Momjian <bruce(at)momjian(dot)us> | 
| Cc: | Robert Treat <rob(at)xzilla(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Working with git repo tagged versions | 
| Date: | 2011-11-11 21:35:50 | 
| Message-ID: | 4EBD9536.70406@dunslane.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 11/11/2011 03:53 PM, Bruce Momjian wrote:
> Robert Treat wrote:
>> Howdy folks,
>>
>> Occasionally I need to grab an older release from git based on a tag
>> rather than a branch, eg the REL8_3_10 tag vs the REL8_3_STABLE
>> branch. I used to know how to do this in CVS, but I find I tend to
>> revert to grabbing tarballs now that we're on git. So, I'm wondering
>> if anyone knows a way to do this directly from git clone (or similar),
>> and ideally as a shallow clone (ie. I just need a copy of the code at
>> that tag, rather than needing the repo for development purposes). If
>> anyone knew a way to do this down to a specific commit, that would
>> also be interesting to know. Thanks in advance.
> I just did this:
>
> 	$ git-new-workdir postgresql/.git/ tmp
> 	Checking out files: 100% (3903/3903), done.
> 	$ cd tmp
> 	$ git checkout REL8_3_10
>
> That does use a shadow clone.  Basically, git checkout assumes a tag,
> unless you -b for a branch.
>
or just something like:
    mkdir ../pg8.3.10 &&  git archive --format=tar REL8_3_10 | tar -C
    ../pg8.3.10 -xf -
since he says he doesn't need the git infrastructure.
cheers
andrew
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-11-11 21:41:49 | Re: Working with git repo tagged versions | 
| Previous Message | Robert Haas | 2011-11-11 21:01:54 | Re: why do we need two snapshots per query? |