Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: [PATCHv2] git-mv: Keep moved index entries inact

From: Petr Baudis <hidden>
Date: 2016-06-15 22:45:03

Possibly related (same subject, not in this thread)

On Fri, Jul 25, 2008 at 11:46:02PM -0700, Junio C Hamano wrote:
Thanks.  I think I've managed to fix the rename_index_entry_at() in a
satisfactory way, and also made builtin-mv to allow "mv -f symlink file"
and "mv -f file symlink".
Oh, sorry, I didn't realize there were still problems with the original
one, I would try it on my own in that case.
So my take on the above test piece is that after:

	>moved
	mkdir dir
        >dir/file
        ln -s dir symlink
	git add moved dir symlink

This should fail, as it is an overwrite:

	git mv moved symlink

and with "-f", the command should simply remove symlink and replace it
with a regular file whose contents come from the original "moved".

IOW, what a symlink points at should not matter.
You convinced me, yes. (Especially since I started actually using
symlinks in some of my projects very recently and this would be the
exact semantic I would eventually expect as well.)

-- 
				Petr "Pasky" Baudis
As in certain cults it is possible to kill a process if you know
its true name.  -- Ken Thompson and Dennis M. Ritchie
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help