Skip to content

Commit 33cef0f

Browse files
committed
Merge branch 'en/merge-recursive-comment-fixes'
Comment fix. * en/merge-recursive-comment-fixes: merge-recursive: fix unclear and outright wrong comments
2 parents 5b53175 + 56e7434 commit 33cef0f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

merge-recursive.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,8 +3529,9 @@ static struct commit_list *reverse_commit_list(struct commit_list *list)
35293529
}
35303530

35313531
/*
3532-
* Merge the commits h1 and h2, return the resulting virtual
3533-
* commit object and a flag indicating the cleanness of the merge.
3532+
* Merge the commits h1 and h2, returning a flag (int) indicating the
3533+
* cleanness of the merge. Also, if opt->priv->call_depth, create a
3534+
* virtual commit and write its location to *result.
35343535
*/
35353536
static int merge_recursive_internal(struct merge_options *opt,
35363537
struct commit *h1,

merge-recursive.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ int parse_merge_opt(struct merge_options *opt, const char *s);
6969
*
7070
* Outputs:
7171
* - See RETURN VALUES above
72-
* - No commit is created
7372
* - opt->repo->index has the new index
74-
* - $GIT_INDEX_FILE is not updated
73+
* - new index NOT written to disk
7574
* - The working tree is updated with results of the merge
7675
*/
7776
int merge_trees(struct merge_options *opt,
@@ -81,7 +80,7 @@ int merge_trees(struct merge_options *opt,
8180

8281
/*
8382
* merge_recursive is like merge_trees() but with recursive ancestor
84-
* consolidation and, if the commit is clean, creation of a commit.
83+
* consolidation.
8584
*
8685
* NOTE: empirically, about a decade ago it was determined that with more
8786
* than two merge bases, optimal behavior was found when the
@@ -91,9 +90,9 @@ int merge_trees(struct merge_options *opt,
9190
*
9291
* Outputs:
9392
* - See RETURN VALUES above
94-
* - If merge is clean, a commit is created and its address written to *result
93+
* - *result is treated as scratch space for temporary recursive merges
9594
* - opt->repo->index has the new index
96-
* - $GIT_INDEX_FILE is not updated
95+
* - new index NOT written to disk
9796
* - The working tree is updated with results of the merge
9897
*/
9998
int merge_recursive(struct merge_options *opt,
@@ -109,9 +108,9 @@ int merge_recursive(struct merge_options *opt,
109108
*
110109
* Outputs:
111110
* - See RETURN VALUES above
112-
* - If merge is clean, a commit is created and its address written to *result
111+
* - *result is treated as scratch space for temporary recursive merges
113112
* - opt->repo->index has the new index
114-
* - $GIT_INDEX_FILE is updated
113+
* - new index also written to $GIT_INDEX_FILE on disk
115114
* - The working tree is updated with results of the merge
116115
*/
117116
int merge_recursive_generic(struct merge_options *opt,

0 commit comments

Comments
 (0)