Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [NOT-SERIOUS PATCH] Make get_relative_cwd() not accept NULL for a directory

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:25

Possibly related (same subject, not in this thread)

Johannes Schindelin [off-list ref] writes:
	Okay, I made up my mind.  Allowing "dir == NULL" is not
	only a matter of convenience.  It is the most natural
	way to say that "dir" is an invalid or non-existing
	directory.
That is also fine; it only needs to be clarified somehow to
people who might wonder what get_relative_cwd() function is used
for and how to use it in their programs.  The comment that says
"As a convenience" may need to become a bit more elaborate to
say why it is convenient for the callers to do so (e.g. "The
caller may have called another function that returns a directory
to obtain the 'dir', which may have returned NULL as a way to
say 'there is nothing applicable in your case', and in such a
case, your $(cwd) relative to that 'dir' is also something that
cannot be used, hence a NULL is returned").
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help