Re: [PATCH] Make error message after failing commit_lock_file() less confusing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Quoting Eric Sunshine <sunshine@xxxxxxxxxxxxxx>:

diff --git a/config.c b/config.c
@@ -64,7 +64,8 @@ static void rewrite_credential_file(const char *fn, struct credential *c,
                print_line(extra);
        parse_credential_file(fn, c, NULL, print_line);
        if (commit_lock_file(&credential_lock) < 0)
-               die_errno("unable to commit credential store");
+               die_errno("unable to write credential store: %s",
+                         strerror(errno));

Hmm, this is already calling die_errno(), so adding another strerror()
to the mix seems superfluous.

Oops, of course.

 }

 static void store_credential_file(const char *fn, struct credential *c)
diff --git a/fast-import.c b/fast-import.c
@@ -1824,7 +1824,7 @@ static void dump_marks(void)

        dump_marks_helper(f, 0, marks);
        if (commit_lock_file(&mark_lock)) {
-               failure |= error("Unable to commit marks file %s: %s",
+               failure |= error("Unable to write file %s: %s",
                        export_marks_file, strerror(errno));

Since you're already doing some normalization of the error messages
with this patch, do you want to drop capitalization on this one?

The neighboring error messages are capitalized as well, as are many (but not all) other error and warning messages in fast-import.c.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]