git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Kristoffer Haugsbakk" <code@khaugsbakk.name>
To: "Mario Grgic" <mario_grgic@hotmail.com>
Cc: git@vger.kernel.org
Subject: Re: git bug: Perl compatible regular expressions do not work as expected
Date: Sat, 25 Mar 2023 13:42:12 +0100	[thread overview]
Message-ID: <dd473fc3-cd03-4ef1-9fe1-8909e30a0edb@app.fastmail.com> (raw)
In-Reply-To: <MW4PR20MB5517583CBEEF34B1E87CCF1290859@MW4PR20MB5517.namprd20.prod.outlook.com>

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@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

  reply	other threads:[~2023-03-25 12:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25 12:31 git bug: Perl compatible regular expressions do not work as expected Mario Grgic
2023-03-25 12:42 ` Kristoffer Haugsbakk [this message]
2023-03-25 12:59   ` Mario Grgic
2023-03-25 13:04 ` demerphq
2023-03-25 13:09   ` Mario Grgic
2023-03-25 13:24     ` demerphq
2023-03-25 18:09     ` René Scharfe
2023-03-27 16:29       ` Junio C Hamano
2023-03-27 17:23         ` René Scharfe
2023-03-27 21:33           ` Junio C Hamano
2023-03-28 13:47             ` Junio C Hamano
2023-03-28 17:56               ` René Scharfe
2023-03-25 14:16 ` Mario Grgic
2023-03-25 15:39 ` Mario Grgic
2023-03-27 16:30   ` Junio C Hamano
2023-03-27 17:22     ` Mario Grgic
2023-03-27 21:11       ` Junio C Hamano
2023-03-28  0:03         ` Mario Grgic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd473fc3-cd03-4ef1-9fe1-8909e30a0edb@app.fastmail.com \
    --to=code@khaugsbakk.name \
    --cc=git@vger.kernel.org \
    --cc=mario_grgic@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).