git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de, plroskin@gmail.com,
	Junio C Hamano <gitster@pobox.com>,
	Elijah Newren <newren@gmail.com>
Subject: [PATCH 1/2] am: pay attention to user-defined context size
Date: Fri, 20 Dec 2019 18:53:55 +0000	[thread overview]
Message-ID: <e1870f3fee8be6ebbecdd618ae1803afb878e67e.1576868036.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.680.git.git.1576868036.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

am previously only checked gpg-related config options and the default
config options while ignoring any diff-related options.  This meant that
when users tried to set diff.context to something larger than the
default value of 3, it was ignored.  Pay attention to the diff settings
too.

In combination with commit 09ac67a1839e ("format-patch: move
git_config() before repo_init_revisions()", 2019-12-09), which is part
of the dl/format-patch-notes-config-fixup topic, this fixes
   git -c diff.context=5 rebase
to actually use five lines of context.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 builtin/am.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/am.c b/builtin/am.c
index 8181c2aef3..d4d131b7ee 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -2136,7 +2136,7 @@ static int git_am_config(const char *k, const char *v, void *cb)
 	if (status)
 		return status;
 
-	return git_default_config(k, v, NULL);
+	return git_diff_ui_config(k, v, NULL);
 }
 
 int cmd_am(int argc, const char **argv, const char *prefix)
-- 
gitgitgadget


  reply	other threads:[~2019-12-20 18:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 18:53 [PATCH 0/2] Rebase am fixes Elijah Newren via GitGitGadget
2019-12-20 18:53 ` Elijah Newren via GitGitGadget [this message]
2019-12-20 19:28   ` [PATCH 1/2] am: pay attention to user-defined context size Junio C Hamano
2019-12-20 19:38     ` Elijah Newren
2019-12-20 22:22       ` Elijah Newren
2019-12-20 22:34         ` Junio C Hamano
2019-12-21  5:37           ` Elijah Newren
2019-12-20 18:53 ` [PATCH 2/2] rebase: fix saving of --signoff state for am-based rebases Elijah Newren via GitGitGadget
2019-12-20 19:29   ` Junio C Hamano
2020-01-01 22:01     ` Johannes Schindelin
2023-09-03 21:29 [PATCH 1/2] am: pay attention to user-defined context size tony raynes

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=e1870f3fee8be6ebbecdd618ae1803afb878e67e.1576868036.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=plroskin@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.
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).