summaryrefslogtreecommitdiff
path: root/builtin-merge-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-merge-file.c')
-rw-r--r--builtin-merge-file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin-merge-file.c b/builtin-merge-file.c
index 9d4e874809..afd2ea7a73 100644
--- a/builtin-merge-file.c
+++ b/builtin-merge-file.c
@@ -48,11 +48,14 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
merge_style = git_xmerge_style;
}
- argc = parse_options(argc, argv, options, merge_file_usage, 0);
+ argc = parse_options(argc, argv, prefix, options, merge_file_usage, 0);
if (argc != 3)
usage_with_options(merge_file_usage, options);
- if (quiet)
- freopen("/dev/null", "w", stderr);
+ if (quiet) {
+ if (!freopen("/dev/null", "w", stderr))
+ return error("failed to redirect stderr to /dev/null: "
+ "%s\n", strerror(errno));
+ }
for (i = 0; i < 3; i++) {
if (!names[i])