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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I did some bisecting and this is broken for me on git-2.39.2 as well, but works in git-2.38.4 and previous versions (tried 2.30.0 as well).


> On Mar 25, 2023, at 8:42 AM, Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx> wrote:
> 
> On Sat, Mar 25, 2023, at 13:31, Mario Grgic wrote:
>> 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@xxxxxxxxxxxxxxx>
>    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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux