char buf[48];
int len = snprintf(buf, sizeof(buf), "%s\t%s\n",
report, sha1_to_hex(sha1));
- write_in_full(1, buf, len);
+ write_or_die(1, buf, len);
/*
* Let's just mimic git-unpack-objects here and write
fix_thin_pack = 1;
} else if (!strcmp(arg, "--keep")) {
keep_msg = "";
- } else if (!strncmp(arg, "--keep=", 7)) {
+ } else if (!prefixcmp(arg, "--keep=")) {
keep_msg = arg + 7;
- } else if (!strncmp(arg, "--pack_header=", 14)) {
+ } else if (!prefixcmp(arg, "--pack_header=")) {
struct pack_header *hdr;
char *c;