git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Subject: git add -p doesn't respect diff.context
Date: Wed, 20 Jan 2016 15:35:23 +0900	[thread overview]
Message-ID: <20160120063523.GA26490@glandium.org> (raw)

Hi,

When doing git add -p, the default of 3 context lines is used, ignoring
the diff.context.

git add -p is using git-diff-files, and diff.context is being read in
git_diff_ui_config, so the comment above that function applies:
/*
 * These are to give UI layer defaults.
 * The core-level commands such as git-diff-files should
 * never be affected by the setting of diff.renames
 * the user happens to have in the configuration file.
 */

I guess the question is whether it's diff-files or add -p that should
honor diff.context. Or should it have its own separate config?

Mike

             reply	other threads:[~2016-01-20  6:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  6:35 Mike Hommey [this message]
2016-02-04  8:02 ` git add -p doesn't respect diff.context 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=20160120063523.GA26490@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).