From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Pete Harlan <pgit@pcharlan.com>
Cc: git@vger.kernel.org
Subject: Re: Archiving tags/branches?
Date: Sat, 18 Oct 2008 12:23:45 +0200 [thread overview]
Message-ID: <20081018102345.GA3749@neumann> (raw)
In-Reply-To: <48F93F52.4070506@pcharlan.com>
Hi Pete,
On Fri, Oct 17, 2008 at 06:43:46PM -0700, Pete Harlan wrote:
> If I wanted to archive those, it looks like this would work:
>
> mkdir .git/refs/archived-tags
> cp -a .git/refs/tags/* .git/refs/archived-tags
> git tag -d <tag-to-hide> # repeat as necessary
>
> I can then maintain a short list of tags that currently interest me, but
> am guaranteed not to lose old branches (say) referenced by those tags.
>
> Is there a reason this won't work?
Yes:
$ git --version
git version 1.6.0.2.574.g7d0e0
$ git init
Initialized empty Git repository in /home/szeder/tmp/git/archive/.git/
$ echo 1 >foo
$ git add foo
$ git commit -m bar
Created initial commit 0c92489: bar
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
$ git tag t
$ git update-ref refs/archived-tags/t t
$ git tag -d t
Deleted tag 't'
$ cat .git/refs/archived-tags/t
0c92489da6ec6dfd9875eb590d820fcceb01829b
$ git gc
Counting objects: 3, done.
Writing objects: 100% (3/3), done.
Total 3 (delta 0), reused 0 (delta 0)
$ cat .git/refs/archived-tags/t
cat: .git/refs/archived-tags/t: No such file or directory
So, if you put any tags or branches under refs/whatever-non-standard/,
then it gets deleted when you gc (or when gc is run automatically).
I don't know whether this behaviour is intentional or not, but I have
experienced this the hard way recently.
Regards,
Gábor
next prev parent reply other threads:[~2008-10-18 10:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 1:43 Archiving tags/branches? Pete Harlan
2008-10-18 2:50 ` David Symonds
2008-10-20 6:14 ` Pete Harlan
2008-10-18 10:23 ` SZEDER Gábor [this message]
2008-10-18 11:15 ` Johan Herland
2008-10-18 13:02 ` SZEDER Gábor
2008-10-18 13:32 ` Johan Herland
2008-10-20 6:36 ` Pete Harlan
2008-10-20 7:53 ` Johan Herland
2008-10-21 2:53 ` Pete Harlan
2008-10-20 14:35 ` Jakub Narebski
2008-10-21 4:08 ` Pete Harlan
2008-10-21 8:15 ` Jakub Narebski
2008-10-21 9:33 ` Pete Harlan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081018102345.GA3749@neumann \
--to=szeder@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=pgit@pcharlan.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.