git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Shawn Landden <shawn@git.icu>, git@vger.kernel.org
Subject: Re: allow a differn't diff.context config for git format-patch
Date: Tue, 23 Apr 2019 12:45:17 +0900	[thread overview]
Message-ID: <xmqqftq95qr6.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190423030648.GA6344@sigill.intra.peff.net> (Jeff King's message of "Mon, 22 Apr 2019 23:06:49 -0400")

Jeff King <peff@peff.net> writes:

> ... I don't think it would be
> too big a problem for format-patch to learn some options to configure
> its diffs. We already have some options in format.* for various things.

I am not sure; diff.context is rather special in that the variable
behind it belongs to the diff layer and is set via diff_config that
is called by diff_ui_config that in turn is called by log_config
which is called by format_config.

If we want to say "format.context" trumps "diff.config", then a new
internal variable to receive the value of the variable must be
invented and after the config gets read, cmd_format_patch() needs to
do something silly like this:

                git_config(git_format_config, NULL);
        +	if (format_context != -1)
        +		diff_default_context = format_context;
                repo_init_revisions(the_repository, &rev, prefix);

committing layering violation by exposing diff_default_context
variable.


  reply	other threads:[~2019-04-23  3:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-14 21:48 allow a differn't diff.context config for git format-patch Shawn Landden
2019-04-23  3:06 ` Jeff King
2019-04-23  3:45   ` Junio C Hamano [this message]
2019-04-23  3:55     ` Jeff King
2019-05-12 13:21       ` Shawn Landden
     [not found]       ` <CA+49okrzR7GAZCFDfaoJ9pvK+o=DVWoZ9vA6YL=u72s_rnjDxQ@mail.gmail.com>
2019-05-14  9:54         ` Jeff King
2019-05-14  9:57           ` 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

  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=xmqqftq95qr6.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=shawn@git.icu \
    /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).