diff options
author | Malfurious <m@lfurio.us> | 2021-03-24 03:18:22 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-03-24 03:18:22 -0400 |
commit | 82c412c58081aa57197c2270bb544d790f35ffae (patch) | |
tree | 9d6fcceb86f6918cf8c9dac24e911af860a7c651 | |
parent | a9737ee899dcfee46d8765c1b534b8c9df68cbe6 (diff) | |
download | git-sonar-82c412c58081aa57197c2270bb544d790f35ffae.tar.gz git-sonar-82c412c58081aa57197c2270bb544d790f35ffae.zip |
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 <m@lfurio.us>
-rwxr-xr-x | test-colors.sh | 4 |
1 files 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)" |