~ubuntu-branches/debian/sid/git/sid

« back to all changes in this revision

Viewing changes to builtin/merge-file.c

  • Committer: Package Import Robot
  • Author(s): Jonathan Nieder
  • Date: 2013-06-12 07:50:53 UTC
  • mfrom: (1.2.19) (2.1.31 experimental)
  • Revision ID: package-import@ubuntu.com-20130612075053-uue9xe0dq0rvm44y
Tags: 1:1.8.3.1-1
* merge branch debian-experimental
* new upstream point release (see RelNotes/1.8.3.1.txt).
* debian/watch: use xz-compressed tarballs from kernel.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#include "parse-options.h"
6
6
 
7
7
static const char *const merge_file_usage[] = {
8
 
        "git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 orig_file file2",
 
8
        N_("git merge-file [options] [-L name1 [-L orig [-L name2]]] file1 orig_file file2"),
9
9
        NULL
10
10
};
11
11
 
30
30
        int quiet = 0;
31
31
        int prefixlen = 0;
32
32
        struct option options[] = {
33
 
                OPT_BOOLEAN('p', "stdout", &to_stdout, "send results to standard output"),
34
 
                OPT_SET_INT(0, "diff3", &xmp.style, "use a diff3 based merge", XDL_MERGE_DIFF3),
35
 
                OPT_SET_INT(0, "ours", &xmp.favor, "for conflicts, use our version",
 
33
                OPT_BOOLEAN('p', "stdout", &to_stdout, N_("send results to standard output")),
 
34
                OPT_SET_INT(0, "diff3", &xmp.style, N_("use a diff3 based merge"), XDL_MERGE_DIFF3),
 
35
                OPT_SET_INT(0, "ours", &xmp.favor, N_("for conflicts, use our version"),
36
36
                            XDL_MERGE_FAVOR_OURS),
37
 
                OPT_SET_INT(0, "theirs", &xmp.favor, "for conflicts, use their version",
 
37
                OPT_SET_INT(0, "theirs", &xmp.favor, N_("for conflicts, use their version"),
38
38
                            XDL_MERGE_FAVOR_THEIRS),
39
 
                OPT_SET_INT(0, "union", &xmp.favor, "for conflicts, use a union version",
 
39
                OPT_SET_INT(0, "union", &xmp.favor, N_("for conflicts, use a union version"),
40
40
                            XDL_MERGE_FAVOR_UNION),
41
41
                OPT_INTEGER(0, "marker-size", &xmp.marker_size,
42
 
                            "for conflicts, use this marker size"),
43
 
                OPT__QUIET(&quiet, "do not warn about conflicts"),
44
 
                OPT_CALLBACK('L', NULL, names, "name",
45
 
                             "set labels for file1/orig_file/file2", &label_cb),
 
42
                            N_("for conflicts, use this marker size")),
 
43
                OPT__QUIET(&quiet, N_("do not warn about conflicts")),
 
44
                OPT_CALLBACK('L', NULL, names, N_("name"),
 
45
                             N_("set labels for file1/orig_file/file2"), &label_cb),
46
46
                OPT_END(),
47
47
        };
48
48
 
63
63
        if (quiet) {
64
64
                if (!freopen("/dev/null", "w", stderr))
65
65
                        return error("failed to redirect stderr to /dev/null: "
66
 
                                     "%s\n", strerror(errno));
 
66
                                     "%s", strerror(errno));
67
67
        }
68
68
 
69
69
        if (prefix)
76
76
                if (read_mmfile(mmfs + i, fname))
77
77
                        return -1;
78
78
                if (buffer_is_binary(mmfs[i].ptr, mmfs[i].size))
79
 
                        return error("Cannot merge binary files: %s\n",
 
79
                        return error("Cannot merge binary files: %s",
80
80
                                        argv[i]);
81
81
        }
82
82