Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Root dir and project path not correct for git submodules #41

Open
jekriske-lilly opened this issue Aug 25, 2017 · 0 comments
Open

Root dir and project path not correct for git submodules #41

jekriske-lilly opened this issue Aug 25, 2017 · 0 comments

Comments

@jekriske-lilly
Copy link

Delivery does not work correctly for git submodules. Since version 1.7.x, git, by default, absorbs .git directories from submodules into a modules folder within the parent .git directory leaving only a .git file containing the path to the .git directory

Delivery, therefore cannot find the correct root based on the logic here:
https://github.com/chef/delivery-cli/blob/master/src/delivery/project/mod.rs#L178-L216

delivery init for example, instead of recognizing that the cwd is actually a git submodule from the .git file, present in the cwd, delivery walks into the parent directory to find a .git directory with a config file.

This, in turn, returns an incorrect project path, adds an incorrect remote path to the parent repo instead of adding the remote to the submodule as it's supposed to via:
https://github.com/chef/delivery-cli/blob/master/src/delivery/git/mod.rs#L294-L315

If the project root was correctly determined and the git remote add command was run from the correct directory, delivery would function with git submodules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant