Re: Deprecation/Removal schedule
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2007, 11:00 UTC
- Message-ID
- <20070206110015.GA10231@coredump.intra.peff.net>
- In-Reply-To
- <Pine.LNX.4.63.0702061144430.22628@wbgn013.biozentrum.uni-wuerzburg.de>
On Tue, Feb 06, 2007 at 11:45:24AM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> > 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^ sleep 1 git reflog expire --expire=0 HEAD refs/heads/master
# now repack git repack -a -d
# and it's gone git-show $commit
-Peff