On 09/27/2012 11:27 PM, Junio C Hamano wrote:
Michael Haggerty mhag...@alum.mit.edu writes:
@@ -54,20 +73,36 @@ const char *real_path(const char *path)
}
if (*buf) {
-if (!*cwd !getcwd(cwd, sizeof(cwd)))
-
Michael Haggerty mhag...@alum.mit.edu writes:
The patch makes sense, but while you are touching this code, I have
to wonder if there is an easy way to tell, before entering the loop,
if we have to chdir() around in the loop. That would allow us to
hoist the getcwd() that is done only so that
Michael Haggerty mhag...@alum.mit.edu writes:
@@ -54,20 +73,36 @@ const char *real_path(const char *path)
}
if (*buf) {
- if (!*cwd !getcwd(cwd, sizeof(cwd)))
- die_errno (Could not get current working
It accepts a new parameter, die_on_error. If die_on_error is false,
it simply cleans up after itself and returns NULL rather than dying.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
abspath.c | 93 ---
1 file changed, 72
4 matches
Mail list logo