# 

6 messages from 2025-11-04 to 2025-11-06. Participants: Michael Roach, Kristoffer Haugsbakk, Lucas Seiki Oshiro.
Thread: https://gitlist.dev/t/64431

## Michael Roach, 2025-11-04 09:22

Subject: 
Message-ID: <0be81c5272a5e42c8471239a1369ee6c32401bb1@mroach.com>
URL: https://gitlist.dev/e/0be81c5272a5e42c8471239a1369ee6c32401bb1%40mroach.com

```
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)

I ran:
  $ git grep -rl --color=never '#!/.*/env ruby'

What did you expect to happen? (Expected behavior)

Get a list of filenames where the contents matched the regex

What happened instead? (Actual behavior)

For one of my files named `ensure-string-env.rb` was printed with part of the path in colour,
and the first dash of the filename replaced with a colon.

What's different between what you expected and what actually happened?

I expected:
  images/deploy_tools/scripts/ensure-string-env.rb

I got:
  images/deploy_tools/scripts/ensure:string-env.rb

  The string up to the colon was printed in pink

Anything else you want to add:

I tested with both zsh and bash with the same result.
I teested with git 2.47.3 and 2.49.1 everything worked correctly.
I also tried other terminals to rule that out.

2.51.1 is the current version on Fedora 42

I was able to reproduce this with:
  $ echo foo > test-one
  $ git add test-one
  $ git grep -l foo
  test:one

This seems to be reproducible with any filename containing a dash

[System Info]
git version:
git version 2.51.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
libcurl: 8.11.1
OpenSSL: OpenSSL 3.2.6 30 Sep 2025
zlib-ng: 2.2.5
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Linux 6.17.5-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 24 14:10:01 UTC 2025 x86_64
compiler info: gnuc: 15.2
libc info: glibc: 2.41
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]
pre-commit

```

## Kristoffer Haugsbakk, 2025-11-04 10:24

Subject: Re:
Message-ID: <ed8a6d59-9b85-4ca6-a23a-1e43efaa7efa@app.fastmail.com>
URL: https://gitlist.dev/e/ed8a6d59-9b85-4ca6-a23a-1e43efaa7efa%40app.fastmail.com
In-Reply-To: <0be81c5272a5e42c8471239a1369ee6c32401bb1@mroach.com>

```
On Tue, Nov 4, 2025, at 10:22, Michael Roach wrote:
>[snip]
> For one of my files named `ensure-string-env.rb` was printed with part
> of the path in colour,
> and the first dash of the filename replaced with a colon.

I have seen something similar when using the Delta pager. I’m pretty
sure that it replaced a hyphen with a colon.

https://github.com/dandavison/delta

I don’t think I’ve seen this behavior with `git --no-pager`.

Don’t know about the coloring part (despite `--color=never`).

>[snip]

```

## Lucas Seiki Oshiro, 2025-11-05 14:55

Subject: Re:
Message-ID: <F8EAD922-315A-42F8-8E77-5C562B5041ED@gmail.com>
URL: https://gitlist.dev/e/F8EAD922-315A-42F8-8E77-5C562B5041ED%40gmail.com
In-Reply-To: <ed8a6d59-9b85-4ca6-a23a-1e43efaa7efa@app.fastmail.com>

```

> I have seen something similar when using the Delta pager. I’m pretty
> sure that it replaced a hyphen with a colon.

It's a known bug in Delta:

https://github.com/dandavison/delta/issues/1259

> I don’t think I’ve seen this behavior with `git --no-pager`.

I think it is a good idea to also see what happens when using another
pager, for example, less (`git -c core.pager=less ...`) or cat
(`git -c core.pager=cat ...`).

Michael, can you run with those three mentioned options and see what
happens? Last year I spent some hours trying to find the cause of the
same bug in Git but then I found out that it was actually a bug in
Delta.
```

## Kristoffer Haugsbakk, 2025-11-05 15:01

Subject: Re:
Message-ID: <9f8acce4-1a4c-4f4f-b8f1-827d778fe6e3@app.fastmail.com>
URL: https://gitlist.dev/e/9f8acce4-1a4c-4f4f-b8f1-827d778fe6e3%40app.fastmail.com
In-Reply-To: <F8EAD922-315A-42F8-8E77-5C562B5041ED@gmail.com>

```
On Wed, Nov 5, 2025, at 15:55, Lucas Seiki Oshiro wrote:
>> I have seen something similar when using the Delta pager. I’m pretty
>> sure that it replaced a hyphen with a colon.
>
> It's a known bug in Delta:
>
> https://github.com/dandavison/delta/issues/1259
>
>> I don’t think I’ve seen this behavior with `git --no-pager`.
>
> I think it is a good idea to also see what happens when using another
> pager, for example, less (`git -c core.pager=less ...`) or cat
> (`git -c core.pager=cat ...`).
>
> Michael, can you run with those three mentioned options and see what
> happens? Last year I spent some hours trying to find the cause of the
> same bug in Git but then I found out that it was actually a bug in
> Delta.

Sorry, I didn’t see that he only replied to me previously:

On Tue, Nov 4, 2025, at 12:15, Michael Roach wrote:
> Just when I thought I had considered all the factors before reporting 
> this, you got it.
> I am using Delta as my pager. My tests with other git versions were via 
> Docker, so there was no pager.
>
> I confirmed that using `git --no-pager grep` doesn't have this issue.
>
> Sorry for the bug report noise and thanks for figuring that out.

```

## Lucas Seiki Oshiro, 2025-11-06 00:05

Subject: Re:
Message-ID: <FE487800-06D5-46ED-9C78-3C42EC62EB4E@gmail.com>
URL: https://gitlist.dev/e/FE487800-06D5-46ED-9C78-3C42EC62EB4E%40gmail.com
In-Reply-To: <9f8acce4-1a4c-4f4f-b8f1-827d778fe6e3@app.fastmail.com>

```

> Sorry, I didn’t see that he only replied to me previously:

Thanks for forwarding that!
```

## Michael Roach, 2025-11-06 08:09

Subject: Re:
Message-ID: <616fa0e461f2bf15bd3588914091fd9214183a8c@mroach.com>
URL: https://gitlist.dev/e/616fa0e461f2bf15bd3588914091fd9214183a8c%40mroach.com
In-Reply-To: <FE487800-06D5-46ED-9C78-3C42EC62EB4E@gmail.com>

```
Sorry I didn't do a reply to all on Kristoffer's response. Can you tell it's my first time here? 
Thank you both for your time on this!



November 6, 2025 at 01:05, "Lucas Seiki Oshiro" <lucasseikioshiro@gmail.com mailto:lucasseikioshiro@gmail.com?to=%22Lucas%20Seiki%20Oshiro%22%20%3Clucasseikioshiro%40gmail.com%3E > wrote:


> 
> > 
> > Sorry, I didn’t see that he only replied to me previously:
> > 
> Thanks for forwarding that!
>

```
