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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]