git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git add -p doesn't respect diff.context
@ 2016-01-20  6:35 Mike Hommey
  2016-02-04  8:02 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Hommey @ 2016-01-20  6:35 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-04  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20  6:35 git add -p doesn't respect diff.context Mike Hommey
2016-02-04  8:02 ` Jeff King

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