diff options
-rw-r--r-- | Documentation/git-branch.txt | 2 | ||||
-rw-r--r-- | builtin/branch.c | 2 | ||||
-rwxr-xr-x | t/t7006-pager.sh | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 9dae1ea295..ef187ba7cf 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -274,7 +274,7 @@ start-point is either a local or remote-tracking branch. CONFIGURATION ------------- `pager.branch` is only respected when listing branches, i.e., when -`--list` is used or implied. +`--list` is used or implied. The default is to use a pager. See linkgit:git-config[1]. Examples diff --git a/builtin/branch.c b/builtin/branch.c index 3eb31cd1ed..39fa99bba7 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -649,7 +649,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) } if (list) - setup_auto_pager("branch", 0); + setup_auto_pager("branch", 1); if (delete) { if (!argc) diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh index 5998f7135b..f59dfd1432 100755 --- a/t/t7006-pager.sh +++ b/t/t7006-pager.sh @@ -214,21 +214,21 @@ test_expect_success TTY 'git tag as alias respects pager.tag with -l' ' ! test -e paginated.out ' -test_expect_success TTY 'git branch defaults to not paging' ' +test_expect_success TTY 'git branch defaults to paging' ' rm -f paginated.out && test_terminal git branch && - ! test -e paginated.out + test -e paginated.out ' test_expect_success TTY 'git branch respects pager.branch' ' rm -f paginated.out && - test_terminal git -c pager.branch branch && - test -e paginated.out + test_terminal git -c pager.branch=false branch && + ! test -e paginated.out ' test_expect_success TTY 'git branch respects --no-pager' ' rm -f paginated.out && - test_terminal git -c pager.branch --no-pager branch && + test_terminal git --no-pager branch && ! test -e paginated.out ' |