Karl Chen <quarl@xxxxxxxxxxxxxxx> writes: >>>>>> On 2008-08-26 17:25 PDT, Jeff King writes: > > Jeff> 1. It should probably re-use path.c:user_path, as > Jeff> Johannes mentioned. > > That function has the wrong interface for this task (requires > extra strdup, imposes PATH_MAX, conflates all error conditions > into returning NULL, also returns NULL if input doesn't have "~"). > Do you still think it should re-use that function? On the other hand you have a pair of ugly "casting a const pointer down, temporarily modifying what is const" in your version. In any case, I think their point is that these two functions are meant to do the same thing, and a unified interface would be desirable. You do not necessarily have to use user_path() from path.c, but user_path(), if its interface is coarser, could become a thin wrapper around yours, don't you think? Even better, perhaps the current callers of user_path() may benefit from finer distinction among error conditions (I didn't look, though). -- 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