All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Nikita Bobko <nikitabobko@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: [Bug report] diff.noprefix config is ignored for interactive `add`
Date: Tue, 06 Apr 2021 14:57:46 -0700	[thread overview]
Message-ID: <xmqqsg4313fp.fsf@gitster.g> (raw)
In-Reply-To: <YGzUerPL7V8jDxHo@coredump.intra.peff.net> (Jeff King's message of "Tue, 6 Apr 2021 17:36:58 -0400")

Jeff King <peff@peff.net> writes:

> I imagine something like this:
> ...
> would work, but I didn't really test it. There's another hitch, which is
> that this subsystem has all been re-written in C. So we'd really want to
> implement it in the new code (possibly in both places, though maybe it
> is time to consider cutting over from the perl script to the C one by
> deafult?).
>
> But hopefully this illustrates the general idea, and gives somebody
> interested in the feature enough to work up their own patch.

These "cosmetic appearance" configuration that would affect the
output from diff shown to the user would not be limited to just the
.noprefix, though.  Depending on the users, they would care just as
deeply about any of these:

	.context
	.interHunkContext
	.mnemonicPrefix
        .noprefix
	.relative
	.orderFile

as Nikita does for .noprefix to send a bug report.

Luckily or unluckily, .suppressBlankEmpty and the per-filetype
.xfuncname patterns do impact the output from the plumbing, because
git_diff_basic_config() does read them, even though they are merely
"cosmetic" configurations.

I am unsure how much we should cater to end-user controlled
configuration when we are generating diff output for our own
consumption, but if we were to tweak "add -p" and friends to
pay attention to .noprefix, we probably should do the same for
all the others.

Thanks.



  reply	other threads:[~2021-04-06 21:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 10:15 [Bug report] diff.noprefix config is ignored for interactive `add` Nikita Bobko
2021-04-06 21:36 ` Jeff King
2021-04-06 21:57   ` Junio C Hamano [this message]
2021-04-06 22:47     ` Jeff King

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=xmqqsg4313fp.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=nikitabobko@gmail.com \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.