Re: [PATCH v2 2/2] repack: repack promisor objects if -a or -A is set

2018-08-18 Thread Duy Nguyen
On Thu, Aug 9, 2018 at 12:35 AM Jonathan Tan wrote: > @@ -179,6 +179,76 @@ static void prepare_pack_objects(struct child_process > *cmd, > cmd->out = -1; > } > > +/* > + * Write oid to the given struct child_process's stdin, starting it first if > + * necessary. > + */ > +static int

Re: [PATCH v2 2/2] repack: repack promisor objects if -a or -A is set

2018-08-09 Thread Jonathan Tan
On Thu, Aug 9, 2018 at 10:05 AM, Junio C Hamano wrote: > Hmm, it is clever to auto-start the pack-objects (and notice there > wasn't anything needing to pack). Two things that are worth noting > are: > > - The code takes advantage of the fact that cmd.in being left as -1 >is a sign that

Re: [PATCH v2 2/2] repack: repack promisor objects if -a or -A is set

2018-08-09 Thread Junio C Hamano
Jonathan Tan writes: > +/* > + * Write oid to the given struct child_process's stdin, starting it first if > + * necessary. > + */ > +static int write_oid(const struct object_id *oid, struct packed_git *pack, > + uint32_t pos, void *data) > +{ > + struct child_process *cmd =

[PATCH v2 2/2] repack: repack promisor objects if -a or -A is set

2018-08-08 Thread Jonathan Tan
Currently, repack does not touch promisor packfiles at all, potentially causing the performance of repositories that have many such packfiles to drop. Therefore, repack all promisor objects if invoked with -a or -A. This is done by an additional invocation of pack-objects on all promisor objects