Re: [PATCH/RFC] Teach repack to optionally retain otherwise lost objects

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Johannes Sixt <johannes.sixt@...>, <git@...>
Date: Thursday, November 29, 2007 - 2:15 am

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


Your 1.5 hours was spent wisely to come up with that idea ;-).

To make sure I understand your idea correctly, the procedure to repack a
repository in a fork-friendly way is:

 (1) find the project directly forked from you;

 (2) hardlink all packs under your object store to their object store;

 (3) repack -a -l and prune.

I think that would work as long as you do the above as a unit and handle
one repository at a time.  Otherwise I think you risk losing necessary
objects when hierarchical forks are involved.  E.g.  if you have a
project X that has a fork Y which in turn has fork Z.

	* Step 1 is run for X, Y and Z.
        * Step 2 is run for Y and Z.
        * Step 3 is run for Z.

At this point, Z is still borrowing objects from Y and X through Y, and
it will not keep objects it is borrowing from X through Y.  Then if the
procedure is intermixed like this, a bad thing happens.

	* Step 2 is run for X.
	* Step 3 is run for Y.
	* Step 3 is run for X.

Step 3 for Y would lose objects Y was borrowing from X that were not
used by Y itself.  At this point, Z is still usable as the objects it is
borrowing from X though Y have not been pruned from X.  But Step 3 for X
will lose them, rendering Z unusable.

-
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:
[PATCH/RFC] Teach repack to optionally retain otherwise lost..., Johannes Schindelin, (Wed Nov 28, 11:41 pm)
Re: [PATCH/RFC] Teach repack to optionally retain otherwise ..., Junio C Hamano, (Thu Nov 29, 2:15 am)
Re: [PATCH/RFC] Teach repack to optionally retain otherwise ..., Johannes Schindelin, (Thu Nov 29, 7:57 am)
[PATCH] Add "--expire &lt;time&gt;" option to 'git prune', Johannes Schindelin, (Thu Nov 29, 10:21 am)
[PATCH] Add "--expire &lt;time&gt;" option to 'git prune', Johannes Schindelin, (Thu Nov 29, 4:59 pm)
Re: [PATCH] Add "--expire &lt;time&gt;" option to 'git prune', Johannes Schindelin, (Thu Nov 29, 12:13 pm)
[PATCH v2] Add "--expire &lt;time&gt;" option to 'git prune', Johannes Schindelin, (Thu Nov 29, 11:22 am)