Re: [PATCH 1/4] Build in git-repack

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/4] Build in git-repack

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:21

Matthieu Moy [off-list ref] writes:
[ It's cool you're working on this, I'd really like a git-repack in C.
  That would fix this
  http://thread.gmane.org/gmane.comp.version-control.git/226458 ]

Stefan Beller [off-list ref] writes:
quoted
From: Nguyễn Thái Ngọc Duy <redacted>

pack-objects learns a few more options to take over what's been done
by git-repack.sh. cmd_repack() becomes a wrapper around
cmd_pack_objects().
I think the patch would read easier if these were split into two
patches: one doing the real stuff in pack-objects, and then getting rid
of git-repack.sh to replace it with a trivial built-in.

Actually, I'm wondering why pack-objects requires so much changes.
git-repack.sh was already a relatively small wrapper around
pack-objects, and did not need the new options you add, so why are they
needed? In particular adding the new --update-info option that just does
quoted
+	if (repack_flags & REPACK_UPDATE_INFO)
+		update_server_info(0);
seems overkill to me: why don't you just let cmd_repack call
update_server_info(0)?
My feeling exactly.  I would rather see a patch that does not touch
pack-objects at all, and use run_command() interface to spawn it.
Once we do have to pack, the necessary processing cycle will dwarf
the fork/exec latency anyway, no?

Re: [PATCH 1/4] Build in git-repack

From: Stefan Beller <hidden>
Date: 2016-06-15 22:58:21

On 08/07/2013 05:48 PM, Junio C Hamano wrote:
Matthieu Moy [off-list ref] writes:
quoted
seems overkill to me: why don't you just let cmd_repack call
update_server_info(0)?
My feeling exactly.  I would rather see a patch that does not touch
pack-objects at all, and use run_command() interface to spawn it.
Once we do have to pack, the necessary processing cycle will dwarf
the fork/exec latency anyway, no?
Thanks for clarification. That was my initial idea as well, 
to not touch the pack-objects logic. 

However Duy send that patch (basically as is, 
I just made it apply again), 
and I guessed that I'd get to results
faster with an already existing approach.

I will reconsider and try to remove the additional logic from 
pack-objects again (so it will not get touched) and move it to the
repack itself. It is just a way to understand, 'what needs to be done'.

Stefan

Re: [PATCH 1/4] Build in git-repack

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:58:21

On Wed, Aug 7, 2013 at 10:48 PM, Junio C Hamano [off-list ref] wrote:
Matthieu Moy [off-list ref] writes:
quoted
[ It's cool you're working on this, I'd really like a git-repack in C.
  That would fix this
  http://thread.gmane.org/gmane.comp.version-control.git/226458 ]

Stefan Beller [off-list ref] writes:
quoted
From: Nguyễn Thái Ngọc Duy <redacted>

pack-objects learns a few more options to take over what's been done
by git-repack.sh. cmd_repack() becomes a wrapper around
cmd_pack_objects().
I think the patch would read easier if these were split into two
patches: one doing the real stuff in pack-objects, and then getting rid
of git-repack.sh to replace it with a trivial built-in.

Actually, I'm wondering why pack-objects requires so much changes.
git-repack.sh was already a relatively small wrapper around
pack-objects, and did not need the new options you add, so why are they
needed? In particular adding the new --update-info option that just does
quoted
+    if (repack_flags & REPACK_UPDATE_INFO)
+            update_server_info(0);
seems overkill to me: why don't you just let cmd_repack call
update_server_info(0)?
My feeling exactly.  I would rather see a patch that does not touch
pack-objects at all, and use run_command() interface to spawn it.
Once we do have to pack, the necessary processing cycle will dwarf
the fork/exec latency anyway, no?
I'm not opposed to run_command(). I think the reason I wanted to move
repack functionality to pack-objects is to avoid reading sha-1 from
pack-objects and reconstruct the paths again from the sha-1. But for
simplicity, perhaps we should not touch pack-objects at all. Then we
could have builtin/repack.c instead of stuffing cmd_repack in
builtin/pack-objects.c

@Stefan, if you want to push this work, feel free to take it as _your_
patch, rewrite as will. You don't need to retain my name.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help