]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jn/grep-open'
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Jun 2010 18:55:38 +0000 (11:55 -0700)
* jn/grep-open:
  t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script
  t/t7811-grep-open.sh: ensure fake "less" is made executable
  t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression
  grep -O: allow optional argument specifying the pager (or editor)
  grep: Add the option '--open-files-in-pager'
  Unify code paths of threaded greps
  grep: refactor grep_objects loop into its own function

Conflicts:
t/t7006-pager.sh

1  2 
Documentation/git-grep.txt
builtin/grep.c
t/t7006-pager.sh
t/t7810-grep.sh

Simple merge
diff --cc builtin/grep.c
Simple merge
index 9a83241c942f63c7c7b2f5c739164c34c80ab68d,fc993fc8c48167f7a7deebf15e1969d6e4320e78..c2a3c8e2e7351ba5c49fa363a1856ec82904d444
@@@ -158,22 -159,13 +159,13 @@@ test_expect_success 'color when writin
        colorful colorful.log
  '
  
- test_expect_success 'determine default pager' '
-       unset PAGER GIT_PAGER;
-       test_might_fail git config --unset core.pager ||
-       cleanup_fail &&
-       less=$(git var GIT_PAGER) &&
-       test -n "$less"
- '
- if expr "$less" : '[a-z][a-z]*$' >/dev/null && test_have_prereq TTY
+ if test_have_prereq SIMPLEPAGER && test_have_prereq TTY
  then
-       test_set_prereq SIMPLEPAGER
+       test_set_prereq SIMPLEPAGERTTY
  fi
  
- test_expect_success SIMPLEPAGER 'default pager is used by default' '
+ test_expect_success SIMPLEPAGERTTY 'default pager is used by default' '
 -      unset PAGER GIT_PAGER &&
 +      unset PAGER GIT_PAGER;
        test_might_fail git config --unset core.pager &&
        rm -f default_pager_used ||
        cleanup_fail &&
diff --cc t/t7810-grep.sh
Simple merge