Closed tbergeron closed 7 years ago
I'm surprised you're the first to stumble upon this issue, and I've used Maneuver for several projects. Actually the fix should be fairly easy, as there's no need to manage the "R" (Rename) status. Instead, git diff
can be instructed to return renames as a combination of delete and add.
I don't have a working setup currently, so if you'll be kind enough to test the following suggestion and send a pull request, it would be terrific.
The diff
function at: https://github.com/fadion/Maneuver/blob/master/src/Fadion/Maneuver/Git.php#L150
would need to change to:
public function diff($revision)
{
if (! $revision) {
return $this->command('ls-files');
}
return $this->command("diff --name-status --no-renames {$revision}... {$this->revision}");
}
I removed the useless elseif
, as I have no idea why I had that, and added a --no-renames
flag. The latter treats renames as delete+add.
Thanks
Wonderful! This fixed my issue, deployments are smooth now! Thanks a lot! PS: I opened a PR so you can integrate this change. Hope this is okay with you, cheers!
When deploying after renaming a file with git, I get this error.
(same thing happens for
deploy:list
)This comes from here: https://github.com/fadion/Maneuver/blob/master/src/Fadion/Maneuver/Deploy.php#L104-L114
I guess support for R status needs to be added. I don't mind doing it myself but I'd need some guidance on what should happen when the R status comes in?
Thanks for this great utility, I use it very often and it's the first issue I ever encounter with it! 👍