git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Brandon Richardson <brandon1024.br@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Andrei Rybak <rybak.a.v@gmail.com>, Jeff King <peff@peff.net>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v3] commit-tree: utilize parse-options api
Date: Mon, 4 Mar 2019 19:17:34 +0700	[thread overview]
Message-ID: <CACsJy8D60NXksKpYJeDJbYKP6JUmrHEJW8ubMeV12dij+jXKLg@mail.gmail.com> (raw)
In-Reply-To: <20190303200220.30009-1-brandon1024.br@gmail.com>

On Mon, Mar 4, 2019 at 3:02 AM Brandon Richardson
<brandon1024.br@gmail.com> wrote:
>
> Rather than parse options manually, which is both difficult to
> read and error prone, parse options supplied to commit-tree
> using the parse-options api.
>
> It was discovered that the --no-gpg-sign option was documented
> but not implemented in commit 70ddbd7767 (commit-tree: add missing
> --gpg-sign flag, 2019-01-19), and the existing implementation
> would attempt to translate the option as a tree oid. It was also
> suggested earlier in commit 55ca3f99ae (commit-tree: add and document
> --no-gpg-sign, 2013-12-13) that commit-tree should be migrated to
> utilize the parse-options api, which could help prevent mistakes
> like this in the future. Hence this change.

You probably should mention about the extra _() too (e.g. "while at
there, mark more strings for translation") just to be clear it's
intentional.

> diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
> index 12cc403bd7..d4a911acf5 100644
> --- a/builtin/commit-tree.c
> +++ b/builtin/commit-tree.c
> @@ -12,8 +12,14 @@
>  #include "builtin.h"
>  #include "utf8.h"
>  #include "gpg-interface.h"
> +#include "parse-options.h"
> +#include "string-list.h"

Everything looks good, except that I can't find where this
string-list.h is needed. Maybe just try to remove it and build to be
sure.
-- 
Duy

  reply	other threads:[~2019-03-04 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03 20:02 [PATCH v3] commit-tree: utilize parse-options api Brandon Richardson
2019-03-04 12:17 ` Duy Nguyen [this message]
2019-03-04 18:46   ` Brandon Richardson

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=CACsJy8D60NXksKpYJeDJbYKP6JUmrHEJW8ubMeV12dij+jXKLg@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=brandon1024.br@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rybak.a.v@gmail.com \
    --cc=sunshine@sunshineco.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).