From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Pranit Bauva <pranit.bauva@gmail.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>, git@vger.kernel.org
Subject: Re: [PATCH v7] commit: add a commit.verbose config variable
Date: Tue, 15 Mar 2016 12:31:26 +0100 [thread overview]
Message-ID: <1458041486-7044-1-git-send-email-szeder@ira.uka.de> (raw)
In-Reply-To: <010201537710be08-f31428b3-5df3-4694-8c4a-0e8f058131b3-000000@eu-west-1.amazonses.com>
> Add commit.verbose configuration variable as a convenience for those
> who always prefer --verbose.
>
> Helped-by: Eric Sunshine <sunshine@sunshineco.com>
> Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
>
> ---
> The previous versions of this patch are:
> - [v6] $gmane/288811
> - [v5] $gmane/288728
> - [v4] $gmane/288652
> - [v3] $gmane/288634
> - [v2] $gmane/288569
> - [v1] $gmane/287540
>
> The changes with respect to the last version are :
> - Add '-c commit.verbose true'
>
> It is a mistake on my part. I was a bit sleepy.
> ---
> Documentation/config.txt | 4 ++++
> Documentation/git-commit.txt | 3 ++-
> builtin/commit.c | 4 ++++
> t/t7507-commit-verbose.sh | 29 +++++++++++++++++++++++++++++
> 4 files changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 01cca0a..9b93f6c 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1110,6 +1110,10 @@ commit.template::
> "`~/`" is expanded to the value of `$HOME` and "`~user/`" to the
> specified user's home directory.
>
> +commit.verbose::
> + A boolean to specify whether to always include the verbose option
> + with `git commit`. See linkgit:git-commit[1].
> +
You made 'commit.verbose' a boolean, so either verbose or not, ...
> credential.helper::
> Specify an external helper to be called when a username or
> password credential is needed; the helper may consult external
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index 9ec6b3c..d474226 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -290,7 +290,8 @@ configuration variable documented in linkgit:git-config[1].
> what changes the commit has.
> Note that this diff output doesn't have its
> lines prefixed with '#'. This diff will not be a part
> - of the commit message.
> + of the commit message. See the `commit.verbose` configuration
> + variable in linkgit:git-config[1].
> +
> If specified twice, show in addition the unified diff between
> what would be committed and the worktree files, i.e. the unstaged
... but note these context lines telling us that --verbose can be
specified not just once but twice (and who knows what the future may
bring). This raises some not entirely rhetorical questions:
- What does 'git config commit.verbose true && git commit --verbose'
do?
- Should 'commit.verbose' only care about the convenience of those
who always prever '--verbose', or about those who like '-v -v',
too?
- If the latter, i.e. 'commit.verbose' should cater for '-v -v' as
well, then what should 'git config commit.verbose "<verbose level
two>" && git commit --verbose' do?
> diff --git a/builtin/commit.c b/builtin/commit.c
> index b3bd2d4..e0b96231 100644
> --- a/builtin/commit.c
> +++ b/builtin/commit.c
> @@ -1505,6 +1505,10 @@ static int git_commit_config(const char *k, const char *v, void *cb)
> sign_commit = git_config_bool(k, v) ? "" : NULL;
> return 0;
> }
> + if (!strcmp(k, "commit.verbose")) {
> + verbose = git_config_bool(k, v);
> + return 0;
> + }
>
> status = git_gpg_config(k, v, NULL);
> if (status)
> diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh
> index 2ddf28c..5320f1e 100755
> --- a/t/t7507-commit-verbose.sh
> +++ b/t/t7507-commit-verbose.sh
> @@ -96,4 +96,33 @@ test_expect_success 'verbose diff is stripped out with set core.commentChar' '
> test_i18ngrep "Aborting commit due to empty commit message." err
> '
>
> +test_expect_success 'commit.verbose true and --verbose omitted' '
> + git -c commit.verbose=true commit --amend
> +'
> +
> +test_expect_success 'commit.verbose true and --no-verbose' '
> + test_must_fail git -c commit.verbose=true commit --amend --no-verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --verbose' '
> + git -c commit.verbose=false commit --amend --verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --verbose omitted' '
> + test_must_fail git -c commit.verbose=false commit --amend
> +'
> +
> +test_expect_success 'commit.verbose true and --verbose' '
> + git -c commit.verbose=true commit --amend --verbose
> +'
> +
> +test_expect_success 'commit.verbose false and --no-verbose' '
> + test_must_fail git -c commit.verbose=false commit --amend --no-verbose
> +'
> +
> +test_expect_success 'status ignores commit.verbose=true' '
> + git -c commit.verbose=true status >actual &&
> + ! grep "^diff --git" actual
> +'
> +
> test_done
>
> --
> https://github.com/git/git/pull/205
next prev parent reply other threads:[~2016-03-15 11:31 UTC|newest]
Thread overview: 136+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 21:38 [PATCH v7] commit: add a commit.verbose config variable Pranit Bauva
2016-03-15 11:31 ` SZEDER Gábor [this message]
2016-03-15 19:00 ` Pranit Bauva
2016-03-15 19:24 ` Eric Sunshine
2016-03-15 20:13 ` Pranit Bauva
2016-03-15 20:24 ` Junio C Hamano
2016-03-15 21:09 ` Pranit Bauva
2016-03-15 21:16 ` Junio C Hamano
2016-03-15 21:18 ` Pranit Bauva
2016-03-18 21:19 ` [PATCH v8 1/2] parse-options.c: make OPTION__COUNTUP consider negative values Pranit Bauva
2016-03-18 21:19 ` [PATCH v8 2/2] commit: add a commit.verbose config variable Pranit Bauva
2016-03-20 3:56 ` Eric Sunshine
2016-03-20 11:05 ` Pranit Bauva
2016-03-20 17:34 ` Eric Sunshine
2016-03-20 18:02 ` Pranit Bauva
2016-03-23 19:19 ` Junio C Hamano
2016-03-23 19:23 ` Pranit Bauva
2016-03-23 20:43 ` Junio C Hamano
2016-03-24 8:25 ` [PATCH v9 1/3] parse-options.c: make OPTION__COUNTUP consider negative values Pranit Bauva
2016-03-24 8:25 ` [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script Pranit Bauva
2016-03-24 11:00 ` SZEDER Gábor
2016-03-24 23:57 ` Eric Sunshine
2016-03-25 6:06 ` Pranit Bauva
2016-03-25 6:24 ` Eric Sunshine
2016-03-25 6:55 ` Pranit Bauva
2016-03-25 14:46 ` SZEDER Gábor
2016-03-25 14:50 ` Pranit Bauva
2016-03-25 17:04 ` Eric Sunshine
2016-03-25 18:15 ` Pranit Bauva
2016-03-25 23:06 ` Eric Sunshine
2016-03-24 8:25 ` [PATCH v9 3/3] commit: add a commit.verbose config variable Pranit Bauva
2016-03-24 10:04 ` SZEDER Gábor
2016-03-24 10:22 ` Pranit Bauva
2016-03-24 10:26 ` Pranit Bauva
2016-03-25 0:05 ` Eric Sunshine
2016-03-25 6:15 ` Pranit Bauva
2016-03-24 10:33 ` [PATCH v9 1/3] parse-options.c: make OPTION__COUNTUP consider negative values SZEDER Gábor
2016-03-24 10:38 ` Pranit Bauva
2016-03-24 23:34 ` Eric Sunshine
2016-03-28 18:42 ` Pranit Bauva
2016-03-28 19:03 ` Eric Sunshine
2016-03-26 19:48 ` [PATCH v10 1/3] parse-options.c: make OPTION__COUNTUP understand "unspecified" values Pranit Bauva
2016-03-26 19:48 ` [PATCH v10 2/3] t7507-commit-verbose: store output of grep in a file Pranit Bauva
2016-03-27 3:07 ` Eric Sunshine
2016-03-27 13:27 ` SZEDER Gábor
2016-03-27 13:43 ` Pranit Bauva
2016-03-27 17:27 ` Eric Sunshine
2016-03-27 18:31 ` Pranit Bauva
[not found] ` <CAFZEwPMaZkUi+DvohhVrc_dW_8cdfJsZX-YA_SRWDp021UvDLQ@mail.gmail.com>
2016-03-27 17:03 ` Eric Sunshine
[not found] ` <CAPig+cTFK=HPAtk7MeMQSTccmiaai++3sVn6J_pRcSi+w_4Lng@mail.gmail.com>
2016-03-27 17:05 ` Eric Sunshine
[not found] ` <CAFZEwPMJiCTKszfCAVrzsA+jNHwoHPaXySSD3HyiO=f5AikvZg@mail.gmail.com>
[not found] ` <CAPig+cS3usDDeTMzjqbxqi+k+XbmjawZ0TF20s9-vM6o=Fm=OQ@mail.gmail.com>
2016-03-27 17:08 ` Eric Sunshine
2016-03-26 19:48 ` [PATCH v10 3/3] commit: add a commit.verbose config variable Pranit Bauva
2016-03-27 3:34 ` Eric Sunshine
2016-03-27 7:00 ` Pranit Bauva
2016-03-27 8:17 ` Eric Sunshine
2016-03-27 8:40 ` Pranit Bauva
2016-03-27 11:51 ` SZEDER Gábor
2016-03-27 11:59 ` Pranit Bauva
2016-03-27 12:07 ` SZEDER Gábor
2016-03-27 12:11 ` Pranit Bauva
2016-03-27 16:48 ` Eric Sunshine
2016-03-27 2:45 ` [PATCH v10 1/3] parse-options.c: make OPTION__COUNTUP understand "unspecified" values Eric Sunshine
2016-03-27 6:10 ` Pranit Bauva
2016-03-31 14:45 ` [PATCH v11 1/4] test-parse-options: print quiet as integer Pranit Bauva
2016-03-31 14:45 ` [PATCH v11 4/4] commit: add a commit.verbose config variable Pranit Bauva
2016-03-31 14:45 ` [PATCH v11 3/4] t7507-commit-verbose: improve test coverage by testing number of diffs Pranit Bauva
2016-03-31 18:23 ` Junio C Hamano
2016-03-31 18:42 ` Pranit Bauva
2016-03-31 14:45 ` [PATCH v11 2/4] parse-options.c: make OPTION_COUNTUP respect "unspecified" values Pranit Bauva
2016-03-31 18:41 ` Junio C Hamano
2016-03-31 19:34 ` Pranit Bauva
2016-03-31 20:06 ` Junio C Hamano
2016-03-31 20:41 ` Pranit Bauva
2016-03-31 20:45 ` Junio C Hamano
2016-03-31 18:19 ` [PATCH v11 1/4] test-parse-options: print quiet as integer Junio C Hamano
2016-03-31 18:40 ` Pranit Bauva
2016-04-02 23:33 ` [PATCH v12 1/5] t0040-test-parse-options.sh: fix style issues Pranit Bauva
2016-04-02 23:33 ` [PATCH v12 3/5] parse-options.c: make OPTION_COUNTUP respect "unspecified" values Pranit Bauva
2016-04-03 23:10 ` Eric Sunshine
2016-04-05 15:51 ` Pranit Bauva
2016-04-02 23:33 ` [PATCH v12 4/5] t7507-commit-verbose: improve test coverage by testing number of diffs Pranit Bauva
2016-04-04 0:02 ` Eric Sunshine
2016-04-04 1:05 ` Eric Sunshine
2016-04-05 15:54 ` Pranit Bauva
2016-04-02 23:33 ` [PATCH v12 2/5] test-parse-options: print quiet as integer Pranit Bauva
2016-04-03 21:30 ` Eric Sunshine
2016-04-05 15:39 ` Pranit Bauva
2016-04-06 5:56 ` Eric Sunshine
2016-04-08 11:33 ` Duy Nguyen
2016-04-08 16:52 ` Junio C Hamano
2016-04-02 23:33 ` [PATCH v12 5/5] commit: add a commit.verbose config variable Pranit Bauva
2016-04-04 0:58 ` Eric Sunshine
2016-04-04 23:29 ` Eric Sunshine
2016-04-05 15:58 ` Pranit Bauva
2016-04-03 21:00 ` [PATCH v12 1/5] t0040-test-parse-options.sh: fix style issues Eric Sunshine
2016-04-04 12:45 ` Pranit Bauva
2016-04-04 17:30 ` Eric Sunshine
2016-04-05 5:08 ` Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 1/6] " Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 5/6] t7507-commit-verbose: improve test coverage by testing number of diffs Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 3/6] t0040-parse-options: improve test coverage Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 6/6] commit: add a commit.verbose config variable Pranit Bauva
2016-04-12 21:24 ` Junio C Hamano
2016-04-12 21:28 ` Pranit Bauva
2016-04-12 21:39 ` Junio C Hamano
2016-04-12 22:18 ` Junio C Hamano
2016-04-12 22:25 ` Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values Pranit Bauva
2016-04-09 12:23 ` [PATCH v13 2/6] test-parse-options: print quiet as integer Pranit Bauva
2016-04-12 21:33 ` Junio C Hamano
2016-04-12 22:16 ` Pranit Bauva
2016-04-12 23:11 ` Junio C Hamano
2016-04-12 23:02 ` [PATCH v14 1/6] t0040-test-parse-options.sh: fix style issues Pranit Bauva
2016-04-12 23:02 ` [PATCH v14 3/6] t0040-parse-options: improve test coverage Pranit Bauva
2016-04-13 5:26 ` Eric Sunshine
2016-04-13 8:59 ` Pranit Bauva
2016-04-13 17:27 ` Eric Sunshine
2016-04-25 18:40 ` Pranit Bauva
2016-04-27 17:55 ` Eric Sunshine
2016-04-27 18:16 ` Pranit Bauva
2016-04-12 23:02 ` [PATCH v14 6/6] commit: add a commit.verbose config variable Pranit Bauva
2016-04-13 6:14 ` Eric Sunshine
2016-04-13 9:15 ` Pranit Bauva
2016-04-13 17:44 ` Eric Sunshine
2016-04-12 23:02 ` [PATCH v14 4/6] parse-options.c: make OPTION_COUNTUP respect "unspecified" values Pranit Bauva
2016-04-13 5:56 ` Eric Sunshine
2016-04-13 8:39 ` Pranit Bauva
2016-04-13 17:33 ` Eric Sunshine
2016-04-13 17:43 ` Pranit Bauva
2016-04-13 17:50 ` Eric Sunshine
2016-04-12 23:02 ` [PATCH v14 2/6] test-parse-options: print quiet as integer Pranit Bauva
2016-04-12 23:02 ` [PATCH v14 5/6] t7507-commit-verbose: improve test coverage by testing number of diffs Pranit Bauva
2016-04-13 6:03 ` Eric Sunshine
2016-04-13 9:00 ` Pranit Bauva
2016-03-18 22:59 ` [PATCH v8 1/2] parse-options.c: make OPTION__COUNTUP consider negative values Junio C Hamano
2016-03-19 4:55 ` Pranit Bauva
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=1458041486-7044-1-git-send-email-szeder@ira.uka.de \
--to=szeder@ira.uka.de \
--cc=git@vger.kernel.org \
--cc=pranit.bauva@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).