From: Nicolas Pitre <nico@cam.org>
To: Klas Lindberg <klas.lindberg@gmail.com>
Cc: Git Users List <git@vger.kernel.org>
Subject: Re: Fetching SHA id's instead of named references?
Date: Wed, 08 Apr 2009 16:38:52 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0904081624410.6741@xanadu.home> (raw)
In-Reply-To: <4CBB910C-24F5-4F51-A02D-7760839CCE18@gmail.com>
On Wed, 8 Apr 2009, Klas Lindberg wrote:
> 7 apr 2009 kl. 04.34 skrev Nicolas Pitre:
>
> > In git terms, this is called "history rewriting". And you really don't
> > want to do that if your repository is pulled by other people, unless
> > there is an explicit statement about that fact.
>
> I thought you had to use filter-branch to qualify for history rewriting?
That, or 'git rebase', or 'git reset', or 'git commit --amend' on an
already published commit, or reusing a branch name for a different line
of development. Anything that would look like the past has changed to a
client fetching from you.
> Anyway, the scenario I have in mind is when a new branch is created from the
> old one, the old one deleted and then the name of the old one gets reused. The
> deltas are still there, intact, but now you have to use a different named
> reference to reach them :-(
Right. And normally you would use a good name for the new branch that
clearly indicate its archiving purpose.
> > Thing is, with the distributed nature of git, nothing prevents you from
> > keeping a local version of the commit you're interested in. Unlike with
> > a central repository where someone else might delete a branch you need,
> > with git you will still have access to that particular commit locally
> > regardless if the remote repository has deleted it or not.
>
> This is true, and Git is indeed very good at saving your ass on the client
> side. Other systems spend much more effort on saving your ass on the server
> side. My problem is that "my" people responsible for the overall system are
> mostly interested in the server side. At least that is where they put the
> tough requirements on perpetual availability.
Just never allow for any branch to be deleted nor rewound on the server
then.
> However, it is good enough if there is some way to somehow guarantee that a
> branch or tag will never be misused as outlined above. This could be solved
> through basic file system mechanisms (like write protecting the refs/tags
> files perhaps?) or a backup mechanism that raises an alarm on forbidden
> manipulations, or a host of other more or less weird mechanisms. Git doesn't
> have to provide the mechanism directly, but it would be nice for enterprise
> users if it did.
Git provides you with hooks. Have a look here:
http://www.kernel.org/pub/software/scm/git/docs/githooks.html
Nicolas
prev parent reply other threads:[~2009-04-08 20:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 12:13 Fetching SHA id's instead of named references? Klas Lindberg
2009-04-06 12:33 ` Johannes Schindelin
2009-04-06 12:41 ` Klas Lindberg
2009-04-06 12:48 ` Johannes Schindelin
2009-04-06 21:50 ` Dmitry Potapov
2009-04-06 12:54 ` Matthieu Moy
2009-04-06 13:06 ` Klas Lindberg
2009-04-06 13:16 ` Finn Arne Gangstad
2009-04-06 14:40 ` Shawn O. Pearce
2009-04-06 16:22 ` Klas Lindberg
2009-04-06 16:55 ` Nicolas Pitre
2009-04-06 23:40 ` Klas Lindberg
2009-04-07 2:34 ` Nicolas Pitre
2009-04-08 20:03 ` Klas Lindberg
2009-04-08 20:38 ` Nicolas Pitre [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.0904081624410.6741@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=klas.lindberg@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).