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(-)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to