<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-notes.txt, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-10-21T19:52:48Z</updated>
<entry>
<title>notes: teach the -e option to edit messages in editor</title>
<updated>2024-10-21T19:52:48Z</updated>
<author>
<name>Abraham Samuel Adekunle</name>
<email>abrahamadekunle50@gmail.com</email>
</author>
<published>2024-10-21T18:12:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dab0b9e176d64f7687029b176d96eddfbf74db64'/>
<id>urn:sha1:dab0b9e176d64f7687029b176d96eddfbf74db64</id>
<content type='text'>
Notes can be added to a commit using:
	- "-m" to provide a message on the command line.
	- -C to copy a note from a blob object.
	- -F to read the note from a file.
When these options are used, Git does not open an editor,
it simply takes the content provided via these options and
attaches it to the commit as a note.

Improve flexibility to fine-tune the note before finalizing it
by allowing the messages to be prefilled in the editor and edited
after the messages have been provided through -[mF].

Signed-off-by: Abraham Samuel Adekunle &lt;abrahamadekunle50@gmail.com&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
</content>
</entry>
<entry>
<title>doc: enforce dashes in placeholders</title>
<updated>2023-12-26T19:06:55Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2023-12-25T21:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2162f9f6f86df4f49c3a716b5beb3952104ea8b8'/>
<id>urn:sha1:2162f9f6f86df4f49c3a716b5beb3952104ea8b8</id>
<content type='text'>
The CodingGuidelines documents stipulates that multi-word placeholders
are to be separated by dashes, not underscores nor spaces.

Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes doc: tidy up `--no-stripspace` paragraph</title>
<updated>2023-08-16T18:37:25Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2023-08-16T14:24:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3a6e1ad80bdf5d09cb484e77cc4bfffdd9a15bdf'/>
<id>urn:sha1:3a6e1ad80bdf5d09cb484e77cc4bfffdd9a15bdf</id>
<content type='text'>
Where we document the `--no-stripspace` option, remove a superfluous
"For" to fix the grammar. Mark option names and command names using
`backticks` to set them in monospace.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes doc: split up run-on sentences</title>
<updated>2023-08-16T18:36:36Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2023-08-16T14:24:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=95b6ae9d747ed52912dec95fe397b11f0a5383ec'/>
<id>urn:sha1:95b6ae9d747ed52912dec95fe397b11f0a5383ec</id>
<content type='text'>
When commit c4e2aa7d45 (notes.c: introduce "--[no-]stripspace" option,
2023-05-27) mentioned the new `--no-stripspace` in the documentation for
`-m` and `-F`, it created run-on sentences. It also used slightly
different language in the two sections for no apparent reason. Split the
sentences in two to improve readability, and while touching the two
sites, make them more similar.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: introduce "--no-separator" option</title>
<updated>2023-06-21T15:51:01Z</updated>
<author>
<name>Teng Long</name>
<email>dyroneteng@gmail.com</email>
</author>
<published>2023-05-27T07:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d6a31646491bf4f8b1166d7182c6d92e2414cf8'/>
<id>urn:sha1:3d6a31646491bf4f8b1166d7182c6d92e2414cf8</id>
<content type='text'>
Sometimes, the user may want to add or append multiple notes
without any separator to be added between them.

Disscussion:

  https://public-inbox.org/git/3f86a553-246a-4626-b1bd-bacd8148318a@app.fastmail.com/

Signed-off-by: Teng Long &lt;dyroneteng@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes.c: introduce "--[no-]stripspace" option</title>
<updated>2023-06-21T15:51:01Z</updated>
<author>
<name>Teng Long</name>
<email>dyroneteng@gmail.com</email>
</author>
<published>2023-05-27T07:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4e2aa7d45fadf89f6c7d7cda109eccc735a65f8'/>
<id>urn:sha1:c4e2aa7d45fadf89f6c7d7cda109eccc735a65f8</id>
<content type='text'>
This commit introduces a new option "--[no-]stripspace" to git notes
append, git notes edit, and git notes add. This option allows users to
control whether the note message need to stripped out.

For the consideration of backward compatibility, let's look at the
behavior about "stripspace" in "git notes" command:

1. "Edit Message" case: using the default editor to edit the note
message.

    In "edit" case, the edited message will always be stripped out, the
    implementation which can be found in the "prepare_note_data()". In
    addition, the "-c" option supports to reuse an existing blob as a
    note message, then open the editor to make a further edition on it,
    the edited message will be stripped.

    This commit doesn't change the default behavior of "edit" case by
    using an enum "notes_stripspace", only when "--no-stripspace" option
    is specified, the note message will not be stripped out. If you do
    not specify the option or you specify "--stripspace", clearly, the
    note message will be stripped out.

2. "Assign Message" case: using the "-m"/"-F"/"-C" option to specify the
note message.

    In "assign" case, when specify message by "-m" or "-F", the message
    will be stripped out by default, but when specify message by "-C",
    the message will be copied verbatim, in other word, the message will
    not be stripped out. One more thing need to note is "the order of
    the options matter", that is, if you specify "-C" before "-m" or
    "-F", the reused message by "-C" will be stripped out together,
    because everytime concat "-m" or "-F" message, the concated message
    will be stripped together. Oppositely, if you specify "-m" or "-F"
    before "-C", the reused message by "-C" will not be stripped out.

    This commit doesn't change the default behavior of "assign" case by
    extending the "stripspace" field in "struct note_msg", so we can
    distinguish the different behavior of "-m"/"-F" and "-C" options
    when we need to parse and concat the message.

Signed-off-by: Teng Long &lt;dyroneteng@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes.c: introduce '--separator=&lt;paragraph-break&gt;' option</title>
<updated>2023-06-21T15:51:00Z</updated>
<author>
<name>Teng Long</name>
<email>dyroneteng@gmail.com</email>
</author>
<published>2023-05-27T07:57:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=90bc19b3aede4ebe8b1044541373ac970804cde4'/>
<id>urn:sha1:90bc19b3aede4ebe8b1044541373ac970804cde4</id>
<content type='text'>
When adding new notes or appending to an existing notes, we will
insert a blank line between the paragraphs, like:

     $ git notes add -m foo -m bar
     $ git notes show HEAD
     foo

     bar

The default behavour sometimes is not enough, the user may want
to use a custom delimiter between paragraphs, like when
specifying '-m', '-F', '-C', '-c' options. So this commit
introduce a new '--separator' option for 'git notes add' and
'git notes append', for example when executing:

    $ git notes add -m foo -m bar --separator="-"
    $ git notes show HEAD
    foo
    -
    bar

a newline is added to the value given to --separator if it
does not end with one already. So when executing:

      $ git notes add -m foo -m bar --separator="-"
and
      $ export LF="
      "
      $ git notes add -m foo -m bar --separator="-$LF"

Both the two exections produce the same result.

The reason we use a "strbuf" array to concat but not "string_list", is
that the binary file content may contain '\0' in the middle, this will
cause the corrupt result if using a string to save.

Signed-off-by: Teng Long &lt;dyroneteng@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes docs: de-duplicate and combine configuration sections</title>
<updated>2022-09-07T16:46:06Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-09-07T08:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5bd277e2e2059840cda807de511f02c291e039c9'/>
<id>urn:sha1:5bd277e2e2059840cda807de511f02c291e039c9</id>
<content type='text'>
Combine the various "notes" configuration sections spread across
Documentation/config/notes.txt and Documentation/git-notes.txt to live
in the former, and to be included in the latter.

We'll now forward link from "git notes" to the "CONFIGURATION" section
below, rather than to "git-config(1)" when discussing configuration
variables that are (also) discussed in that section.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Reviewed-by: Matheus Tavares &lt;matheus.bernardino@usp.br&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs: improve the example that illustrates git-notes path names</title>
<updated>2020-08-03T19:40:09Z</updated>
<author>
<name>Noam Yorav-Raphael</name>
<email>noamraph@gmail.com</email>
</author>
<published>2020-08-03T19:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=de20baf2c95f4a92dfcf94e01f37d93e7868397c'/>
<id>urn:sha1:de20baf2c95f4a92dfcf94e01f37d93e7868397c</id>
<content type='text'>
Make it clear that the filename has only the rest of the object ID,
not the entirety of it.

Signed-off-by: Noam Yorav-Raphael &lt;noamraph@gmail.com&gt;
Acked-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>notes: fix minimum number of parameters to "copy" subcommand</title>
<updated>2019-10-18T00:43:10Z</updated>
<author>
<name>Doan Tran Cong Danh</name>
<email>congdanhqx@gmail.com</email>
</author>
<published>2019-10-16T05:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d58deb9c4e151d4d8380cd14223391ce0d58f588'/>
<id>urn:sha1:d58deb9c4e151d4d8380cd14223391ce0d58f588</id>
<content type='text'>
The builtin/notes.c::copy() function is prepared to handle either
one or two arguments given from the command line; when one argument
is given, to-obj defaults to HEAD.

bbb1b8a3 ("notes: check number of parameters to "git notes copy"",
2010-06-28) tried to make sure "git notes copy" (with *no* other
argument) does not dereference NULL by checking the number of
parameters, but it incorrectly insisted that we need two arguments,
instead of either one or two.  This disabled the defaulting to-obj
to HEAD.

Correct it.

Signed-off-by: Doan Tran Cong Danh &lt;congdanhqx@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
