wrapper.c: add and use fopen_or_warn()
[gitweb.git] / builtin / pull.c
index dd1a4a94e41ed31617d31c80e097cbc044b3e3f3..589c25becf270d24140ba5d2ddaf0251746fa170 100644 (file)
@@ -337,8 +337,7 @@ static void get_merge_heads(struct oid_array *merge_heads)
        struct strbuf sb = STRBUF_INIT;
        struct object_id oid;
 
-       if (!(fp = fopen(filename, "r")))
-               die_errno(_("could not open '%s' for reading"), filename);
+       fp = xfopen(filename, "r");
        while (strbuf_getline_lf(&sb, fp) != EOF) {
                if (get_oid_hex(sb.buf, &oid))
                        continue;  /* invalid line: does not start with SHA1 */