diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-06 09:39:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-06 09:39:46 -0700 |
commit | dd787c19c4f011cc3adb422ef856f2c58d989640 (patch) | |
tree | 1b8fdfb2e14cc423a31ab1ce75c6f05226483da6 /builtin-fast-export.c | |
parent | 864cd9491772367b3ce5b0dda98f068e5bd49680 (diff) | |
parent | 0721c314a5c8fddc877140ab5a333c42c62f780d (diff) | |
download | git-dd787c19c4f011cc3adb422ef856f2c58d989640.tar.gz |
Merge branch 'tr/die_errno'
* tr/die_errno:
Use die_errno() instead of die() when checking syscalls
Convert existing die(..., strerror(errno)) to die_errno()
die_errno(): double % in strerror() output just in case
Introduce die_errno() that appends strerror(errno) to die()
Diffstat (limited to 'builtin-fast-export.c')
-rw-r--r-- | builtin-fast-export.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c index 6cef810312..9a8a6fc6b1 100644 --- a/builtin-fast-export.c +++ b/builtin-fast-export.c @@ -119,7 +119,7 @@ static void handle_object(const unsigned char *sha1) printf("blob\nmark :%"PRIu32"\ndata %lu\n", last_idnum, size); if (size && fwrite(buf, size, 1, stdout) != 1) - die ("Could not write blob %s", sha1_to_hex(sha1)); + die_errno ("Could not write blob '%s'", sha1_to_hex(sha1)); printf("\n"); show_progress(); @@ -451,7 +451,7 @@ static void import_marks(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)) { uint32_t mark; |