X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=commit.h;h=75b43a53edcd082fbe148dad3ddc66e85471f0b4;hb=a6080a0a44d5ead84db3dabbbc80e82df838533d;hp=83507a07e4cbaab81f130891a64b78539d1beede;hpb=00cec846f157b5363b0967d1e4cba76b44d48e77;p=git.git diff --git a/commit.h b/commit.h index 83507a07e..75b43a53e 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, @@ -53,12 +61,12 @@ enum cmit_fmt { }; extern enum cmit_fmt get_commit_format(const char *arg); -extern unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *, unsigned long len, char *buf, unsigned long space, int abbrev, const char *subject, const char *after_subject, int relative_date); +extern unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *, unsigned long len, char *buf, unsigned long space, int abbrev, const char *subject, const char *after_subject, enum date_mode dmode); /** Removes the first commit from a list sorted by date, and adds all * of its parents. **/ -struct commit *pop_most_recent_commit(struct commit_list **list, +struct commit *pop_most_recent_commit(struct commit_list **list, unsigned int mark); struct commit *pop_commit(struct commit_list **stack);