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

Re: [PATCH] git-mv: succeed even if source is a prefix of destination

From: Fredrik Kuivinen <hidden>
Date: 2016-06-15 22:42:37

On Wed, Aug 16, 2006 at 10:44:02AM +0200, Johannes Schindelin wrote:
quoted
It looks like we need some kind of path normalization before we do
those tests.
I kind of hoped it was not necessary to do this, since get_pathspec() does 
a rudimentary version of it (BTW git-mv.perl got it wrong: it substituted 
"./" by "", which would fail for a directory name like "endsWithADot.").

It was a little more involved:

-- 8< --
[PATCH] git-mv: add more path normalization

We already use the normalization from get_pathspec(), but now we also
remove a trailing slash. So,

	git mv some_path/ into_some_path/

works now.

Also, move the "can not move directory into itself" test before the
subdirectory expansion.
It works as expected now. Thanks!

- Fredrik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help