Re: [PATCH] fix `git mv existing-dir non-existing-dir`*

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> What is curious is that dest_st.st_mode, after lstat on dst
> succeeds, is never checked, even though the error message claims
> that it detected an attempt to move directory over file.  What
> should happen when the user did this then?
>
>     $ git mv existing-dir another-existing-dir
>
> Shouldn't it do something similar to
>
>     $ mv D1 D2
>
> which is to move the entire hierarchy of D1 and make it appear at
> D2/D1?

Ah, that case is handled in a different codepath, so this lstat of
dst needs to check only the existence.  So there is no (unrelated)
bug there.  Sorry for the noise.



[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]

  Powered by Linux