GNU bug report logs -
#64140
29.0.91; C-u M-x grep doesn't work correctly after M-x vc-git-grep
Previous Next
Full log
View this message in rfc822 format
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Cc: 64140 <at> debbugs.gnu.org
> Date: Fri, 14 Mar 2025 12:14:57 +0800
>
> Hello,
>
> "git --no-pager char_can_wrap_before *.c" doesn't make any sense at all
> -- it's not a valid git command, it's not sensible arguments to 'git
> grep', it's not valid arguments to grep (obviously).
But it could be processed in trivial ways to yield valid "git grep"
arguments, no? Like this:
git --no-pager grep char_can_wrap_before -- *.c
> I think that vc-git-grep should use a separate history variable, and I
> don't think it's too late to change it, because it fixes saving this
> nonsensical thing.
>
> So I'd like to go ahead and do that, if there are no objections.
That could be okay, but is not the most useful way of using Grep
history in git grep commands. A more useful way would be to allow the
user to reuse Grep history in git grep commands by modifying them to
become valid command lines. Because I think it would be extremely
useful to be able to run a "git grep" command that searches for the
same pattern as a previous Grep command, and vice versa.
This bug report was last modified 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.