From: Eric Sunshine <sunshine@sunshineco.com>
To: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCHv2] tag: add --edit option
Date: Thu, 1 Feb 2018 20:29:00 -0500 [thread overview]
Message-ID: <CAPig+cT8vKyhq6DvFMz-0CPRO-Y7R4EE_JhN6yuiSUNXW8-Yww@mail.gmail.com> (raw)
In-Reply-To: <e99947cf-93ba-9376-f059-7f6a369d3ad5@suse.com>
On Thu, Feb 1, 2018 at 12:21 PM, Nicolas Morey-Chaisemartin
<nmoreychaisemartin@suse.com> wrote:
> Add a --edit option whichs allows modifying the messages provided by -m or -F,
> the same way git commit --edit does.
>
> Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
> ---
> Changes since v1:
> - Fix usage string
> - Use write_script to generate editor
> - Rename editor to fakeeditor to match the other tests in the testsuite
Thanks for explaining what changed since the previous attempt. It is
also helpful for reviewers if you include a reference to the previous
iteration, like this:
https://public-inbox.org/git/450140f4-d410-4f1a-e5c1-c56d345a7f7c@suse.com/T/#u
Cc:'ing reviewers of previous iterations is also good etiquette when
submitting a new version.
> - I'll post another series to fix the misleading messages in both commit.c and tag.c when launch_editor fails
Typically, it's easier on Junio, from a patch management standpoint,
if you submit all these related patches as a single series.
Alternately, if you do want to submit those changes separately, before
the current patch lands in "master", be sure to mention atop which
patch (this one) the additional patch(es) should live. Thanks.
> diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
> @@ -167,6 +167,12 @@ This option is only applicable when listing tags without annotation lines.
> +-e::
> +--edit::
> + The message taken from file with `-F` and command line with
> + `-m` are usually used as the tag message unmodified.
> + This option lets you further edit the message taken from these sources.
You probably ought to add this new option to the command synopsis. In
the git-commit man page, the synopsis mentions only '-e' (not --edit),
so perhaps this man page could mirror that one. (Sorry for not
noticing this earlier.)
> diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
> @@ -452,6 +452,21 @@ test_expect_success \
> +get_tag_header annotated-tag-edit $commit commit $time >expect
> +echo "An edited message" >>expect
Modern practice is to perform these "expect" setup actions (and all
other actions) within tests themselves rather than outside of tests.
However, consistency also has value, and since this test script is
filled with this sort of stylized "expect" setup already, this may be
fine, and probably not worth a re-roll. (A "modernization" patch by
someone can come later if warranted.)
> +test_expect_success 'set up editor' '
> + write_script fakeeditor <<-\EOF
> + sed -e "s/A message/An edited message/g" <"$1" >"$1-"
> + mv "$1-" "$1"
> + EOF
> +'
next prev parent reply other threads:[~2018-02-02 1:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 17:21 [PATCHv2] tag: add --edit option Nicolas Morey-Chaisemartin
2018-02-02 1:29 ` Eric Sunshine [this message]
2018-02-02 7:15 ` Nicolas Morey-Chaisemartin
2018-02-02 9:57 ` Eric Sunshine
2018-02-02 16:48 ` Nicolas Morey-Chaisemartin
2018-02-02 19:16 ` Eric Sunshine
2018-02-04 15:57 ` Nicolas Morey-Chaisemartin
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=CAPig+cT8vKyhq6DvFMz-0CPRO-Y7R4EE_JhN6yuiSUNXW8-Yww@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=nmoreychaisemartin@suse.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).