Re: Deprecation/Removal schedule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 6 Feb 2007, Jeff King wrote:

> On Tue, Feb 06, 2007 at 11:45:24AM +0100, Johannes Schindelin wrote:
> 
> > > git gc (repack -d of it) is too dangerous in a shared repo: it breaks
> > > the repos which depend on the master repository, have sent (by some
> > > means) some objects over to the master, and accidentally removed
> > > the reference, and were pruned afterwards.
> > 
> > We no longer call git-prune automatically in git-gc. You have to say 
> > "git-gc --prune" to trigger that behaviour.
> 
> repack -d can lose objects, too:
> 
> # fully packed test repo with 2 commits
> mkdir repo && cd repo
> git init
> touch foo
> git add foo
> git commit -m foo
> echo bar >foo
> git commit -a -m bar
> git repack -a -d
> 
> # remember the latest commit
> commit=`git rev-parse HEAD`
> 
> # now make it dangling
> git reset --hard HEAD^

This is the culprit.

The solution is very easy: do not --reference a repository which resets or 
deletes branches. IMHO this is all too obvious.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]