Commit 3400622
pull: cleanup autostash check
Currently "git pull --rebase" takes a shortcut in the case a
fast-forward merge is possible; run_merge() is called with --ff-only.
However, "git merge" didn't have an --autostash option, so, when "git
pull --rebase --autostash" was called *and* the fast-forward merge
shortcut was taken, then the pull failed.
This was fixed in commit f15e7cf (pull: ff --rebase --autostash
works in dirty repo, 2017-06-01) by simply skipping the fast-forward
merge shortcut.
Later on "git merge" learned the --autostash option [a03b555
(merge: teach --autostash option, 2020-04-07)], and so did "git pull"
[d9f15d3 (pull: pass --autostash to merge, 2020-04-07)].
Therefore it's not necessary to skip the fast-forward merge shortcut
anymore when called with --rebase --autostash.
Let's always take the fast-forward merge shortcut by essentially
reverting f15e7cf.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 670b81a commit 3400622
1 file changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
950 | | - | |
951 | 950 | | |
952 | 951 | | |
953 | 952 | | |
| |||
982 | 981 | | |
983 | 982 | | |
984 | 983 | | |
985 | | - | |
986 | 984 | | |
| 985 | + | |
987 | 986 | | |
988 | 987 | | |
989 | 988 | | |
| |||
1065 | 1064 | | |
1066 | 1065 | | |
1067 | 1066 | | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
1075 | 1073 | | |
1076 | 1074 | | |
1077 | 1075 | | |
| |||
0 commit comments