Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-22 Thread Jonathan Nieder
Junio C Hamano wrote: > Stefan Beller writes: >> The motivation of this patch is to get closer to a goal of being >> able to have a core subset of git functionality built in to git. >> That would mean >> >> * people on Windows could get a copy of at least the core parts >>of Git without havi

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-22 Thread Johannes Sixt
Am 22.08.2013 00:15, schrieb Stefan Beller: On 08/21/2013 10:56 PM, Junio C Hamano wrote: Stefan Beller writes: +static int delta_base_offset = 1; +char *packdir; Does this have to be global? As the path is pretty obvious (get_object_directory() + "/pack"), we could however also construct

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-21 Thread Stefan Beller
On 08/22/2013 12:50 AM, Junio C Hamano wrote: > Stefan Beller writes: > +static int delta_base_offset = 1; +char *packdir; >>> >>> Does this have to be global? >> >> We could pass it to all the functions, making it not global. > > Sorry for being unclear; I meant "not static". It is p

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-21 Thread Junio C Hamano
Stefan Beller writes: >>> +static int delta_base_offset = 1; >>> +char *packdir; >> >> Does this have to be global? > > We could pass it to all the functions, making it not global. Sorry for being unclear; I meant "not static". It is perfectly fine for this to be a file-scope static. >>> + >>

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-21 Thread Stefan Beller
On 08/21/2013 10:56 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The motivation of this patch is to get closer to a goal of being >> able to have a core subset of git functionality built in to git. >> That would mean >> >> * people on Windows could get a copy of at least the core parts

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-21 Thread Matthieu Moy
Junio C Hamano writes: > Stefan Beller writes: > >> The motivation of this patch is to get closer to a goal of being >> able to have a core subset of git functionality built in to git. >> That would mean >> >> * people on Windows could get a copy of at least the core parts >>of Git without

Re: [RFC PATCHv6 1/2] repack: rewrite the shell script in C

2013-08-21 Thread Junio C Hamano
Stefan Beller writes: > The motivation of this patch is to get closer to a goal of being > able to have a core subset of git functionality built in to git. > That would mean > > * people on Windows could get a copy of at least the core parts >of Git without having to install a Unix-style she