X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;h=f7d54f2f1b132d54adda6a9ca5f8e1332856709f;hb=8127f778a0f6495a0b8484a21b5591e56d873de8;hp=6f73c17d74bee326a40505b29bba762bade2451e;hpb=e532e7b08f3de1a590db909c2c93532c2a39e9ae;p=git.git diff --git a/log-tree.c b/log-tree.c index 6f73c17d7..f7d54f2f1 100644 --- a/log-tree.c +++ b/log-tree.c @@ -25,7 +25,8 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in struct object *obj = parse_object(sha1); if (!obj) return 0; - refname = prettify_refname(refname); + if (!cb_data || *(int *)cb_data == DECORATE_SHORT_REFS) + refname = prettify_refname(refname); add_name_decoration("", refname, obj); while (obj->type == OBJ_TAG) { obj = ((struct tag *)obj)->tagged; @@ -36,12 +37,13 @@ static int add_ref_decoration(const char *refname, const unsigned char *sha1, in return 0; } -void load_ref_decorations(void) +void load_ref_decorations(int flags) { static int loaded; if (!loaded) { loaded = 1; - for_each_ref(add_ref_decoration, NULL); + for_each_ref(add_ref_decoration, &flags); + head_ref(add_ref_decoration, &flags); } } @@ -168,18 +170,6 @@ static unsigned int digits_in_number(unsigned int number) return result; } -static int has_non_ascii(const char *s) -{ - int ch; - if (!s) - return 0; - while ((ch = *s++) != '\0') { - if (non_ascii(ch)) - return 1; - } - return 0; -} - void get_patch_filename(struct commit *commit, int nr, const char *suffix, struct strbuf *buf) { @@ -401,7 +391,9 @@ void show_log(struct rev_info *opt) */ show_reflog_message(opt->reflog_info, opt->commit_format == CMIT_FMT_ONELINE, - opt->date_mode); + opt->date_mode_explicit ? + opt->date_mode : + DATE_NORMAL); if (opt->commit_format == CMIT_FMT_ONELINE) return; }