From: Fredrik Kuivinen Date: Wed, 16 Aug 2006 19:22:54 GMT Subject: Re: [PATCH] git-mv: succeed even if source is a prefix of destination Message-ID: <20060816192254.GA9575@c165.ib.student.liu.se> In-Reply-To: On Wed, Aug 16, 2006 at 10:44:02AM +0200, Johannes Schindelin wrote: > > > > 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