Re: Moving a directory into another fails

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

 



On Wed, Jul 26, 2006 at 11:00:48AM -0400, Jon Smirl wrote:
> I cloned a git project. Then in the original I did mkdir for a new
> directory and use git mv to move an existing directory into it. I then
> used cg diff to generate a patch for the move.
> 
> When I use cg patch to apply this patch to the cloned tree it fails.
> This seems to be a problem in the git code, not cg.  It is not picking
> up the creation of the new intervening subdirectory correctly.
> 
> I just synced and this does not work in the current code.

I tried to reproduce your scenario and before that I setup a test
repository. 

(1) mkdir git_test
(2) cd git_test
(3) git init-db
(4) vim test.txt 
# fill in some bogus text
(5) mkdir testing
(6) cd testing
(7) vim test1.txt
# again, fill in some bogus text
(8) cd ..
(9) cg add test.txt testing/test1.txt
(10) cg commit -C 
# just give a fancy commit message...
(11) cd ..
(12) mkdir bare_git
(13) cd bare_git
(14) mkdir git_test.git
(15) GIT_DIR=git_test.git git init-db 
(16) cd ../git_test
(17) git push ../bare_git/git_test.git --all
(18) cd ../
(19) git clone bare_git/git_test.git git_test2
(20) cd git_test
(21) mkdir blah_test
(22) git mv testing/ blah_test/
(23) cg diff > ../mkdir_patch.diff
(24) cd ..
(25) cd git_test2/
(26) cg patch < ../mkdir_patch.diff

from the last one (26) i get 

patching file blah_test/testing/test1.txt
patching file testing/test1.txt
touch: cannot touch `testing/test1.txt': No such file or directory
Adding file blah_test/testing/test1.txt
Removing file testing/test1.txt

but the result is correct. There is no testing-directory in here
anymore, and inside blah_test, there is my testing dir with the file
test1.txt in it...

did I miss something?

I use cogito-0.17.3 with git version 1.4.1
(obviously without that recently rewritten git-mv...)

Nicolas

Attachment: signature.asc
Description: Digital signature


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