From: Martin Erik Werner Date: Sun, 26 Jan 2014 14:22:24 GMT Subject: [PATCH 0/2] in-tree symlink handling with absolute paths Message-ID: <1390746146-9478-1-git-send-email-martinerikwerner@gmail.com> In-Reply-To: <20140115124859.GA4283@mule> On Wed, 2014-01-15 at 13:48 +0100, Martin Erik Werner wrote: > If git-mv is provided absolute paths when moving symlinks, it tries to > dereference them and (attempts to) move the symlink target rather than the > symlink itself, this seems like a quite odd behaviour since it's inconsistent > with how git-mv works with symlinks if given relative paths, and I'm thinking > it might be a bug, since it not documented in the git-mv manpage. I've done a bit more digging into this: The issue applies to pretty much all commands which can be given paths to files which are present in the work tree, so add, cat-file, rev-list, etc. I've written a test and a fix which seems to do the right thing. Martin Erik Werner (2): t0060: Add test for manipulating symlinks via absolute paths setup: Don't dereference in-tree symlinks for absolute paths setup.c | 54 ++++++++++++++++++++++++++++++++------------------- t/t0060-path-utils.sh | 7 +++++++ 2 files changed, 41 insertions(+), 20 deletions(-)