git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Soukaina NAIT HMID <nhsoukaina@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [add-default-config 1/5] add --color option to git config
Date: Sun, 12 Nov 2017 15:22:46 +0000	[thread overview]
Message-ID: <20171112152245.fetxqionsqqg2obp@sigill.intra.peff.net> (raw)
In-Reply-To: <0102015fb0bf2f74-cb456171-fe65-4d83-8784-b553c7c9e584-000000@eu-west-1.amazonses.com>

On Sun, Nov 12, 2017 at 03:00:40PM +0000, Soukaina NAIT HMID wrote:

> From: Soukaina NAIT HMID <snaithmid@bloomberg.net>
> 
> Signed-off-by: Soukaina NAIT HMID <snaithmid@bloomberg.net>

Hi Soukaina, and welcome to the list! Thanks for working on these
patches.

I'll go through and make inline comments on your patches, but first a
few overall issues:

 - you have five patches in your series, some of which are backing out
   changes made by the other patches. It's normal in the Git community
   to use "git rebase -i" to squash down your changes to "clean" patches
   that form a sequence. For your topic, I'd expect to see two patches
   in the end:

     1. Add a "config --default" option (and documentation and tests).

     2. Add a "config --color" type (and documentation and tests).

 - your commit messages are mostly empty. :) This is a good place to
   describe the motivation for the patch, document any design decisions,
   discuss any alternatives, etc. This is helpful for reviewers to
   understand what you're trying to achieve, and for people later who
   discover your commit from "git log".

> diff --git a/builtin/config.c b/builtin/config.c
> index d13daeeb55927..124a682d50fa8 100644
> --- a/builtin/config.c
> +++ b/builtin/config.c
> @@ -80,6 +80,7 @@ static struct option builtin_config_options[] = {
>  	OPT_BIT(0, "int", &types, N_("value is decimal number"), TYPE_INT),
>  	OPT_BIT(0, "bool-or-int", &types, N_("value is --bool or --int"), TYPE_BOOL_OR_INT),
>  	OPT_BIT(0, "path", &types, N_("value is a path (file or directory name)"), TYPE_PATH),
> +	OPT_BIT(0, "color", &actions, N_("find the color configured"), ACTION_GET_COLOR),

I think we'd want this "--color" to actually be a type, not a separate
action. I.e., so that it behaves --int, --bool, etc. Part of the goal
(well, my goal) was to make accessing color config more like other types
of config.

-Peff

  parent reply	other threads:[~2017-11-12 15:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 15:00 [add-default-config 1/5] add --color option to git config Soukaina NAIT HMID
2017-11-12 15:00 ` [add-default-config 4/5] add defaults for path/int/bool Soukaina NAIT HMID
2017-11-12 15:45   ` Jeff King
2017-11-12 15:00 ` [add-default-config 5/5] fix return code on default + add tests Soukaina NAIT HMID
2017-11-12 16:04   ` Jeff King
2017-11-12 15:00 ` [add-default-config 3/5] add same test for new command format with --default and --color Soukaina NAIT HMID
2017-11-12 15:37   ` Jeff King
2017-11-12 15:00 ` [add-default-config 2/5] adding default to color Soukaina NAIT HMID
2017-11-12 15:37   ` Jeff King
2017-11-13  3:40     ` Junio C Hamano
2017-11-13  3:55       ` Jeff King
2017-11-12 15:22 ` Jeff King [this message]
2017-11-28 21:43 ` [add-default-config] add --default option to git config Soukaina NAIT HMID
2017-12-02 20:33   ` Philip Oakley

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=20171112152245.fetxqionsqqg2obp@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=nhsoukaina@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).