Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 0/7] Fix some bugs in abspath.c

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:38

mhagger@alum.mit.edu writes:
From: Michael Haggerty <redacted>

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help