# [Outreachy][RFC]: teach the '-e' option for git notes sub command

3 messages from 2024-10-17 to 2024-10-19. Participants: Abraham Samuel, Patrick Steinhardt.
Thread: https://gitlist.dev/t/62352

## Abraham Samuel, 2024-10-17 09:43

Subject: [Outreachy][RFC]: teach the '-e' option for git notes sub command
Message-ID: <CAO1n886ZRRD6m_GQsYz-AGwpbkDB4S+0+hRx-9mmN=6iJ1o7Mg@mail.gmail.com>
URL: https://gitlist.dev/e/CAO1n886ZRRD6m_GQsYz-AGwpbkDB4S%2B0%2BhRx-9mmN%3D6iJ1o7Mg%40mail.gmail.com

```
Hello,

I was searching through the list for a #leftoverbits project that I could do.
I then came across this conversation

https://public-inbox.org/git/xmqqed7bhobk.fsf@gitster.g/.

The suggestion was made to make messages seeded with -m/-F to the "git
notes add" subcommand be editable when the "-e" option is passed to
it. This allows modifying the message by opening the default editor to
enable the message to be edited before adding the note.

I have checked the current version of git and there is no "-e" option
implemented.
I am also studying similar implementations for git commit and git tag
to help me understand the implementation.
However, I would like to know if I am permitted to go ahead and if
yes, I would appreciate pointers to other resources to aid me in
implementing it.

Thanks
Abraham.

```

## Patrick Steinhardt, 2024-10-17 12:07

Subject: Re: [Outreachy][RFC]: teach the '-e' option for git notes sub command
Message-ID: <ZxD-FCW9drBpC4c5@pks.im>
URL: https://gitlist.dev/e/ZxD-FCW9drBpC4c5%40pks.im
In-Reply-To: <CAO1n886ZRRD6m_GQsYz-AGwpbkDB4S+0+hRx-9mmN=6iJ1o7Mg@mail.gmail.com>

```
On Thu, Oct 17, 2024 at 10:43:56AM +0100, Abraham Samuel wrote:
> Hello,
> 
> I was searching through the list for a #leftoverbits project that I could do.
> I then came across this conversation
> 
> https://public-inbox.org/git/xmqqed7bhobk.fsf@gitster.g/.
> 
> The suggestion was made to make messages seeded with -m/-F to the "git
> notes add" subcommand be editable when the "-e" option is passed to
> it. This allows modifying the message by opening the default editor to
> enable the message to be edited before adding the note.
> 
> I have checked the current version of git and there is no "-e" option
> implemented.
> I am also studying similar implementations for git commit and git tag
> to help me understand the implementation.
> However, I would like to know if I am permitted to go ahead and if
> yes, I would appreciate pointers to other resources to aid me in
> implementing it.

You don't have to ask for permission in order to fix issues. So please,
feel free to go ahead.

I assume you've already read through the common documents that we have
in Documentation/, like MyFirstContribution.txt et al. Other than that
I'd recommend to have a look at how this is implemented in preexisting
commands, but you already had that idea yourself. You could also dig
into the history of how those `-e` options have been introduced for
these commands, which might give you an idea what was required to be
done for them, and you'll likely have to do something similar for `git
notes add`.

I don't really think we have any other resources that would be helpful
in this context.

Patrick

```

## Abraham Samuel, 2024-10-19 09:13

Subject: Re: [Outreachy][RFC]: teach the '-e' option for git notes sub command
Message-ID: <CAO1n884Kd5v7A--=895xAc0nHqQtVsCcJn5ad-4pdGhQv1SNCA@mail.gmail.com>
URL: https://gitlist.dev/e/CAO1n884Kd5v7A--%3D895xAc0nHqQtVsCcJn5ad-4pdGhQv1SNCA%40mail.gmail.com
In-Reply-To: <ZxD-FCW9drBpC4c5@pks.im>

```
On Thu, Oct 17, 2024 at 1:07 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Thu, Oct 17, 2024 at 10:43:56AM +0100, Abraham Samuel wrote:
> > Hello,
> >
> > I was searching through the list for a #leftoverbits project that I could do.
> > I then came across this conversation
> >
> > https://public-inbox.org/git/xmqqed7bhobk.fsf@gitster.g/.
> >
> > The suggestion was made to make messages seeded with -m/-F to the "git
> > notes add" subcommand be editable when the "-e" option is passed to
> > it. This allows modifying the message by opening the default editor to
> > enable the message to be edited before adding the note.
> >
> > I have checked the current version of git and there is no "-e" option
> > implemented.
> > I am also studying similar implementations for git commit and git tag
> > to help me understand the implementation.
> > However, I would like to know if I am permitted to go ahead and if
> > yes, I would appreciate pointers to other resources to aid me in
> > implementing it.
>
> You don't have to ask for permission in order to fix issues. So please,
> feel free to go ahead.
>
> I assume you've already read through the common documents that we have
> in Documentation/, like MyFirstContribution.txt et al.Other than that

Hello Patrick,
Thank you very much.
I have previously read the Documents you referenced and already done
the microProject
https://lore.kernel.org/git/pull.1811.v4.git.1728498122419.gitgitgadget@gmail.com/
which has been integrated into master and closed.

> I'd recommend to have a look at how this is implemented in preexisting
> commands, but you already had that idea yourself. You could also dig
> into the history of how those `-e` options have been introduced for
> these commands, which might give you an idea what was required to be
> done for them, and you'll likely have to do something similar for `git
> notes add`.
>
> I don't really think we have any other resources that would be helpful
> in this context.
>
> Patrick

I have submitted a new patch with respect to this.
https://lore.kernel.org/git/pull.1817.git.1729296853800.gitgitgadget@gmail.com/

Thanks for your time.

```
