From ca135e7acc06f7d24ead732d2a1a531428da7135 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 16 Apr 2007 16:05:10 -0700 Subject: Add support for "commit name decorations" to log family of commands This adds "--decorate" as a log option, which prints out the ref names of any commits that are shown. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- commit.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index 83507a07e4..59de17eff8 100644 --- a/commit.h +++ b/commit.h @@ -3,6 +3,7 @@ #include "object.h" #include "tree.h" +#include "decorate.h" struct commit_list { struct commit *item; @@ -21,6 +22,13 @@ struct commit { extern int save_commit_buffer; extern const char *commit_type; +/* While we can decorate any object with a name, it's only used for commits.. */ +extern struct decoration name_decoration; +struct name_decoration { + struct name_decoration *next; + char name[1]; +}; + struct commit *lookup_commit(const unsigned char *sha1); struct commit *lookup_commit_reference(const unsigned char *sha1); struct commit *lookup_commit_reference_gently(const unsigned char *sha1, -- cgit v1.2.1