Re: git gc & deleted branches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 9, 2008, 03:21 UTC
- Message-ID
- <7vabj0b1re.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <loom.20080509T011318-478@post.gmane.org>
Brandon Casey <drafnel@gmail.com> writes:
Show 13 quoted lines
> @@ -116,7 +113,15 @@ for name in $names ; do
> echo >&2 "old-pack-$name.{pack,idx} in $PACKDIR."
> exit 1
> }
> - rm -f "$PACKDIR/old-pack-$name.pack" "$PACKDIR/old-pack-$name.idx"
> + rm -f "$PACKDIR/old-pack-$name.idx"
> + test -z "$keep_unreachable" ||
> + ! test -f "$PACKDIR/old-pack-$name.pack" ||
> + git unpack-objects < "$PACKDIR/old-pack-$name.pack" || {
> + echo >&2 "Failed unpacking unreachable objects from old pack"
> + echo >&2 "saved as old-pack-$name.pack in $PACKDIR."
> + exit 1
> + }Neat trick. Unreachable objects that are only in this pack will get current timestamp and gets a new lease of life for two weeks and then will disappear.