On Wed, Jan 16, 2013 at 2:29 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > "Jean-Noël AVILA" <avila.jn@xxxxxxxxx> writes: > >> Thank you for the explanation. >> >> I did not monitor the system calls when writing that patch. >> Where is the perf framework? >> >> As the mistake is located in the "find_basename" function, I would propose a >> fix directly into it so that the output fits what the other functions expect. > > Isn't that a crazy semantics for the function, though? I would > expect find_basename("/a/path/to/file") to return "file", not Actually I'd like to remove that function. The function is called twice: - collect_all_attrs + prepare_attr_stack * find_basename + find_basename which could be reordered to - collect_all_attrs + find_basename + prepare_attr_stack (modified to take dirlen from caller) and because that'll be the only place find_basename is used, we could just inline the code there. -- Duy -- 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