]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-tag.c
Convert existing die(..., strerror(errno)) to die_errno()
[thirdparty/git.git] / builtin-tag.c
index dc3db628115cc7b3c62c1d54af37c87ba126a5db..7b51095c80b4b14eb389c19bfc1889ce1c187530 100644 (file)
@@ -308,8 +308,7 @@ static void create_tag(const unsigned char *object, const char *tag,
                path = git_pathdup("TAG_EDITMSG");
                fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
                if (fd < 0)
-                       die("could not create file '%s': %s",
-                                               path, strerror(errno));
+                       die_errno("could not create file '%s'", path);
 
                if (!is_null_sha1(prev))
                        write_tag_body(fd, prev);
@@ -446,8 +445,8 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
                                        die("cannot read %s", msgfile);
                        } else {
                                if (strbuf_read_file(&buf, msgfile, 1024) < 0)
-                                       die("could not open or read '%s': %s",
-                                               msgfile, strerror(errno));
+                                       die_errno("could not open or read '%s'",
+                                               msgfile);
                        }
                }
        }