* git tag's history
@ 2010-07-24 12:12 Mahesh Vaidya
2010-07-26 9:36 ` David Aguilar
0 siblings, 1 reply; 4+ messages in thread
From: Mahesh Vaidya @ 2010-07-24 12:12 UTC (permalink / raw)
To: git
If git tag's history is preserved or I need to implement this in
pre-receive hook
Scenario
^^^^^^^^^^^^
I create a tag FOO -corresponding to a commit cdf123
FOO->cdf123 and I push this Tag to authoritative repository ; all fine.
Now my buddy creates overwrite my tag (git tag -f) and now this tag
looks at some other commit
FOO->123aff
He does a push tag FOO; assuming no restriction in pre-receive this
push will get applied and my earlier cdf123 is lost. Is there any way
to retrive Tag's history or in need to implement some scheme
Thx/ Mahesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git tag's history
2010-07-24 12:12 git tag's history Mahesh Vaidya
@ 2010-07-26 9:36 ` David Aguilar
2010-07-26 13:36 ` Will Palmer
0 siblings, 1 reply; 4+ messages in thread
From: David Aguilar @ 2010-07-26 9:36 UTC (permalink / raw)
To: Mahesh Vaidya; +Cc: git
On Sat, Jul 24, 2010 at 5:12 AM, Mahesh Vaidya <forvaidya@gmail.com> wrote:
> If git tag's history is preserved or I need to implement this in
> pre-receive hook
>
> Scenario
> ^^^^^^^^^^^^
> I create a tag FOO -corresponding to a commit cdf123
>
> FOO->cdf123 and I push this Tag to authoritative repository ; all fine.
>
> Now my buddy creates overwrite my tag (git tag -f) and now this tag
> looks at some other commit
>
> FOO->123aff
>
> He does a push tag FOO; assuming no restriction in pre-receive this
> push will get applied and my earlier cdf123 is lost. Is there any way
> to retrive Tag's history or in need to implement some scheme
>
> Thx/ Mahesh
He won't be able to push the tag unless he forcibly deletes your tag first.
Tags do not have history. This is a non-technical problem. If s/he's
deleting your tags, it's a social problem.
--
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git tag's history
2010-07-26 9:36 ` David Aguilar
@ 2010-07-26 13:36 ` Will Palmer
2010-07-26 14:17 ` Nicolas Sebrecht
0 siblings, 1 reply; 4+ messages in thread
From: Will Palmer @ 2010-07-26 13:36 UTC (permalink / raw)
To: David Aguilar; +Cc: Mahesh Vaidya, git
On Mon, 2010-07-26 at 02:36 -0700, David Aguilar wrote:
> He won't be able to push the tag unless he forcibly deletes your tag first.
>
> Tags do not have history. This is a non-technical problem. If s/he's
> deleting your tags, it's a social problem.
>
What about enabling the reflog on the shared bare repository?
Tags get changed. That's a fact. It's a necessity, no matter what the
theoretical model says. Sometimes there's a reason to replace a tag, and
when that happens there is sometimes a reason to hang on to the old
value. Pretending "it's a social issue" ignores reality, not the least
important aspect of which is "social issues happen. How do we avoid
losing information in a sane, scalable manner?"
Just an example of a tag which could stand to be updated, take a look
at: refs/tags/junio-gpg-pub There's at least one thing in there which
is out of date.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git tag's history
2010-07-26 13:36 ` Will Palmer
@ 2010-07-26 14:17 ` Nicolas Sebrecht
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Sebrecht @ 2010-07-26 14:17 UTC (permalink / raw)
To: Will Palmer; +Cc: David Aguilar, Mahesh Vaidya, git, Nicolas Sebrecht
The 26/07/10, Will Palmer wrote:
> On Mon, 2010-07-26 at 02:36 -0700, David Aguilar wrote:
> > He won't be able to push the tag unless he forcibly deletes your tag first.
> >
> > Tags do not have history. This is a non-technical problem. If s/he's
> > deleting your tags, it's a social problem.
True in the first place but I see nothing wrong to want to have
technical safeguards around social issues.
> What about enabling the reflog on the shared bare repository?
> Tags get changed. That's a fact. It's a necessity, no matter what the
> theoretical model says. Sometimes there's a reason to replace a tag, and
> when that happens there is sometimes a reason to hang on to the old
> value.
Sharing a central repository makes it exposed on such erasure. Git
provides other mechanisms to take more control. Your workflow may not be
what everybody want for themselves. You should look at the hooks system,
I think.
You might also be interested by gitolite, an external tool (I'm not sure
it could help on this particular issue, though).
> Pretending "it's a social issue" ignores reality, not the least
> important aspect of which is "social issues happen. How do we avoid
> losing information in a sane, scalable manner?"
It shouldn't be lost. The bare repository can be seen as a gate to
publicize local work (or a backup copy sometimes). The original tag can
be restored by his creator from his local repository.
> Just an example of a tag which could stand to be updated, take a look
> at: refs/tags/junio-gpg-pub There's at least one thing in there which
> is out of date.
Hard tags are designed to be immutable whatever happens after the
facts. This is why they exist.
Public tags shouldn't change as it would break other up-to-date
repositories.
--
Nicolas Sebrecht
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-26 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-24 12:12 git tag's history Mahesh Vaidya
2010-07-26 9:36 ` David Aguilar
2010-07-26 13:36 ` Will Palmer
2010-07-26 14:17 ` Nicolas Sebrecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).