Skip to content

Commit ff926a6

Browse files
committed
Merge branch 'en/random-cleanups'
Miscellaneous code clean-ups. * en/random-cleanups: merge-ort: remove extraneous word in comment merge-ort: fix accidental strset<->strintmap t7615: be more explicit about diff algorithm used t6423: fix a comment that accidentally reversed two commits stash: remove merge-recursive.h include
2 parents 6767149 + a18c18b commit ff926a6

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

builtin/stash.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "lockfile.h"
1414
#include "cache-tree.h"
1515
#include "unpack-trees.h"
16-
#include "merge-recursive.h"
1716
#include "merge-ort-wrappers.h"
1817
#include "strvec.h"
1918
#include "run-command.h"

merge-ort.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,8 +1517,8 @@ static int handle_deferred_entries(struct merge_options *opt,
15171517
struct strintmap copy;
15181518

15191519
/* Loop over the set of paths we need to know rename info for */
1520-
strset_for_each_entry(&renames->relevant_sources[side],
1521-
&iter, entry) {
1520+
strintmap_for_each_entry(&renames->relevant_sources[side],
1521+
&iter, entry) {
15221522
char *rename_target, *dir, *dir_marker;
15231523
struct strmap_entry *e;
15241524

@@ -3430,9 +3430,9 @@ static int collect_renames(struct merge_options *opt,
34303430
skip_directory_renames:
34313431
/*
34323432
* p->score comes back from diffcore_rename_extended() with
3433-
* the similarity of the renamed file. The similarity is
3434-
* was used to determine that the two files were related
3435-
* and are a rename, which we have already used, but beyond
3433+
* the similarity of the renamed file. The similarity was
3434+
* used to determine that the two files were related and
3435+
* are a rename, which we have already used, but beyond
34363436
* that we have no use for the similarity. So p->score is
34373437
* now irrelevant. However, process_renames() will need to
34383438
* know which side of the merge this rename was associated

t/t6423-merge-rename-directories.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5590,9 +5590,9 @@ test_expect_success '13b(info): messages for transitive rename with conflicted c
55905590
# Commit A: y/{b,c,d}, x/e
55915591
# Commit B: z/{b,c,d}, x/e
55925592
# Expected: y/{b,c,d}, x/e, with info or conflict messages for d
5593-
# A: renamed x/d -> z/d; B: renamed z/ -> y/ AND renamed x/d to y/d
5594-
# One could argue A had partial knowledge of what was done with
5595-
# d and B had full knowledge, but that's a slippery slope as
5593+
# B: renamed x/d -> z/d; A: renamed z/ -> y/ AND renamed x/d to y/d
5594+
# One could argue B had partial knowledge of what was done with
5595+
# d and A had full knowledge, but that's a slippery slope as
55965596
# shown in testcase 13d.
55975597

55985598
test_setup_13c () {

t/t7615-diff-algo-with-mergy-operations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ GIT_TEST_MERGE_ALGORITHM=recursive
2626

2727
test_expect_success 'merge c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '
2828
git reset --hard c1 &&
29-
test_must_fail git merge -s recursive c2
29+
test_must_fail git merge -s recursive -Xdiff-algorithm=myers c2
3030
'
3131

3232
test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '
@@ -42,7 +42,7 @@ test_expect_success 'merge c2 to c1 with recursive merge strategy succeeds with
4242

4343
test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy fails with the current default myers diff algorithm' '
4444
git reset --hard c1 &&
45-
test_must_fail git cherry-pick -s recursive c2
45+
test_must_fail git cherry-pick -s recursive -Xdiff-algorithm=myers c2
4646
'
4747

4848
test_expect_success 'cherry-pick c2 to c1 with recursive merge strategy succeeds with -Xdiff-algorithm=histogram' '

0 commit comments

Comments
 (0)