pkt-line: fix packet_read_line() to handle len < 0 errors
[gitweb.git] / builtin / prune.c
index 8f4f0522856b988a8798fd65c6d81d8826709aa2..42633e0c6e672c46852f0590f1941249691f962c 100644 (file)
@@ -30,7 +30,7 @@ static int prune_tmp_file(const char *fullpath)
        return 0;
 }
 
-static int prune_object(const unsigned char *sha1, const char *fullpath,
+static int prune_object(const struct object_id *oid, const char *fullpath,
                        void *data)
 {
        struct stat st;
@@ -39,7 +39,7 @@ static int prune_object(const unsigned char *sha1, const char *fullpath,
         * Do we know about this object?
         * It must have been reachable
         */
-       if (lookup_object(sha1))
+       if (lookup_object(oid->hash))
                return 0;
 
        if (lstat(fullpath, &st)) {
@@ -50,8 +50,8 @@ static int prune_object(const unsigned char *sha1, const char *fullpath,
        if (st.st_mtime > expire)
                return 0;
        if (show_only || verbose) {
-               enum object_type type = sha1_object_info(sha1, NULL);
-               printf("%s %s\n", sha1_to_hex(sha1),
+               enum object_type type = sha1_object_info(oid->hash, NULL);
+               printf("%s %s\n", oid_to_hex(oid),
                       (type > 0) ? typename(type) : "unknown");
        }
        if (!show_only)