* git grep --no-index fails when given an absolute path
@ 2023-10-26 10:46 triallax
2023-10-26 12:28 ` Kristoffer Haugsbakk
0 siblings, 1 reply; 2+ messages in thread
From: triallax @ 2023-10-26 10:46 UTC (permalink / raw)
To: Git
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.
What did you do before the bug happened? (Steps to reproduce your issue)
- Run `git grep --no-index -r -- -- /usr/share/fish/completions/`
What did you expect to happen? (Expected behavior)
The command executes the search successfully.
What happened instead? (Actual behavior)
This happens:
triallax@satoru ~> git grep --no-index -r -- -- /usr/share/fish/completions/
BUG: environment.c:213: git environment hasn't been setup
fish: Job 1, 'git grep --no-index -r -- -- /u…' terminated by signal SIGABRT (Abort)
What's different between what you expected and what actually happened?
One of them is an error, and the other is a successful execution.
Anything else you want to add:
Interestingly enough, this seems to be happening only with absolute paths from
my testing, and it happens even when the directory that's passed is a Git repo.
Please review the rest of the bug report below.
You can delete any lines you don't wish to share.
[System Info]
git version:
git version 2.42.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.8_1 #1 SMP PREEMPT_DYNAMIC Fri Oct 20 13:35:41 UTC 2023 x86_64
compiler info: gnuc: 12.2
libc info: glibc: 2.36
$SHELL (typically, interactive shell): /bin/dash
[Enabled Hooks]
not run from a git repository - no hooks to show
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: git grep --no-index fails when given an absolute path
2023-10-26 10:46 git grep --no-index fails when given an absolute path triallax
@ 2023-10-26 12:28 ` Kristoffer Haugsbakk
0 siblings, 0 replies; 2+ messages in thread
From: Kristoffer Haugsbakk @ 2023-10-26 12:28 UTC (permalink / raw)
To: triallax; +Cc: Git
Hi
On Thu, Oct 26, 2023, at 12:46, triallax@tutanota.com wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> - Run `git grep --no-index -r -- -- /usr/share/fish/completions/`
See this thread: https://lore.kernel.org/git/CAKFQ_Q_P4HvCMHsg4=6ycb8r44qprhRCGSmLQf7B3_-zy28_oQ@mail.gmail.com/
> What did you expect to happen? (Expected behavior)
>
> The command executes the search successfully.
>
> What happened instead? (Actual behavior)
>
> This happens:
>
> triallax@satoru ~> git grep --no-index -r -- --
> /usr/share/fish/completions/
> BUG: environment.c:213: git environment hasn't been setup
> fish: Job 1, 'git grep --no-index -r -- -- /u…' terminated by signal
> SIGABRT (Abort)
>
> What's different between what you expected and what actually happened?
>
> One of them is an error, and the other is a successful execution.
>
> Anything else you want to add:
>
> Interestingly enough, this seems to be happening only with absolute paths from
> my testing, and it happens even when the directory that's passed is a Git repo.
What is the working directory that you are in? I’m guessing somewhere in
your home directory?
I’ll try to reproduce your command later with the proposed fix.
Kristoffer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-26 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 10:46 git grep --no-index fails when given an absolute path triallax
2023-10-26 12:28 ` Kristoffer Haugsbakk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).