summaryrefslogtreecommitdiff
path: root/builtin/merge-ours.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/merge-ours.c')
-rw-r--r--builtin/merge-ours.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/merge-ours.c b/builtin/merge-ours.c
index 3583cff71c..c2e519301e 100644
--- a/builtin/merge-ours.c
+++ b/builtin/merge-ours.c
@@ -7,7 +7,6 @@
*
* Pretend we resolved the heads, but declare our tree trumps everybody else.
*/
-#define USE_THE_INDEX_COMPATIBILITY_MACROS
#include "git-compat-util.h"
#include "builtin.h"
#include "diff.h"
@@ -15,7 +14,7 @@
static const char builtin_merge_ours_usage[] =
"git merge-ours <base>... -- HEAD <remote>...";
-int cmd_merge_ours(int argc, const char **argv, const char *prefix)
+int cmd_merge_ours(int argc, const char **argv, const char *prefix UNUSED)
{
if (argc == 2 && !strcmp(argv[1], "-h"))
usage(builtin_merge_ours_usage);
@@ -25,7 +24,7 @@ int cmd_merge_ours(int argc, const char **argv, const char *prefix)
* commit. The index must match HEAD, or this merge cannot go
* through.
*/
- if (read_cache() < 0)
+ if (repo_read_index(the_repository) < 0)
die_errno("read_cache failed");
if (index_differs_from(the_repository, "HEAD", NULL, 0))
return 2;