Re: [PATCH] builtin/merge.c: add the merge.verifysignatures config option

2015-04-22 Thread Junio C Hamano
Bruno Vieira  writes:

This space before your Signed-off-by: line is a place to justify why
this is a good idea.

> Signed-off-by: Bruno Vieira 
> ---
> This seemed to be missing. Sorry if otherwise or if I'm doing something wrong 
> (first time contributing).
>
>  builtin/merge.c | 3 +++
>  1 file changed, 3 insertions(+)

Missing are documentation updates and tests.  Tests musth at least
cover these cases, I think:

 - having configuration set to true without --verify-signatures on
   the command line triggers the check.

 - having configuration set to false without the command line option
   does not trigger the check.

 - having configuration set to true with --no-verify-signatures on
   the command line does not trigger the check.

 - having configuration set to false with --verify-signatures on the
   command line triggers the check.

Thanks.


> diff --git a/builtin/merge.c b/builtin/merge.c
> index 3b0f8f9..5dbc10f 100644
> --- a/builtin/merge.c
> +++ b/builtin/merge.c
> @@ -598,6 +598,9 @@ static int git_merge_config(const char *k, const char *v, 
> void *cb)
>   } else if (!strcmp(k, "merge.defaulttoupstream")) {
>   default_to_upstream = git_config_bool(k, v);
>   return 0;
> + } else if (!strcmp(k, "merge.verifysignatures")) {
> + verify_signatures = git_config_bool(k, v);
> + return 0;
>   } else if (!strcmp(k, "commit.gpgsign")) {
>   sign_commit = git_config_bool(k, v) ? "" : NULL;
>   return 0;
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] builtin/merge.c: add the merge.verifysignatures config option

2015-04-21 Thread Bruno Vieira
Signed-off-by: Bruno Vieira 
---
This seemed to be missing. Sorry if otherwise or if I'm doing something wrong 
(first time contributing).

 builtin/merge.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/builtin/merge.c b/builtin/merge.c
index 3b0f8f9..5dbc10f 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -598,6 +598,9 @@ static int git_merge_config(const char *k, const char *v, 
void *cb)
} else if (!strcmp(k, "merge.defaulttoupstream")) {
default_to_upstream = git_config_bool(k, v);
return 0;
+   } else if (!strcmp(k, "merge.verifysignatures")) {
+   verify_signatures = git_config_bool(k, v);
+   return 0;
} else if (!strcmp(k, "commit.gpgsign")) {
sign_commit = git_config_bool(k, v) ? "" : NULL;
return 0;
-- 
2.3.2 (Apple Git-55)

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html