X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=commit.h;h=75b43a53edcd082fbe148dad3ddc66e85471f0b4;hb=a6080a0a44d5ead84db3dabbbc80e82df838533d;hp=c73744463ca55ce0df3623dffbb994bd4a86d76e;hpb=8b969a5fb5e5891d9ad4c236fd9487c4673bfa2a;p=git.git diff --git a/commit.h b/commit.h index c73744463..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, @@ -47,17 +55,18 @@ enum cmit_fmt { CMIT_FMT_FULLER, CMIT_FMT_ONELINE, CMIT_FMT_EMAIL, + CMIT_FMT_USERFORMAT, CMIT_FMT_UNSPECIFIED, }; 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);