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

2013-08-18 Thread René Scharfe
> +static void remove_temporary_files() { > + DIR *dir; > + struct dirent *e; > + char *prefix, *path; > + > + prefix = mkpathdup(".tmp-%d-pack", getpid()); > + path = mkpathdup("%s/pack", get_object_directory()); > + > + dir = opendir(path); > + while ((e = readdir(dir)

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

2013-08-18 Thread Kyle J. McKay
On Aug 18, 2013, at 07:36, Stefan Beller wrote: + fprintf(stderr, + "WARNING: Some packs in use have been renamed by\n" + "WARNING: prefixing old- to their name, in order to\n" + "WA

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

2013-08-18 Thread Stefan Beller
This is the beginning of the rewrite of the repacking. * replace all plain string handling functions by git helper functions, most often mkpathdup * use argv-array structs to pass arguments to other git invocations. Only test t7701 (2nd) fails now with this patch. Signed-off-by: Stefan