rebase: fix a memory leak
[gitweb.git] / builtin / cat-file.c
index a5ca47c697e6ef363a40224916fd451554120fb8..0f092382e175cf7ebe43d2f53ef1c5c79c338568 100644 (file)
@@ -211,14 +211,14 @@ struct expand_data {
 
        /*
         * After a mark_query run, this object_info is set up to be
-        * passed to sha1_object_info_extended. It will point to the data
+        * passed to oid_object_info_extended. It will point to the data
         * elements above, so you can retrieve the response from there.
         */
        struct object_info info;
 
        /*
         * This flag will be true if the requested batch format and options
-        * don't require us to call sha1_object_info, which can then be
+        * don't require us to call oid_object_info, which can then be
         * optimized out.
         */
        unsigned skip_object_info : 1;
@@ -382,7 +382,7 @@ static void batch_one_object(const char *obj_name,
 {
        struct object_context ctx;
        int flags = opt->follow_symlinks ? GET_OID_FOLLOW_SYMLINKS : 0;
-       enum follow_symlinks_result result;
+       enum get_oid_result result;
 
        result = get_oid_with_context(the_repository, obj_name,
                                      flags, &data->oid, &ctx);
@@ -391,6 +391,9 @@ static void batch_one_object(const char *obj_name,
                case MISSING_OBJECT:
                        printf("%s missing\n", obj_name);
                        break;
+               case SHORT_NAME_AMBIGUOUS:
+                       printf("%s ambiguous\n", obj_name);
+                       break;
                case DANGLING_SYMLINK:
                        printf("dangling %"PRIuMAX"\n%s\n",
                               (uintmax_t)strlen(obj_name), obj_name);
@@ -493,7 +496,7 @@ static int batch_objects(struct batch_options *opt)
 
        /*
         * Expand once with our special mark_query flag, which will prime the
-        * object_info to be handed to sha1_object_info_extended for each
+        * object_info to be handed to oid_object_info_extended for each
         * object.
         */
        memset(&data, 0, sizeof(data));