From: Junio C Hamano Date: Tue, 04 Sep 2012 18:08:47 GMT Subject: Re: [PATCH 0/7] Fix some bugs in abspath.c Message-ID: <7va9x5bqz4.fsf@alter.siamese.dyndns.org> In-Reply-To: <1346746470-23127-1-git-send-email-mhagger@alum.mit.edu> mhagger@alum.mit.edu writes: > From: Michael Haggerty > > I really just wanted to tidy up filter_refs(), but I've been sucked > into a cascade of recursive yak shaving. This is my first attempt to > pop the yak stack. Thanks. > Please note that both absolute_path("") and real_path("") used to > return the current directory followed by a slash. I believe that this > was a bug, and that it is more appropriate for both functions to > reject the empty string. The evidence is as follows: > > * If this were intended behavior, presumably the return value would > *not* have a trailing slash. That is weak. The only thing you can infer from that observation is that the presense or absense of trailing '/' would not make any difference to the caller who wanted a path to the cwd (and is more convenient if the call is made so that a path relative to the cwd is tucked after it). > * I couldn't find any callers that appeared to depend on the old > behavior. That is a very good argument (especially if the audit were thorough). I would be tempted to say that we should die() on "" for now, cook the result outside "master" for a few weeks while auditing the callchains, and see if any of them complains.