]> git.ipfire.org Git - thirdparty/git.git/blobdiff - log-tree.c
Fix some printf format warnings
[thirdparty/git.git] / log-tree.c
index 6f73c17d74bee326a40505b29bba762bade2451e..1c9eefee33b38a44f34d21c47bc1f16af1443a6c 100644 (file)
@@ -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)
 {