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

2013-08-15 Thread Junio C Hamano
Martin Fick writes: > On Wednesday, August 14, 2013 04:53:36 pm Junio C Hamano > wrote: >> Martin Fick 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

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 writes: > >>> On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller > >>> > >>> wrote: > buil

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 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 Torval

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 writes: > >> Stefan Beller 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

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 writes: >>> On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller >>> >>> wrote: builtin/repack.c | 410 + >>>

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 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. There's also the Windows

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 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 makes it > easie

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 writes: > > > On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller > > > > > > 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 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 n

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 writes: > > On Wed, Aug 14, 2013 at 6:27 PM, Stefan Beller > > > > 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 Matthieu Moy
Junio C Hamano writes: > Stefan Beller 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; > > http://git-blame.blogspot.co

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

2013-08-14 Thread Junio C Hamano
Martin Fick 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 > propose wouldn't ca

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

2013-08-14 Thread Junio C Hamano
Stefan Beller 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; http://git-blame.blogspot.com/search?q=leftover Some are trivial,

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

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

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

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 wor

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

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

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 > > 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 as

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 > wrote: >> builtin/repack.c | 410 >> + >> contrib/examples/git-repack.sh | 194 +++ >> git-repack.sh | 194

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

2013-08-14 Thread Junio C Hamano
Stefan Beller 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 is a translation int

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 wrote: > builtin/repack.c | 410 > + > contrib/examples/git-repack.sh | 194 +++ > git-repack.sh | 194 --- I'm still not sure I understand the tr

[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 --- Makefile | 2 +- builtin.h | 1 +