File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,9 @@ pick_one_preserving_merges () {
352
352
msg_content=" $( commit_message $sha1 ) "
353
353
# No point in merging the first parent, that's HEAD
354
354
new_parents=${new_parents# $first_parent }
355
+ merge_args=" --no-log --no-ff"
355
356
if ! do_with_author output eval \
356
- ' git merge --no-ff $strategy_args -m "$msg_content" $new_parents'
357
+ ' git merge $merge_args $strategy_args -m "$msg_content" $new_parents'
357
358
then
358
359
printf " %s\n" " $msg_content " > " $GIT_DIR " /MERGE_MSG
359
360
die_with_patch $sha1 " Error redoing merge $sha1 "
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export GIT_AUTHOR_EMAIL
28
28
# \--A3 <-- topic2
29
29
# \
30
30
# B2 <-- origin/topic
31
+ #
32
+ # Clone 4 (same as Clone 3)
31
33
32
34
test_expect_success ' setup for merge-preserving rebase' \
33
35
' echo First > A &&
@@ -64,6 +66,16 @@ test_expect_success 'setup for merge-preserving rebase' \
64
66
git merge --no-ff topic2
65
67
) &&
66
68
69
+ git clone ./. clone4 &&
70
+ (
71
+ cd clone4 &&
72
+ git checkout -b topic2 origin/topic &&
73
+ echo Sixth > A &&
74
+ git commit -a -m "Modify A3" &&
75
+ git checkout -b topic origin/topic &&
76
+ git merge --no-ff topic2
77
+ ) &&
78
+
67
79
git checkout topic &&
68
80
echo Fourth >> B &&
69
81
git commit -a -m "Modify B2"
@@ -96,4 +108,15 @@ test_expect_success 'rebase -p preserves no-ff merges' '
96
108
)
97
109
'
98
110
111
+ test_expect_success ' rebase -p ignores merge.log config' '
112
+ (
113
+ cd clone4 &&
114
+ git fetch &&
115
+ git -c merge.log=1 rebase -p origin/topic &&
116
+ echo >expected &&
117
+ git log --format="%b" -1 >current &&
118
+ test_cmp expected current
119
+ )
120
+ '
121
+
99
122
test_done
You can’t perform that action at this time.
0 commit comments