Skip to content

Commit 7265a8f

Browse files
committed
merge-ours: drop USE_THE_REPOSITORY_VARIABLE
Use the `repo` parameter passed to cmd_merge_ours() instead of `the_repository`, and drop the USE_THE_REPOSITORY_VARIABLE macro that is no longer needed. While at it, remove a stray double blank line between the #include block and the usage string. Signed-off-by: Sam Bostock <sam@bostock.ca>
1 parent b2826b5 commit 7265a8f

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

builtin/merge-ours.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,17 @@
88
* Pretend we resolved the heads, but declare our tree trumps everybody else.
99
*/
1010

11-
#define USE_THE_REPOSITORY_VARIABLE
12-
1311
#include "git-compat-util.h"
1412
#include "builtin.h"
1513
#include "diff.h"
1614

17-
1815
static const char builtin_merge_ours_usage[] =
1916
"git merge-ours <base>... -- HEAD <remote>...";
2017

2118
int cmd_merge_ours(int argc,
2219
const char **argv,
2320
const char *prefix UNUSED,
24-
struct repository *repo UNUSED)
21+
struct repository *repo)
2522
{
2623
show_usage_if_asked(argc, argv, builtin_merge_ours_usage);
2724

@@ -30,9 +27,9 @@ int cmd_merge_ours(int argc,
3027
* commit. The index must match HEAD, or this merge cannot go
3128
* through.
3229
*/
33-
if (repo_read_index(the_repository) < 0)
30+
if (repo_read_index(repo) < 0)
3431
die_errno("read_cache failed");
35-
if (index_differs_from(the_repository, "HEAD", NULL, 0))
32+
if (index_differs_from(repo, "HEAD", NULL, 0))
3633
return 2;
3734
return 0;
3835
}

0 commit comments

Comments
 (0)