git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Johan Herland <johan@herland.net>,
	Thomas Rast <trast@student.ethz.ch>, Jeff King <peff@peff.net>
Subject: [PATCH 1/8] Documentation/notes: document format of notes trees
Date: Sat, 8 May 2010 22:19:35 -0500	[thread overview]
Message-ID: <20100509031935.GA7958@progeny.tock> (raw)
In-Reply-To: <20100509031357.GA7926@progeny.tock>

Separate the specification of the notes format exposed in
git-config.1 from the description of the option; or in other
words, move the explanation for what to expect to find at
refs/notes/commits from git-config.1 to git-notes.1.

Suggested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
How well does ‘git notes’ handle notes trees without a commit
currently?  I remembered some rumor about a commitless mode in which
the only history is the reflog, but I am not sure how much of that is
implemented yet and I did not check.

If it was only groundless rumor (read: I made it up), then the last
paragraph of the discussion should be removed.

 Documentation/config.txt    |   16 +++++-----------
 Documentation/git-notes.txt |   30 +++++++++++++++++++++---------
 2 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 8f86050..cc4bc20 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -518,18 +518,12 @@ check that makes sure that existing object files will not get overwritten.
 
 core.notesRef::
 	When showing commit messages, also show notes which are stored in
-	the given ref.  This ref is expected to contain files named
-	after the full SHA-1 of the commit they annotate.  The ref
-	must be fully qualified.
+	the given ref.  The ref must be fully qualified.  If the given
+	ref does not exist, it is not an error but means that no
+	notes should be printed.
 +
-If such a file exists in the given ref, the referenced blob is read, and
-appended to the commit message, separated by a "Notes (<refname>):"
-line (shortened to "Notes:" in the case of "refs/notes/commits").  If the
-given ref itself does not exist, it is not an error, but means that no
-notes should be printed.
-+
-This setting defaults to "refs/notes/commits", and can be overridden by
-the `GIT_NOTES_REF` environment variable.
+This setting defaults to "refs/notes/commits", and it can be overridden by
+the 'GIT_NOTES_REF' environment variable.  See linkgit:git-notes[1].
 
 core.sparseCheckout::
 	Enable "sparse checkout" feature. See section "Sparse checkout" in
diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
index 4e5113b..af12c3c 100644
--- a/Documentation/git-notes.txt
+++ b/Documentation/git-notes.txt
@@ -28,7 +28,7 @@ to change the commit itself. Such commit notes can be shown by `git log`
 along with the original commit message. To discern these notes from the
 message stored in the commit object, the notes are indented like the
 message, after an unindented line saying "Notes (<refname>):" (or
-"Notes:" for the default setting).
+"Notes:" for `refs/notes/commits`).
 
 This command always manipulates the notes specified in "core.notesRef"
 (see linkgit:git-config[1]), which can be overridden by GIT_NOTES_REF.
@@ -122,17 +122,29 @@ OPTIONS
 	is taken to be in `refs/notes/` if it is not qualified.
 
 
-NOTES
------
+DISCUSSION
+----------
+
+Commit notes are blobs containing extra information about an object
+(usually information to supplement a commit's message).  These blobs
+are taken from notes refs.  A notes ref is usually a branch which
+contains "files" whose paths are the object names for the objects
+they describe, with some directory separators included for performance
+reasons footnote:[Permitted pathnames have the form
+'ab'`/`'cd'`/`'ef'`/`'...'`/`'abcdef...': a sequence of directory
+names of two hexadecimal digits each followed by a filename with the
+rest of the object ID.].
 
 Every notes change creates a new commit at the specified notes ref.
 You can therefore inspect the history of the notes by invoking, e.g.,
-`git log -p notes/commits`.
-
-Currently the commit message only records which operation triggered
-the update, and the commit authorship is determined according to the
-usual rules (see linkgit:git-commit[1]).  These details may change in
-the future.
+`git log -p notes/commits`.  Currently the commit message only records
+which operation triggered the update, and the commit authorship is
+determined according to the usual rules (see linkgit:git-commit[1]).
+These details may change in the future.
+
+It is also permitted for a notes ref to point directly to a tree
+object, in which case the history of the notes can be read with
+`git log -p -g <refname>`.
 
 
 Author
-- 
1.7.1

  reply	other threads:[~2010-05-09  3:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09  3:13 [PATCH v2 0/8] filling out the notes man page Jonathan Nieder
2010-05-09  3:19 ` Jonathan Nieder [this message]
2010-05-09  6:52   ` [PATCH 1/8] Documentation/notes: document format of notes trees Jeff King
2010-05-09  3:21 ` [PATCH 2/8] Documentation/notes: describe content of notes blobs Jonathan Nieder
2010-05-09  3:21 ` [PATCH 3/8] Documentation/notes: add configuration section Jonathan Nieder
2010-05-09  3:23 ` [PATCH 4/8] Documentation/notes: simplify treatment of default notes ref Jonathan Nieder
2010-05-12  7:46   ` Thomas Rast
2010-05-12 10:28     ` Jonathan Nieder
2010-05-09  3:30 ` [PATCH 5/8] Documentation/log: add a CONFIGURATION section Jonathan Nieder
2010-05-09  6:57   ` Jeff King
2010-05-09  3:32 ` [PATCH 6/8] Documentation/notes: simplify treatment of default display refs Jonathan Nieder
2010-05-09  7:00   ` Jeff King
2010-05-09  8:43     ` Jonathan Nieder
2010-05-10  6:06       ` Jeff King
2010-05-12 10:50         ` Jonathan Nieder
2010-05-12 11:23           ` Jeff King
2010-05-09  3:33 ` [PATCH 7/8] Documentation/notes: clean up description of rewriting configuration Jonathan Nieder
2010-05-09  3:37 ` [PATCH 8/8] Documentation/notes: nitpicks Jonathan Nieder
2010-05-10 23:27 ` [PATCH v2 0/8] filling out the notes man page Johan Herland
2010-05-12  7:48   ` Thomas Rast
2010-05-12 12:57     ` [PATCH v3] Documentation/notes: fill out the man page a little Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100509031935.GA7958@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    --cc=peff@peff.net \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).