Skip to content

Commit 750324d

Browse files
newrengitster
authored andcommitted
merge.h: move declarations for merge.c from cache.h
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eaa966d commit 750324d

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

builtin/merge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "color.h"
3838
#include "rerere.h"
3939
#include "help.h"
40+
#include "merge.h"
4041
#include "merge-recursive.h"
4142
#include "merge-ort-wrappers.h"
4243
#include "resolve-undo.h"

builtin/pull.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "builtin.h"
1313
#include "gettext.h"
1414
#include "hex.h"
15+
#include "merge.h"
1516
#include "object-name.h"
1617
#include "parse-options.h"
1718
#include "exec-cmd.h"

cache.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -527,15 +527,4 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
527527
void overlay_tree_on_index(struct index_state *istate,
528528
const char *tree_name, const char *prefix);
529529

530-
/* merge.c */
531-
struct commit_list;
532-
int try_merge_command(struct repository *r,
533-
const char *strategy, size_t xopts_nr,
534-
const char **xopts, struct commit_list *common,
535-
const char *head_arg, struct commit_list *remotes);
536-
int checkout_fast_forward(struct repository *r,
537-
const struct object_id *from,
538-
const struct object_id *to,
539-
int overwrite_ignore);
540-
541530
#endif /* CACHE_H */

merge.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "gettext.h"
55
#include "hex.h"
66
#include "lockfile.h"
7+
#include "merge.h"
78
#include "commit.h"
89
#include "run-command.h"
910
#include "resolve-undo.h"

merge.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef MERGE_H
2+
#define MERGE_H
3+
4+
struct commit_list;
5+
struct object_id;
6+
struct repository;
7+
8+
int try_merge_command(struct repository *r,
9+
const char *strategy, size_t xopts_nr,
10+
const char **xopts, struct commit_list *common,
11+
const char *head_arg, struct commit_list *remotes);
12+
int checkout_fast_forward(struct repository *r,
13+
const struct object_id *from,
14+
const struct object_id *to,
15+
int overwrite_ignore);
16+
17+
#endif /* MERGE_H */

sequencer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "diff.h"
2626
#include "revision.h"
2727
#include "rerere.h"
28+
#include "merge.h"
2829
#include "merge-ort.h"
2930
#include "merge-ort-wrappers.h"
3031
#include "refs.h"

0 commit comments

Comments
 (0)