clone: release strbuf after use in remove_junk()
[gitweb.git] / builtin / cat-file.c
index 1f035fb55008822d08d5633b154a54a02f8c2191..4ccbfaac3148287535aa8833d0d6cbdacb7c1d3d 100644 (file)
@@ -12,6 +12,7 @@
 #include "streaming.h"
 #include "tree-walk.h"
 #include "sha1-array.h"
+#include "packfile.h"
 
 struct batch_options {
        int enabled;
@@ -63,7 +64,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name,
        if (unknown_type)
                flags |= OBJECT_INFO_ALLOW_UNKNOWN_TYPE;
 
-       if (get_oid_with_context(obj_name, GET_SHA1_RECORD_PATH,
+       if (get_oid_with_context(obj_name, GET_OID_RECORD_PATH,
                                 &oid, &obj_context))
                die("Not a valid object name %s", obj_name);
 
@@ -361,7 +362,7 @@ static void batch_one_object(const char *obj_name, struct batch_options *opt,
                             struct expand_data *data)
 {
        struct object_context ctx;
-       int flags = opt->follow_symlinks ? GET_SHA1_FOLLOW_SYMLINKS : 0;
+       int flags = opt->follow_symlinks ? GET_OID_FOLLOW_SYMLINKS : 0;
        enum follow_symlinks_result result;
 
        result = get_oid_with_context(obj_name, flags, &data->oid, &ctx);