Josh Triplett <josh@xxxxxxxxxxxxxxxx> writes: >> Shouldn't you be passing prefix and trim the same way as we have always >> done, but just fixing the strncmp() at the beginning of do_one_ref()? > > I still think prefixcmp makes the most sense; if you pass a given base, Using prefixcmp() instead of strncmp() there is what I meant by "fixing the strncmp() at the beginning of do_one_ref()", so we are in agreement on that point. What I found questionable was the removal of the trim value. IOW, I would have expected the patch to be something like: if (prefixcmp(base, entry->name)) return 0; /* outside of our area -- ignore */ ... some other logic ... /* feed the callback, stripping the prefix */ return fn(entry->name + trim, entry->sha1, entry->flag, cb_data); -- 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