builtin-notes: Add "list" subcommand for listing note objects
authorJohan Herland <johan@herland.net>
Sat, 13 Feb 2010 21:28:30 +0000 (22:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 14 Feb 2010 03:36:15 +0000 (19:36 -0800)
commite397421abf1003c4da824441f91d8c990b70fa98
treead1290da7749f57de950f13d7684bbbbd6f2c8dc
parent7d541174650fb209a00b629d113cb954c24a19de
builtin-notes: Add "list" subcommand for listing note objects

"git notes list" will list all note objects in the current notes ref (in the
format "<note object> <annotated object>"). "git notes list <object>" will
list the note object associated with the given <object>, or fail loudly if
the given <object> has no associated notes.

If no arguments are given to "git notes", it defaults to the "list"
subcommand. This is for pseudo-compatibility with "git tag" and "git branch".

The patch includes tests verifying correct behaviour of the new subcommand.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-notes.txt
builtin-notes.c
t/t3301-notes.sh