Code

Teach bash completion about git-shortlog
[git.git] / server-info.c
index 7667b412576644ee5f428658df6db32efc37f0c3..f9be5a7f60c1cc5208e7c91367ecb28014106f18 100644 (file)
@@ -7,9 +7,11 @@
 /* refs */
 static FILE *info_ref_fp;
 
-static int add_info_ref(const char *path, const unsigned char *sha1, void *cb_data)
+static int add_info_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
 {
        struct object *o = parse_object(sha1);
+       if (!o)
+               return -1;
 
        fprintf(info_ref_fp, "%s        %s\n", sha1_to_hex(sha1), path);
        if (o->type == OBJ_TAG) {