git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] GIT Repository Annotation Convention

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Sep 8, 2005, 16:03 UTC
Message-ID
<432060B8.6080408@gmail.com>
In-Reply-To
<431DA8CD.9060009@gmail.com>

GIT Repository Annotation Convention ====================================

GIT repositories can benefit from descriptions of /intent/ for portions of the repository. This document formalizes a method to store those descriptions in the repository.

Annotations ------------ Annotations are UTF8 text files. Each text starts with a one line summary, optionally followed by a blank line and a longer, more detailed description.

Annotations describe the /intended/ use or contents of the repository portion described. For instance, a branch is defined by a head ref; the annotation for that branch would describe what that branch is intended to hold, how to interpret and/or use the stored state, etc.

Naming and Directory Structure ------------------------------ Annotations are named by appending ".txt" to the basename of the repository component it describes, and by appending ".dir" to each directory patch component leading to the repository component from $GIT_DIR, and by prepending "annotations/" to the annotation pathname.

The use of the ".txt" and ".dir" suffixes is to allow for descriptions of hierarchical structures (directories) and well as specific components (files).

Missing annotations are ignored.

The file "$GIT_DIR/description", used by gitweb and other tools, becomes a symbolic link to "$GIT_DIR/annotations/description.txt".

Example Layout
--------------
$GIT_DIR/
	...
	annotations/
		...
		annotations.txt
		...
		description.txt
		...
		refs.dir/
			...
			heads.dir/
				<head dir 1>.dir/
					<head name 1.1>.txt
					...
					<head name 1.M>.txt
				<head dir 1>.txt
				...
				<head dir N>.dir/
					<head name N.1>.txt
					...
					<head name N.P>.txt
				<head name 1>.txt
				...
				<head name Q>.txt
			...
			tags.dir/
				<tag name 1>.txt
				...
				<tag name T>.txt
			...
	...
	description -> annotations/description.txt
	...
--
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 11 in “git/gitweb - feature request: Add description to the branches.”
  1. Santi BéjarSep 6, 2005
  2. A Large Angry SCMSep 6, 2005
  3. Junio C HamanoSep 8, 2005
  4. [RFC] GIT Repository Annotation ConventionA Large Angry SCM, Sep 8, 2005
  5. Junio C HamanoSep 8, 2005
  6. A Large Angry SCMSep 8, 2005
  7. Matthias UrlichsSep 11, 2005
  8. A Large Angry SCMSep 11, 2005
  9. Matthias UrlichsSep 13, 2005
  10. A Large Angry SCMSep 8, 2005
  11. A Large Angry SCMSep 9, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.