David Tweed wrote: > On Feb 6, 2008 7:41 PM, Brandon Casey <casey@xxxxxxxxxxxxxxx> wrote: >> They use sprintf for the "%02x" part, but they use memcpy to copy the return >> of get_object_directory() into a fixed string and then append onto that, >> rather than repeatedly writing the same string over and over. Ok, there is one >> instance in builtin-prune.c that repeatedly writes path, but builtin-prune-packed.c >> does the memcpy thing. > >So I don't think efficiency is an issue. Yeah not performance critical, readability is definitely more important. I just don't like repeatedly doing: sprintf(dst, "static string %s", s) when the "static string" part doesn't change. Either way it doesn't make much difference here. -brandon - 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