git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
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, 6 Apr 2021 18:47:24 -0400	[thread overview]
Message-ID: <YGzk/C9V3jkPr3xo@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqsg4313fp.fsf@gitster.g>

On Tue, Apr 06, 2021 at 02:57:46PM -0700, Junio C Hamano wrote:

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

Yes. We already have gone through this with other options (e.g.,
diff.algorithm). I would be happy if somebody wanted to handle the
complete set. But I am also OK with stumbling towards completeness, as
people who care about a particular option plumb it through.

-Peff

      reply	other threads:[~2021-04-06 22:47 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
2021-04-06 22:47     ` Jeff King [this message]

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=YGzk/C9V3jkPr3xo@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nikitabobko@gmail.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).