Emacs with multiple repositories (git / svn, etc.) in one project

I have one git repository with a directory structure that looks like this:

root ---------- src | | |------ 3rd 

root is my working directory, 3rd consists of several third-party git submodules.
projectile-find-file only finds files in src , it does not work for submodules.

+8
git emacs projectile emacs-projectile
source share
2 answers

projectile-git-command uses git ls-files to display files belonging to the project,
so I solved the problem with the following code:

 (setq projectile-git-command "git-ls-all-files") 

git-ls-all-files is a shell script:

 \#!/bin/zsh files=`git ls-files -co --exclude-standard` sb_files=`git --no-pager submodule --quiet foreach 'git ls-files --full-name -co --exclude-standard | sed s!^!$path/!'` all_files=$files$sb_files echo $all_files 
+6
source share

I just had an equivalent problem, I fixed it by adding an empty .projectile directory to my root directory, this means that this directory is the real root of the project and looks for all the files in it in subdirectories when you want to find something.

See here for more details.

+5
source share

All Articles