From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>,
Git mailing list <git@vger.kernel.org>
Subject: Regression in 'git add -p' with 'interactive.diffFilter' since builtin version is default
Date: Mon, 22 Aug 2022 18:15:16 -0400 [thread overview]
Message-ID: <ecf6f5be-22ca-299f-a8f1-bda38e5ca246@gmail.com> (raw)
Hi Dscho,
I found a regression in the builtin 'add -i'. I use diff-so-fancy [1]
as a pager and also use it via 'interactive.diffFilter'. With the
builtin implementation, this errors with:
error: could not parse colored hunk header '?[36m?[1m?[38;5;13m@ file:1 @?[1m?[0m'
With the Perl version, it works fine.
This has been reported in the 'diff-so-fancy' project here: [2].
Here is a reproducer:
~~~bash
#!/bin/bash
set -euEo pipefail
repo=repro
rm -rf $repo
TEST_AUTHOR_LOCALNAME=author
TEST_AUTHOR_DOMAIN=example.com
GIT_AUTHOR_EMAIL=${TEST_AUTHOR_LOCALNAME}@${TEST_AUTHOR_DOMAIN}
GIT_AUTHOR_NAME='A U Thor'
GIT_AUTHOR_DATE='1112354055 +0200'
TEST_COMMITTER_LOCALNAME=committer
TEST_COMMITTER_DOMAIN=example.com
GIT_COMMITTER_EMAIL=${TEST_COMMITTER_LOCALNAME}@${TEST_COMMITTER_DOMAIN}
GIT_COMMITTER_NAME='C O Mitter'
GIT_COMMITTER_DATE='1112354055 +0200'
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
export HOME=
git -c init.defaultBranch=unimportant init $repo
cd $repo
date>file
git add file
git commit -m file
git clone https://github.com/so-fancy/diff-so-fancy.git
date>>file
export PATH="diff-so-fancy:$PATH"
git -c interactive.diffFilter="diff-so-fancy --patch" -c add.interactive.useBuiltin=false add -p < <(echo y)
date>>file
git -c interactive.diffFilter="diff-so-fancy --patch" add -p
~~~
Cheers,
Philippe.
[1] https://github.com/so-fancy/diff-so-fancy
[2] https://github.com/so-fancy/diff-so-fancy/issues/437
next reply other threads:[~2022-08-22 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 22:15 Philippe Blain [this message]
2022-08-23 13:08 ` Regression in 'git add -p' with 'interactive.diffFilter' since builtin version is default Johannes Schindelin
2022-08-23 18:38 ` Johannes Schindelin
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=ecf6f5be-22ca-299f-a8f1-bda38e5ca246@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/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