git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git bug: Perl compatible regular expressions do not work as expected

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Mar 25, 2023, 12:42 UTC
Message-ID
<dd473fc3-cd03-4ef1-9fe1-8909e30a0edb@app.fastmail.com>
In-Reply-To
<MW4PR20MB5517583CBEEF34B1E87CCF1290859@MW4PR20MB5517.namprd20.prod.outlook.com>
On Sat, Mar 25, 2023, at 13:31, Mario Grgic wrote:
Show 6 quoted lines
> What happened instead? (Actual behavior)
> Nothing is found, when in fact the search for term is present in the git
> history
>
> What's different between what you expected and what actually happened?
> git should print out the commit containing the search term.
Weird. It works for me.
    $ mkdir test
    $ cd test
    $ git init
    $ [add file]
    $ # This was missing from the instructions
    $ git add --all
    $ git commit -m 'added test file'
    $ git log --all -p -G '\bmain\b'
    commit 56fbac5e12649c4de95071cc1872569d7c34055e (HEAD -> main)
    Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
    Date:   Sat Mar 25 13:33:51 2023 +0100
        added test file
    diff --git a/test.c b/test.c
    new file mode 100644
    index 0000000..0bffa6a
    --- /dev/null
    +++ b/test.c
    @@ -0,0 +1,5 @@
    +int main(int argc, const char *argv[])
    +{
    +    return 0;
    +}
    +
.
    [System Info]
    git version:
    git version 2.40.0
    cpu: x86_64
    no commit associated with this build
    sizeof-long: 8
    sizeof-size_t: 8
    shell-path: /bin/sh
    uname: Linux 5.4.0-144-generic #161~18.04.1-Ubuntu SMP Fri Feb 10 15:55:22 UTC 2023 x86_64
    compiler info: gnuc: 7.5
    libc info: glibc: 2.27
    $SHELL (typically, interactive shell): /bin/bash
    [Enabled Hooks]
-- 
Kristoffer Haugsbakk
Previous: Mario GrgicNext: Mario Grgic
Message 2 of 18 in “git bug: Perl compatible regular expressions do not work as expected”
  1. Mario GrgicMar 25, 2023
  2. Kristoffer HaugsbakkMar 25, 2023
  3. Mario GrgicMar 25, 2023
  4. demerphqMar 25, 2023
  5. Mario GrgicMar 25, 2023
  6. demerphqMar 25, 2023
  7. René ScharfeMar 25, 2023
  8. Junio C HamanoMar 27, 2023
  9. René ScharfeMar 27, 2023
  10. Junio C HamanoMar 27, 2023
  11. Junio C HamanoMar 28, 2023
  12. René ScharfeMar 28, 2023
  13. Mario GrgicMar 25, 2023
  14. Mario GrgicMar 25, 2023
  15. Junio C HamanoMar 27, 2023
  16. Mario GrgicMar 27, 2023
  17. Junio C HamanoMar 27, 2023
  18. Mario GrgicMar 28, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.