summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-04-16 16:05:10 -0700
committerJunio C Hamano <junkio@cox.net>2007-04-16 16:51:11 -0700
commitca135e7acc06f7d24ead732d2a1a531428da7135 (patch)
tree5a56e061f15602736847ec608839619cf377e09c /commit.h
parenta59b276e18f3d4a548caf549e05188cb1bd3a709 (diff)
downloadgit-ca135e7acc06f7d24ead732d2a1a531428da7135.tar.gz
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 <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h8
1 files changed, 8 insertions, 0 deletions
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,