Re: [PATCH] repack: allow simultaneous packing and pruning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eran Tromer
Date: Tuesday, October 10, 2006 - 4:45 pm

On 2006-10-11 00:27, Linus Torvalds wrote:

... because git-repack moves only already-referenced objects to packs
(and once they're referenced a subsequent "git-repack -a -d" won't lose
them). Curiously, this critically depends on Documentation/git-repack
being wrong:

  This script is used to combine all objects that do not currently
  reside in a "pack", into a pack.

However, this means there is no safe way to create a new pack without
adding all its content as loose objects first.

For example, the following is racy because there's a point where the new
pack is on disk but not yet referenced:

$ git-fetch --keep foo &  git-repack -a -d



Ah, semantics.

The request was for removing unreferenced objects ("pruning") in *packs*
while doing the repacking. This turns out to be already implemented
(contrary to the docs) and, as you explained, safe.

Pruning both packed and loose objects while repacking is neither safe
nor requested (and is indeed roughly equivalent to just
"git-repack -a -d; git-prune").


  Eran
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] repack: allow simultaneous packing and pruning, Linus Torvalds, (Tue Oct 10, 8:03 am)
Re: [PATCH] repack: allow simultaneous packing and pruning, Junio C Hamano, (Tue Oct 10, 1:24 pm)
Re: [PATCH] repack: allow simultaneous packing and pruning, Linus Torvalds, (Tue Oct 10, 2:25 pm)
Re: [PATCH] repack: allow simultaneous packing and pruning, Linus Torvalds, (Tue Oct 10, 3:27 pm)
Re: [PATCH] repack: allow simultaneous packing and pruning, Eran Tromer, (Tue Oct 10, 4:45 pm)