diff options
author | Johan Herland <johan@herland.net> | 2009-10-09 12:22:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-10-19 18:59:43 -0700 |
commit | d9246d4303f441c0e30614cd3a97a80fbe9354b6 (patch) | |
tree | 9222a4d701367e3be3027e2e0d4a3cfe6bd372eb /Documentation | |
parent | a5b0c24f3e9a29f8fe496f49db82f2e3f1b687ce (diff) | |
download | git-d9246d4303f441c0e30614cd3a97a80fbe9354b6.tar.gz git-d9246d4303f441c0e30614cd3a97a80fbe9354b6.tar.xz |
Teach "-m <msg>" and "-F <file>" to "git notes edit"
The "-m" and "-F" options are already the established method
(in both git-commit and git-tag) to specify a commit/tag message
without invoking the editor. This patch teaches "git notes edit"
to respect the same options for specifying a notes message without
invoking the editor.
Multiple "-m" and/or "-F" options are concatenated as separate
paragraphs.
The patch also updates the "git notes" documentation and adds
selftests for the new functionality. Unfortunately, the added
selftests include a couple of lines with trailing whitespace
(without these the test will fail). This may cause git to warn
about "whitespace errors".
This patch has been improved by the following contributions:
- Thomas Rast: fix trailing whitespace in t3301
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-notes.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index 7136016c7..94cceb131 100644 --- a/Documentation/git-notes.txt +++ b/Documentation/git-notes.txt @@ -8,7 +8,7 @@ git-notes - Add/inspect commit notes SYNOPSIS -------- [verse] -'git-notes' (edit | show) [commit] +'git-notes' (edit [-F <file> | -m <msg>] | show) [commit] DESCRIPTION ----------- @@ -33,6 +33,20 @@ show:: Show the notes for a given commit (defaults to HEAD). +OPTIONS +------- +-m <msg>:: + Use the given note message (instead of prompting). + If multiple `-m` (or `-F`) options are given, their + values are concatenated as separate paragraphs. + +-F <file>:: + Take the note message from the given file. Use '-' to + read the note message from the standard input. + If multiple `-F` (or `-m`) options are given, their + values are concatenated as separate paragraphs. + + Author ------ Written by Johannes Schindelin <johannes.schindelin@gmx.de> |