On 08/17/2013 03:34 PM, René Scharfe wrote: > > Hmm, stepping back a bit, why not just build the paths and call unlink > for them right away, without readdir? The shell version only ever > deletes existing .pack files (those in $existing alias existing_packs) > as well as their .idx and .keep files, if present. It doesn't use a > glob pattern, unlike remove_pack here. I'll meditate on that. Thanks for all the other remarks. Now the code looks much more git-ish, similar to other commands. The lines of code went down from 411 to 385, I guess we can cut off more inefficiencies there. As you suggested, maybe we should juts have one helper function to read in the pack directory and keeping all the information (complete filename), so we do not need to find the exact filename later again by looping over the directory again. Stefan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html