2 * Implementation of git-merge-ours.sh as builtin
4 * Copyright (c) 2007 Thomas Harning Jr
6 * Original Copyright (c) 2005 Junio C Hamano
8 * Pretend we resolved the heads, but declare our tree trumps everybody else.
10 #include "git-compat-util.h"
13 static const char *diff_index_args
[] = {
14 "diff-index", "--quiet", "--cached", "HEAD", "--", NULL
16 #define NARGS (ARRAY_SIZE(diff_index_args) - 1)
18 int cmd_merge_ours(int argc
, const char **argv
, const char *prefix
)
21 * We need to exit with 2 if the index does not match our HEAD tree,
22 * because the current index is what we will be committing as the
25 if (cmd_diff_index(NARGS
, diff_index_args
, prefix
))