X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;h=1c9eefee33b38a44f34d21c47bc1f16af1443a6c;hb=cfe370c6476392095bc3f18013d195b1cccd6184;hp=59d63eb67e57ab55bdca6493fa8b28b0c870ff21;hpb=d4f6bc887de7957645b998a0b0e22bc4048f36dd;p=git.git diff --git a/log-tree.c b/log-tree.c index 59d63eb67..1c9eefee3 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,12 @@ 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); } } @@ -168,18 +169,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) { @@ -321,7 +310,8 @@ void show_log(struct rev_info *opt) } /* - * If use_terminator is set, add a newline at the end of the entry. + * If use_terminator is set, we already handled any record termination + * at the end of the last record. * Otherwise, add a diffopt.line_termination character before all * entries but the first. (IOW, as a separator between entries) */