Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-15 Thread Stefan Beller
On 08/15/2013 01:25 AM, Martin Fick wrote: On Wednesday, August 14, 2013 04:51:14 pm Matthieu Moy wrote: Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-15 Thread Stefan Beller
On 08/15/2013 12:59 AM, Matthieu Moy wrote: Junio C Hamano gits...@pobox.com writes: Stefan Beller stefanbel...@googlemail.com writes: I asked for a todo wish list a few weeks ago, but got no real answer, but rather: Pick your choice and try to come up with good patches. Hmph, I hope that

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-15 Thread Stefan Beller
On 08/14/2013 07:04 PM, Junio C Hamano wrote: Stefan Beller stefanbel...@googlemail.com writes: diff --git a/builtin/repack.c b/builtin/repack.c new file mode 100644 index 000..d39c34e --- /dev/null +++ b/builtin/repack.c @@ -0,0 +1,410 @@ +/* + * The shell version was written by

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-15 Thread Martin Fick
On Thursday, August 15, 2013 01:46:02 am Stefan Beller wrote: On 08/15/2013 01:25 AM, Martin Fick wrote: On Wednesday, August 14, 2013 04:51:14 pm Matthieu Moy wrote: Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-15 Thread Junio C Hamano
Martin Fick mf...@codeaurora.org writes: On Wednesday, August 14, 2013 04:53:36 pm Junio C Hamano wrote: Martin Fick mf...@codeaurora.org writes: One suggestion would be to change the repack code to create pack filenames based on the sha1 of the contents of the pack file instead of on

[RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Stefan Beller
* Suggestions by Matthieu Moy have been included. * I think it is completed apart from small todos and bugfixes. * breaks the test suite, first breakage is t5301 (gc, sliding window) Signed-off-by: Stefan Beller stefanbel...@googlemail.com --- Makefile | 2 +- builtin.h

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Antoine Pelisse
On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 + contrib/examples/git-repack.sh | 194 +++ git-repack.sh | 194 --- I'm still not

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Junio C Hamano
Stefan Beller stefanbel...@googlemail.com writes: diff --git a/builtin/repack.c b/builtin/repack.c new file mode 100644 index 000..d39c34e --- /dev/null +++ b/builtin/repack.c @@ -0,0 +1,410 @@ +/* + * The shell version was written by Linus Torvalds (2005) and many others. + * This

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Stefan Beller
On 08/14/2013 06:49 PM, Antoine Pelisse wrote: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 + contrib/examples/git-repack.sh | 194 +++ git-repack.sh

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Jeff King
On Wed, Aug 14, 2013 at 07:04:37PM +0200, Stefan Beller wrote: But apart from my blabbering, I think ivegy made a good point: The C parts just don't rely on external things, but only libc and kernel, so it may be nicer than a shell script. Also as it is used serversided, the performance

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Martin Fick
On Wednesday, August 14, 2013 10:49:58 am Antoine Pelisse wrote: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 + contrib/examples/git-repack.sh | 194

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Junio C Hamano
Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 + contrib/examples/git-repack.sh | 194 +++ git-repack.sh

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Stefan Beller
On 08/14/2013 07:25 PM, Martin Fick wrote: I have been holding off a bit on expressing this opinion too because I don't want to squash someone's energy to improve things, and because I am not yet a git dev, but since it was brought up anyway... It's ok, if you knew a better topic to work

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Martin Fick
On Wednesday, August 14, 2013 04:16:35 pm Stefan Beller wrote: On 08/14/2013 07:25 PM, Martin Fick wrote: I have been holding off a bit on expressing this opinion too because I don't want to squash someone's energy to improve things, and because I am not yet a git dev, but since it was

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Matthieu Moy
Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 + contrib/examples/git-repack.sh | 194 +++ git-repack.sh

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Junio C Hamano
Stefan Beller stefanbel...@googlemail.com writes: I asked for a todo wish list a few weeks ago, but got no real answer, but rather: Pick your choice and try to come up with good patches. Hmph, I hope that wasn't me. There are some good ones here;

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Junio C Hamano
Martin Fick mf...@codeaurora.org writes: One suggestion would be to change the repack code to create pack filenames based on the sha1 of the contents of the pack file instead of on the sha1 of the objects in the packfile. ... I am not 100% sure if the change in naming convention I

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Stefan Beller stefanbel...@googlemail.com writes: I asked for a todo wish list a few weeks ago, but got no real answer, but rather: Pick your choice and try to come up with good patches. Hmph, I hope that wasn't me. There are some good ones here;

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Martin Fick
On Wednesday, August 14, 2013 04:51:14 pm Matthieu Moy wrote: Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c | 410 +

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Martin Fick
On Wednesday, August 14, 2013 04:53:36 pm Junio C Hamano wrote: Martin Fick mf...@codeaurora.org writes: One suggestion would be to change the repack code to create pack filenames based on the sha1 of the contents of the pack file instead of on the sha1 of the objects in the packfile.

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Martin Fick
On Wednesday, August 14, 2013 05:25:42 pm Martin Fick wrote: On Wednesday, August 14, 2013 04:51:14 pm Matthieu Moy wrote: Antoine Pelisse apeli...@gmail.com writes: On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller stefanbel...@googlemail.com wrote: builtin/repack.c

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Duy Nguyen
On Thu, Aug 15, 2013 at 12:25 AM, Martin Fick mf...@codeaurora.org wrote: The script really is mostly a policy script, and with the discussions happening in other threads about how to improve git gc, I think it is helpful to potentially be able to quickly modify the policies in this script, it

Re: [RFC PATCH] repack: rewrite the shell script in C.

2013-08-14 Thread Duy Nguyen
On Thu, Aug 15, 2013 at 5:51 AM, Matthieu Moy matthieu@grenoble-inp.fr wrote: There's a real problem with git-repack being shell (I already mentionned it in the previous thread about the rewrite): it creates dependencies on a few external binaries, and a restricted server may not have them.