printf 'bar\nboo\nbzz\n' > foo
  git grep --no-index --files-with-matches --all-match -e -bar -e boo -e 
bzz -- foo
  cd ../
  git grep --no-index --files-with-matches --all-match -e -bar -e boo -e 
bzz -- git/foo
  git grep --no-index --files-with-matches --all-match -e -bar -e boo -e 
bzz git

All work for me.
Git 2.25.1
Ubuntu 20.04.3 LTS

On Tuesday, December 28, 2021 at 4:36:30 PM UTC+1 kevi...@gmail.com wrote:

>
> Exit status: 134
> BUG: environment.c:202: git environment hasn't been setup
> Aborted
>
> I can see the code here: 
> https://github.com/git/git/blob/master/environment.c#L203
>

This is a result of calling 
get_git_dir
🤔
possibly (?) from 
init_path_spec_item

> $ git grep --all-match --no-index --files-with-matches -e abc -e def 
/path/to/data.txt

Are you using a more complicated pathspec than just /path/to/data.txt?
Are you running inside or outside a git repo?

What's the output when running:
  GIT_TRACE=1 git grep ...
?

 

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/51d71b8e-27b3-4131-a842-fea715bd7e94n%40googlegroups.com.

Reply via email to