summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2d59ced)
raw | patch | inline | side by side (parent: 2d59ced)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Sat, 16 Oct 2010 18:37:02 +0000 (02:37 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 18 Oct 2010 23:20:19 +0000 (16:20 -0700) |
Reported-by: Chase Brammer <cbrammer@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5523-push-upstream.sh | patch | blob | history |
index 5a18533ad7965b82a656ba779bfc8098a13339c4..f43d76063eb20dc8cb3556c663cbe4daed4547cd 100755 (executable)
--- a/t/t5523-push-upstream.sh
+++ b/t/t5523-push-upstream.sh
test_description='push with --set-upstream'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
ensure_fresh_upstream() {
rm -rf parent && git init --bare parent
check_config headbranch upstream refs/heads/headbranch
'
+test_expect_success TTY 'progress messages go to tty' '
+ ensure_fresh_upstream &&
+
+ test_terminal git push -u upstream master >out 2>err &&
+ grep "Writing objects" err
+'
+
+test_expect_failure 'progress messages do not go to non-tty' '
+ ensure_fresh_upstream &&
+
+ # skip progress messages, since stderr is non-tty
+ git push -u upstream master >out 2>err &&
+ ! grep "Writing objects" err
+'
+
+test_expect_failure 'progress messages go to non-tty (forced)' '
+ ensure_fresh_upstream &&
+
+ # force progress messages to stderr, even though it is non-tty
+ git push -u --progress upstream master >out 2>err &&
+ grep "Writing objects" err
+'
+
+test_expect_success TTY 'push -q suppresses progress' '
+ ensure_fresh_upstream &&
+
+ test_terminal git push -u -q upstream master >out 2>err &&
+ ! grep "Writing objects" err
+'
+
+test_expect_failure TTY 'push --no-progress suppresses progress' '
+ ensure_fresh_upstream &&
+
+ test_terminal git push -u --no-progress upstream master >out 2>err &&
+ ! grep "Writing objects" err
+'
+
test_done