Closed danielzzz closed 11 years ago
That hadn't even occurred to me, since I don't use submodules in my repos. I'll take a look into it and see if I can sort it out.
Seems like I'll have to use something along the lines of git submodule foreach git ls-files
to get the list of all modified files in submodules for uploading. I haven't tested it out yet, though.
ok, great, thanks for the info
Interestingly, I just made a small test with 4 submodules, and git ls-files actually returns the names of the modules. git ls-files is what I use for the first deployment (i.e. when there is no REVISION file in the FTP server). I'm just wondering if you had a previous REVISION file (or if you created one manually) when you found out that it doesn't upload submodules, because if you didn't have a REVISION file, it should have errored (saying the file with the name of the submodule doesn't exist - only a folder with the actual submodule exists).
Anyway, let me know. I want to do further testing on this issue, and see if I can get it sorted today.
Same happens even if there is a REVISION file. Hmm. Maybe I should check if it a given file is a submodule (process the list of submodules into an array and do it like that).
Okay, I've been working on a fix, but now I have to stop, so here's a thing list of things to do, for my own personal records:
1) Test if it ignores submodule names properly in both git diff
and git ls-files
. They are not to be uploaded, only their files are.
2) Test if it ignores submodule names properly if the submodule is in a subfolder of the repository, not in the top directory.
3) Do a "git submodule foreach git ls-files" and then weed out the lines that have Entering 'submodule-name'. Also, make sure that the lines are weeded out successfully independently of whether the submodule is in a subfolder or not. Also, of course, make the "git ls-files" change to "git diff" if it is a diff, and make sure it works, too.
4) Add the files found to the $filesToUpload or $filesToDelete arrays, and test that everything is being added properly.
Has there been any more work on allowing the upload of submodules? Only just stumbled upon this as found it very useful but not uploading submodules was something I'd assumed would work :(
Hi Andrew, I'm afraid not, as my client work's been taking priority over it. As soon as possible, I'll get back on this project and resolve this issue, but for the time being, I'm afraid it doesn't work.
Thanks for info Bruno, no worries.
This has been fixed and submodules should now upload properly in git-deploy-php 2.0.
Woop! thanks for fixing it!
My pleasure; let me know if you ever have any issues with it.
hi, I have encountered a problem. it seems that git ls-files ignore the ones that belong to submodules and therefore they are not uploaded at all to the server. I've been reading through the man, but I could not find any solution by now, other than adding those files directly - which is a hassle. maybe you have an idea on how to add them to the list? thx, best, dan