Suppose my project located at /project has a git submodule /project/module. Setting manual = false will result in Rooter cd'ing to /project/submodule every time I open a file in the submodule, causing some inconvenience.
Greedy search could be a handy option, i.e. go up in the hierarchy until it hits a directory not containing .git, and set the root to the last seen directory containing .git. In this example, it would not stop at /project/submodule, and would instead continue looking for .git in /project, then /. Since / doesn't contain a .git directory, the project root shall be set to /project.
Suppose my project located at
/projecthas a git submodule/project/module. Settingmanual = falsewill result in Rooter cd'ing to/project/submoduleevery time I open a file in the submodule, causing some inconvenience.Greedy search could be a handy option, i.e. go up in the hierarchy until it hits a directory not containing
.git, and set the root to the last seen directory containing.git. In this example, it would not stop at/project/submodule, and would instead continue looking for.gitin/project, then/. Since/doesn't contain a.gitdirectory, the project root shall be set to/project.