Thread (47 messages) flat view 47 messages, 5 authors, 2016-06-15
STALE3734d

[PATCH 0/2] in-tree symlink handling with absolute paths

From: Martin Erik Werner <hidden>
Date: 2016-06-15 22:59:45

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(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help