]> git.ipfire.org Git - thirdparty/git.git/blobdiff - log-tree.c
Fix some printf format warnings
[thirdparty/git.git] / log-tree.c
index a3b4c0692c6a46a0642cf1cb42e60eee59110d60..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);
        }
 }