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

Git submodules awareness #88

Open
1buran opened this issue Sep 28, 2020 · 0 comments
Open

Git submodules awareness #88

1buran opened this issue Sep 28, 2020 · 0 comments

Comments

@1buran
Copy link

1buran commented Sep 28, 2020

Hi!

Recently deadgrep stopped aware git submodules: when I run search inside git submodule, dedagrep will search in outer project space (main git repo).

For example, I have such project structure:

main_project_repo (main git repo)
 \ - - apps (git submodules)
        \ -- app1 (git submodule)
        \ -- app2 (git submodule)
  ...... ...... 

in my .emacs I have such dedagrep settings:

(global-set-key (kbd "<f5>") #'deadgrep)  

so, e.g. my current workdir is ~/main_project_repo/apps/app1 and when I press <f5> deadgrep ask me about "Search term" and then, it will search in ~/main_project_repo/ instead of expected ~/main_project_repo/apps/app1. It's little bit annoying cos every time when I want to search smth in git submodule (limit search to submodule directory), it will run in outer, main project directory and I need to do extra actions: change the directory to subdirectory of current submodule...


deadgrep-debug output:

Platform: gnu/linux                                                                                                                                                                                              
Emacs version: 27.1                                                                                                                                                                                              
Command: rg --color=ansi --line-number --no-heading --with-filename --fixed-strings --smart-case -- sdfsdfsdfsdf .                                                                                               
default-directory: "~/projects/bigproject/"                                                                                                                                                                      
                                                                                                                                                                                                                 
Initial output from ripgrep:                                                                                                                                                                                     
nil                                                                                                                                                                                                              

ripgrep version: 12.1.1

P.S.
Thanks a lot for such a cool tool, it really really save a lot of my working time! =)

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