title: git grep and OR'd multiple clauses with pipe?
body: <p>I want to search for multiple clauses with grep - and I know that one can use a pipe <code>|</code> to OR the clauses; so here is a test I'm trying on MSYS2, Windows 10:</p>
  
  <pre><code>$ uname -s
  MSYS_NT-10.0-18363
  $ git --version
  git version 2.25.2
  $ grep --version | head -1
  grep (GNU grep) 3.0
  
  $ git clone https://github.com/xythobuz/avrSerial.git
  ...
  $ cd avrSerial/
  
  $ grep -r 'SERIALDATA\|UART_INTERRUPT_MASK' . --include='*.[ch]'
  ./serial.c:#define SERIALDATA  0
  ./serial.c:    rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
  ./serial.c:        *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
  ./serial.c:            *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
  ./serial.c:            serialRegisters[uart]-&gt;CTRLA &amp;= ~(UART_INTERRUPT_MASK &lt;&lt; 2); // TXCINTLVL
  ./serial_device.h:#define UART_INTERRUPT_MASK 0x03
  </code></pre>
  
  <p>So, just <code>grep</code> works fine here, with multiple clauses with pipe.</p>
  
  <p>However, I'd like to know in which C functions do the clauses/keyword matches occur, so I try to use <code>git grep</code> with the <code>-p</code> switch:</p>
  
  <pre><code>$ git grep -p 'SERIALDATA\|UART_INTERRUPT_MASK' -- '*.[ch]'
  $
  </code></pre>
  
  <p>... and absolutely nothing is returned, for the same clause.</p>
  
  <p>However, if I repeat this test on Ubuntu:</p>
  
  <pre><code>$ echo `uname -s` `cat /etc/issue | head -1`
  Linux Ubuntu 18.04.4 LTS \n \l
  $ git --version
  git version 2.17.1
  $ grep --version | head -1
  grep (GNU grep) 3.1
  
  # same procedure with git clone, cd ... grep -r works the same too; but git grep -p is different:
  
  $ git grep -p 'SERIALDATA\|UART_INTERRUPT_MASK' -- '*.[ch]'
  serial.c:#define SERIALDATA  0
  serial.c=static void serialReceiveInterrupt(uint8_t uart) {
  serial.c:    rxBuffer[uart][rxWrite[uart]] = *serialRegisters[uart][SERIALDATA];
  serial.c=static void serialTransmitInterrupt(uint8_t uart) {
  serial.c:        *serialRegisters[uart][SERIALDATA] = sendThisNext[uart];
  serial.c:            *serialRegisters[uart][SERIALDATA] = txBuffer[uart][txRead[uart]];
  serial.c:            serialRegisters[uart]-&gt;CTRLA &amp;= ~(UART_INTERRUPT_MASK &lt;&lt; 2); // TXCINTLVL
  serial_device.h=uint8_t const serialBits[UART_COUNT][UART_BITS] = {{
  serial_device.h:#define UART_INTERRUPT_MASK 0x03
  </code></pre>
  
  <p>... here it works?!</p>
  
  <p>Does anyone know why the different behavior in regards to <code>git grep</code> on these systems? Is there a git config setting I have to enable, or is it a regression in <code>git</code>, or maybe there are some shell escaping problems on MSYS2?</p>
  
  <p>Or in general - how can I get the same kind of <code>git grep</code> response on MSYS2, as I get it on Ubuntu?</p>