]> git.ipfire.org Git - thirdparty/git.git/blobdiff - fast-import.c
Fix some printf format warnings
[thirdparty/git.git] / fast-import.c
index a2a24588a99957d5af759ca6d8858366430ab3a3..7ef9865aa6da794ab52cfc50f21f9f41f861fc4f 100644 (file)
@@ -905,10 +905,10 @@ static char *keep_pack(char *curr_index_name)
 
        keep_fd = odb_pack_keep(name, sizeof(name), pack_data->sha1);
        if (keep_fd < 0)
-               die("cannot create keep file");
+               die_errno("cannot create keep file");
        write_or_die(keep_fd, keep_msg, strlen(keep_msg));
        if (close(keep_fd))
-               die("failed to write keep file");
+               die_errno("failed to write keep file");
 
        snprintf(name, sizeof(name), "%s/pack/pack-%s.pack",
                 get_object_directory(), sha1_to_hex(pack_data->sha1));
@@ -2342,7 +2342,7 @@ static void import_marks(const char *input_file)
        char line[512];
        FILE *f = fopen(input_file, "r");
        if (!f)
-               die("cannot read %s: %s", input_file, strerror(errno));
+               die_errno("cannot read '%s'", input_file);
        while (fgets(line, sizeof(line), f)) {
                uintmax_t mark;
                char *end;
@@ -2448,7 +2448,7 @@ int main(int argc, const char **argv)
                                fclose(pack_edges);
                        pack_edges = fopen(a + 20, "a");
                        if (!pack_edges)
-                               die("Cannot open %s: %s", a + 20, strerror(errno));
+                               die_errno("Cannot open '%s'", a + 20);
                } else if (!strcmp(a, "--force"))
                        force_update = 1;
                else if (!strcmp(a, "--quiet"))