Skip to content

Tags: dyrone/git

Tags

notes-20230418

Toggle notes-20230418's commit message
notes.c: introduce "--[no]-stripspace" option

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.

The default value of this option is "true", which means the note
message will be stripped out by default. If the user wants to
preserve the note message, can use "--no-stripspace" option.

There are two reasons why we need this option:

1. The note message is stripped out by default, which is not
   consistent with the behavior of "git commit" command. This
   may confuse users.

2. The note message is stripped out by default, which is not
    consistent with the behavior of "git notes show" command.
    This may confuse users.

Signed-off-by: Teng Long <[email protected]>

notes-20230417

Toggle notes-20230417's commit message
notes.c: introduce '--separator=<paragraph-break>' option

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 | cat
     foo

     bar

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

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

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

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

Running A and B produces the same result.

Signed-off-by: Teng Long <[email protected]>

git-notes-blank-line

Toggle git-notes-blank-line's commit message
notes.c: introduce '--separator=<paragraph-break>' option

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 | cat
     foo

     bar

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

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

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

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

Running A and B produces the same result.

Signed-off-by: Teng Long <[email protected]>

v2.40.0

Toggle v2.40.0's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.40

v2.40.0-rc2

Toggle v2.40.0-rc2's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.40-rc2

v2.40.0-rc1

Toggle v2.40.0-rc1's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.40-rc1

v2.40.0-rc0

Toggle v2.40.0-rc0's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.40-rc0

v2.39.2

Toggle v2.39.2's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.39.2

v2.38.4

Toggle v2.38.4's commit message

Verified

This tag was signed with the committer’s verified signature.
gitster Junio C Hamano
Git 2.38.4