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

From: Stefan Beller <[email-masked]>
Date: Wed, 21 Aug 2013 14:53:38 +0200

On 08/21/2013 10:49 AM, Matthieu Moy wrote:
> I tend to dislike these "set a variable and break twice" to exit nested
> loops. Using an auxiliary function, you could just do
> 
> int f()
> {
> 	for_each {
> 		for () {
> 			...
> 			if ()
> 				return 1;
> 			...
> 		}
> 	}
> 	return 0;
> }
> 
> (Matter of taste, though. Some people may disagree)
> 
> A good side effect would be to move some code out of cmd_repack, which
> is rather long.

Thank you very much for the review, it helps me very much to focus
on the small details.

I intend to have the C code in this patch as close to the
shell version as possible. This goes both for functionality as
well as style/organisation within the file.

All the additional changes, such as this one
(Or in the previous mail, retaining the error code of subprocesses)
I'd like to put in small follow up patches changing just one thing
at a time.

But as these follow up changes heavily rely on the very first patch
I will first try to get that right, meaning accepted into pu.
Then I can send patches with these proposals such as making more
functions.

Thanks,
Stefan