@@ -1181,7 +1181,7 @@ static int run_apply_check(struct add_p_state *s,
"apply", "--check", NULL);
strvec_pushv(&cp.args, s->mode->apply_check_args);
if (pipe_command(&cp, s->buf.buf, s->buf.len, NULL, 0, NULL, 0))
- return error(_("'git apply --cached' failed"));
+ return error(_("'%s' failed"), "git apply --cached");
return 0;
}
@@ -1683,7 +1683,7 @@ soft_increment:
strvec_pushv(&cp.args, s->mode->apply_args);
if (pipe_command(&cp, s->buf.buf, s->buf.len,
NULL, 0, NULL, 0))
- error(_("'git apply' failed"));
+ error(_("'%s' failed"), "git apply");
}
if (repo_read_index(s->s.r) >= 0)
repo_refresh_and_write_index(s->s.r, REFRESH_QUIET, 0,
@@ -586,7 +586,7 @@ static int is_mail(FILE *fp)
int ret = 1;
if (fseek(fp, 0L, SEEK_SET))
- die_errno(_("fseek failed"));
+ die_errno(_("'%s' failed"), "fseek");
if (regcomp(®ex, header_regex, REG_NOSUB | REG_EXTENDED))
die("invalid pattern: %s", header_regex);
@@ -1104,7 +1104,7 @@ static int multi_pack_index_expire(struct maintenance_run_opts *opts)
strvec_push(&child.args, "--no-progress");
if (run_command(&child))
- return error(_("'git multi-pack-index expire' failed"));
+ return error(_("'%s' failed"), "git multi-pack-index expire");
return 0;
}
@@ -1163,7 +1163,7 @@ static int multi_pack_index_repack(struct maintenance_run_opts *opts)
(uintmax_t)get_auto_pack_size());
if (run_command(&child))
- return error(_("'git multi-pack-index repack' failed"));
+ return error(_("'%s' failed"), "git multi-pack-index repack");
return 0;
}
@@ -325,7 +325,7 @@ static int save_state(struct object_id *stash)
close(cp.out);
if (finish_command(&cp) || len < 0)
- die(_("stash failed"));
+ die(_("'%s' failed"), "stash");
else if (!len) /* no changes */
goto out;
strbuf_setlen(&buffer, buffer.len-1);
@@ -352,7 +352,7 @@ static void read_empty(const struct object_id *oid, int verbose)
args[i] = NULL;
if (run_command_v_opt(args, RUN_GIT_CMD))
- die(_("read-tree failed"));
+ die(_("'%s' failed"), "read-tree");
}
static void reset_hard(const struct object_id *oid, int verbose)
@@ -369,7 +369,7 @@ static void reset_hard(const struct object_id *oid, int verbose)
args[i] = NULL;
if (run_command_v_opt(args, RUN_GIT_CMD))
- die(_("read-tree failed"));
+ die(_("'%s' failed"), "read-tree");
}
static void restore_state(const struct object_id *head,
@@ -238,7 +238,7 @@ int cmd_revert(int argc, const char **argv, const char *prefix)
sequencer_init_config(&opts);
res = run_sequencer(argc, argv, &opts);
if (res < 0)
- die(_("revert failed"));
+ die(_("'%s' failed"), "revert");
return res;
}
@@ -251,6 +251,6 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
sequencer_init_config(&opts);
res = run_sequencer(argc, argv, &opts);
if (res < 0)
- die(_("cherry-pick failed"));
+ die(_("'%s' failed"), "cherry-pick");
return res;
}
@@ -989,7 +989,7 @@ static int get_pack(struct fetch_pack_args *args,
args->check_self_contained_and_connected &&
ret == 0;
else
- die(_("%s failed"), cmd_name);
+ die(_("'%s' failed"), cmd_name);
if (use_sideband && finish_async(&demux))
die(_("error in sideband demultiplexer"));
@@ -1287,7 +1287,7 @@ static int push_dav(int nr_spec, const char **specs)
strvec_push(&child.args, specs[i]);
if (run_command(&child))
- die(_("git-http-push failed"));
+ die(_("'%s' failed"), "git-http-push");
return 0;
}
@@ -1506,12 +1506,12 @@ int daemonize(void)
case 0:
break;
case -1:
- die_errno(_("fork failed"));
+ die_errno(_("'%s' failed"), "fork");
default:
exit(0);
}
if (setsid() == -1)
- die_errno(_("setsid failed"));
+ die_errno(_("'%s' failed"), "setsid");
close(0);
close(1);
close(2);
@@ -193,7 +193,7 @@ test_expect_success 'check advice when we move HEAD by committing' '
error: there is nothing to skip
hint: have you committed already?
hint: try "git cherry-pick --continue"
- fatal: cherry-pick failed
+ fatal: '\''cherry-pick'\'' failed
EOF
test_must_fail git cherry-pick base..yetanotherpick &&
echo c >foo &&
@@ -208,7 +208,7 @@ test_expect_success 'selectively advise --skip while launching another sequence'
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --skip | --abort | --quit)"
- fatal: cherry-pick failed
+ fatal: '\''cherry-pick'\'' failed
EOF
test_must_fail git cherry-pick picked..yetanotherpick &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
@@ -216,7 +216,7 @@ test_expect_success 'selectively advise --skip while launching another sequence'
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --abort | --quit)"
- fatal: cherry-pick failed
+ fatal: '\''cherry-pick'\'' failed
EOF
git reset --merge &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
@@ -227,7 +227,7 @@ test_expect_success 'allow skipping commit but not abort for a new history' '
pristine_detach initial &&
cat >expect <<-EOF &&
error: cannot abort from a branch yet to be born
- fatal: cherry-pick failed
+ fatal: '\''cherry-pick'\'' failed
EOF
git checkout --orphan new_disconnected &&
git reset --hard &&
@@ -166,7 +166,7 @@ test_expect_success 'will not be confused by symlink in leading path' '
cat >expect <<\EOF
error: Untracked working tree file 'c0.c' would be overwritten by merge.
-fatal: read-tree failed
+fatal: 'read-tree' failed
EOF
test_expect_success 'will not overwrite untracked file on unborn branch' '