git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
blob a557201a5081413c3ddc90c7a3806684d44dfb47 2061 bytes (raw)
name: merge-recursive.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 
#ifndef MERGE_RECURSIVE_H
#define MERGE_RECURSIVE_H

#include "unpack-trees.h"
#include "string-list.h"

struct merge_options {
	const char *ancestor;
	const char *branch1;
	const char *branch2;
	enum {
		MERGE_RECURSIVE_NORMAL = 0,
		MERGE_RECURSIVE_OURS,
		MERGE_RECURSIVE_THEIRS
	} recursive_variant;
	const char *subtree_shift;
	unsigned buffer_output; /* 1: output at end, 2: keep buffered */
	unsigned renormalize : 1;
	long xdl_opts;
	int verbosity;
	int detect_rename;
	int diff_rename_limit;
	int merge_rename_limit;
	int rename_score;
	int needed_rename_limit;
	int show_rename_progress;
	int call_depth;
	struct strbuf obuf;
	struct hashmap current_file_dir_set;
	struct string_list df_conflict_file_set;
	struct unpack_trees_options unpack_opts;
};

struct dir_rename_entry {
	struct hashmap_entry ent; /* must be the first member! */
	char *dir;
	unsigned non_unique_new_dir:1;
	struct strbuf new_dir;
	struct string_list possible_new_dirs;
};

struct collision_entry {
	struct hashmap_entry ent; /* must be the first member! */
	char *target_file;
	struct string_list source_files;
	unsigned reported_already:1;
};

/* merge_trees() but with recursive ancestor consolidation */
int merge_recursive(struct merge_options *o,
		    struct commit *h1,
		    struct commit *h2,
		    struct commit_list *ancestors,
		    struct commit **result);

/* rename-detecting three-way merge, no recursion */
int merge_trees(struct merge_options *o,
		struct tree *head,
		struct tree *merge,
		struct tree *common,
		struct tree **result);

/*
 * "git-merge-recursive" can be fed trees; wrap them into
 * virtual commits and call merge_recursive() proper.
 */
int merge_recursive_generic(struct merge_options *o,
			    const struct object_id *head,
			    const struct object_id *merge,
			    int num_ca,
			    const struct object_id **ca,
			    struct commit **result);

void init_merge_options(struct merge_options *o);
struct tree *write_tree_from_memory(struct merge_options *o);

int parse_merge_opt(struct merge_options *out, const char *s);

#endif

debug log:

solving a557201a50 ...
found a557201a50 in https://public-inbox.org/git/20171129014237.32570-31-newren@gmail.com/ ||
	https://public-inbox.org/git/20180130232533.25846-28-newren@gmail.com/
found e1be27f57c in https://public-inbox.org/git/20171129014237.32570-25-newren@gmail.com/ ||
	https://public-inbox.org/git/20180130232533.25846-22-newren@gmail.com/
found d7f4cc80c1 in https://public-inbox.org/git/20171129014237.32570-21-newren@gmail.com/ ||
	https://public-inbox.org/git/20180130232533.25846-18-newren@gmail.com/
found 80d69d1401 in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100644 80d69d140195cc3ba1054050569e56bfc0277b56	merge-recursive.h

applying [1/3] https://public-inbox.org/git/20171129014237.32570-21-newren@gmail.com/
diff --git a/merge-recursive.h b/merge-recursive.h
index 80d69d1401..d7f4cc80c1 100644

Checking patch merge-recursive.h...
Applied patch merge-recursive.h cleanly.

skipping https://public-inbox.org/git/20180130232533.25846-18-newren@gmail.com/ for d7f4cc80c1
index at:
100644 d7f4cc80c12821aa6d94259ec63549d12d29839e	merge-recursive.h

applying [2/3] https://public-inbox.org/git/20171129014237.32570-25-newren@gmail.com/
diff --git a/merge-recursive.h b/merge-recursive.h
index d7f4cc80c1..e1be27f57c 100644

Checking patch merge-recursive.h...
Applied patch merge-recursive.h cleanly.

skipping https://public-inbox.org/git/20180130232533.25846-22-newren@gmail.com/ for e1be27f57c
index at:
100644 e1be27f57ce8ca249b66b9b57ba6cb7351da0776	merge-recursive.h

applying [3/3] https://public-inbox.org/git/20171129014237.32570-31-newren@gmail.com/
diff --git a/merge-recursive.h b/merge-recursive.h
index e1be27f57c..a557201a50 100644

Checking patch merge-recursive.h...
Applied patch merge-recursive.h cleanly.

skipping https://public-inbox.org/git/20180130232533.25846-28-newren@gmail.com/ for a557201a50
index at:
100644 a557201a5081413c3ddc90c7a3806684d44dfb47	merge-recursive.h

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).