Re: [PATCH v2 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-27 Thread Junio C Hamano
Martin Erik Werner martinerikwer...@gmail.com writes: In order to manipulate symliks in the work tree using absolute paths, symlinks should only be dereferenced outside the work tree. I agree 100% with this reasoning (modulo s/symliks/symlinks/). As to the implementation, it looks a bit

[PATCH v2 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-26 Thread Martin Erik Werner
The prefix_path_gently() function currently applies real_path to everything if given an absolute path, dereferencing symlinks both outside and inside the work tree. In order to manipulate symliks in the work tree using absolute paths, symlinks should only be dereferenced outside the work tree.

Re: [PATCH v2 2/2] setup: Don't dereference in-tree symlinks for absolute paths

2014-01-26 Thread Duy Nguyen
On Mon, Jan 27, 2014 at 7:07 AM, Martin Erik Werner martinerikwer...@gmail.com wrote: diff --git a/setup.c b/setup.c index 5432a31..0789a96 100644 --- a/setup.c +++ b/setup.c @@ -22,11 +22,51 @@ char *prefix_path_gently(const char *prefix, int len, const char *orig = path;