git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rickard Andersson <rickard.a1992@gmail.com>
To: git@vger.kernel.org
Subject: git grep bug replacing - with :
Date: Fri, 14 Jun 2024 21:21:40 +0200	[thread overview]
Message-ID: <CALyzih__9sZD31SVMECcxk55+MAMjkfgpLzecoHo0xUoauerqA@mail.gmail.com> (raw)

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
   Added 2 files to my repo with words in them
   text-file.txt
   text-file-file.txt

   I did a git grep for said words that exists in both, and used
argument `-l` to only
   show matching filename
   ```
   git grep -l ExtremelyInterestingWord
   ```

What did you expect to happen? (Expected behavior)
   I expected to get the following output
   ```
   text-file.txt
   text-file-file.txt
   ```

What happened instead? (Actual behavior)
   I get
   ```
   text:file.txt
   text:file-file.txt
   ```


What's different between what you expected and what actually happened?
   It seems that when using the argument `-l` the first `-` in a filename is
   replaced with a `:`. It also seems that it is just the first one as the
   second file keeps it's second occurence of `-`.

Anything else you want to add:

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.34.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
Tue May  7 09:00:52 UTC 2 x86_64
compiler info: gnuc: 11.4
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /usr/bin/zsh

             reply	other threads:[~2024-06-14 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-14 19:21 Rickard Andersson [this message]
2024-06-14 19:36 ` git grep bug replacing - with : Eric Sunshine
2024-06-14 21:05   ` Junio C Hamano
2024-06-15 10:21     ` Rickard Andersson
2024-06-15 16:36       ` Eric Sunshine

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

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

  git send-email \
    --in-reply-to=CALyzih__9sZD31SVMECcxk55+MAMjkfgpLzecoHo0xUoauerqA@mail.gmail.com \
    --to=rickard.a1992@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).