From 82c412c58081aa57197c2270bb544d790f35ffae Mon Sep 17 00:00:00 2001 From: Malfurious Date: Wed, 24 Mar 2021 03:18:22 -0400 Subject: Fix issue with test-colors 'git pull' commands If the user's git is configured with 'pull.ff = only', these lines would fail since the two repositories have diverged from each other. '--ff' is added to restore the original default of allowing either a fast-forward or recursive merge to take place. In reality, an implicit 3-way merge is being performed. All tests now pass. Signed-off-by: Malfurious --- test-colors.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-colors.sh b/test-colors.sh index 6243c8f..f71b776 100755 --- a/test-colors.sh +++ b/test-colors.sh @@ -394,7 +394,7 @@ test_bash_colors_remote() { assertEquals "$expected" "$(bash_color_remote_commits)" assertEquals "$expected" "$(color_remote_commits)" - git pull origin master --quiet >/dev/null + git pull origin master --quiet --ff >/dev/null git push --quiet >/dev/null printf -v expected "m \x01remote-ahead\x02←\x01remote-reset\x02 2" @@ -440,7 +440,7 @@ test_zsh_colors_remote() { assertEquals "m 1 %{remote-diverged%}⇄%{remote-reset%} 1" "$(zsh_color_remote_commits)" - git pull origin master --quiet >/dev/null + git pull origin master --quiet --ff >/dev/null git push --quiet >/dev/null assertEquals "m %{remote-ahead%}←%{remote-reset%} 2" "$(zsh_color_remote_commits)" -- cgit v1.2.3