Re: git gc & deleted branches

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git gc & deleted branches

From: Jeremy Maitin-Shepard <hidden>
Date: 2016-06-15 22:44:35

Jeff King [off-list ref] writes:
On Fri, May 09, 2008 at 09:51:15PM -0400, Jeremy Maitin-Shepard wrote:
quoted
When you create a new working directory, you would also create in the
original repository a symlink named
e.g. orig_repo/.git/peers/<some-arbitrary-name-that-doesn't-matter> that
points to the .git directory of the newly created working directory.
That assumes you _can_ write to the original repository. That may or may
not be the case, depending on your setup.
Well, I suppose in that case it could print a warning or maybe fail
without some "force" option.  If you can't write to the repository, then
I think it is safe to say that it will never know or care about you, so
you will fundamentally have a fragile setup.  I'd say that except in
very special circumstances, you are better off just not sharing it at
all.

Consider, for instance, that even if the repository that you are sharing
form never deletes branches and never does non-fast-forward updates of
references, it could very well happen to have, due to some temporary
operation, some unreferenced object that happens to be exactly the same
object that you want to add to your repository.  Because you've listed
it in info/alternates, you won't write that object to your own
repository, but then the source repository will very likely garbage
collect the object at some later point, corrupting your repository.

-- 
Jeremy Maitin-Shepard

Re: git gc & deleted branches

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:35

Hi,

On Sat, 10 May 2008, Jeremy Maitin-Shepard wrote:
Jeff King [off-list ref] writes:
quoted
On Fri, May 09, 2008 at 09:51:15PM -0400, Jeremy Maitin-Shepard wrote:
quoted
quoted
When you create a new working directory, you would also create in the
original repository a symlink named
e.g. orig_repo/.git/peers/<some-arbitrary-name-that-doesn't-matter> that
points to the .git directory of the newly created working directory.
quoted
That assumes you _can_ write to the original repository. That may or may
not be the case, depending on your setup.
FWIW this argument can be found in the mailing list.  It does not have to 
be told over and over again, right?
Well, I suppose in that case it could print a warning or maybe fail 
without some "force" option.  If you can't write to the repository, then 
I think it is safe to say that it will never know or care about you, so 
you will fundamentally have a fragile setup.  I'd say that except in 
very special circumstances, you are better off just not sharing it at 
all.
Counterexample kernel.org.  Counterexample repo.or.cz.

Hth,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help