Re: [PATCH] notes: teach the -e option to edit messages in editor
- From
Samuel Abraham <abrahamadekunle50@gmail.com>
- Date
- Oct 19, 2024, 11:58 UTC
- Message-ID
- <CADYq+fYCAJx-FsPnn+RpTTFZ=hWucyC-gj=tq=d+7R2YiYrKdw@mail.gmail.com>
- In-Reply-To
- <0e393f0e-aa4b-479f-bedf-f4dad2256d02@app.fastmail.com>
On Sat, Oct 19, 2024 at 12:37 PM Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:
Show 43 quoted lines
>
> On Sat, Oct 19, 2024, at 02:14, Samuel Adekunle Abraham via GitGitGadget wrote:
> > builtin/notes.c | 4 ++++
> > t/t3301-notes.sh | 29 +++++++++++++++++++++++++++++
> > 2 files changed, 33 insertions(+)
>
> The documentation should be updated:
>
> Documentation/git-notes.txt
>
> > diff --git a/builtin/notes.c b/builtin/notes.c
> > index 8c26e455269..02cdfdf1c9d 100644
> > --- a/builtin/notes.c
> > +++ b/builtin/notes.c
> > @@ -489,6 +489,8 @@ static int add(int argc, const char **argv, const
> > char *prefix)
> > OPT_CALLBACK_F('c', "reedit-message", &d, N_("object"),
> > N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
> > parse_reedit_arg),
> > + OPT_BOOL('e', "edit", &d.use_editor,
> > + N_("edit note message in editor")),
>
> The `add` subcommand does what I expect it to after some testing.
>
> > OPT_CALLBACK_F('C', "reuse-message", &d, N_("object"),
> > N_("reuse specified note object"), PARSE_OPT_NONEG,
> > parse_reuse_arg),
> > @@ -667,6 +669,8 @@ static int append_edit(int argc, const char **argv,
> > const char *prefix)
> > OPT_CALLBACK_F('C', "reuse-message", &d, N_("object"),
> > N_("reuse specified note object"), PARSE_OPT_NONEG,
> > parse_reuse_arg),
> > + OPT_BOOL('e', "edit", &d.use_editor,
> > + N_("edit note message in editor")),
> > OPT_BOOL(0, "allow-empty", &allow_empty,
> > N_("allow storing empty note")),
> > OPT_CALLBACK_F(0, "separator", &separator,
>
> Likewise for the `append` subcommand.
>
> --
> Kristoffer Haugsbakk
>Okay, I will do that. Thank you very much, Kristoffer.