Re: [PATCH] difftool: fix bug when printing usage

2017-02-08 Thread Johannes Schindelin
Hi Junio, On Tue, 7 Feb 2017, Junio C Hamano wrote: > Junio C Hamano writes: > > > Johannes Schindelin writes: > > > >>> > Likewise, this would become > >>> > > >>> > GIT_CEILING_DIRECTORIES="$PWD/not" \ > >>> > test_expect_code

Re: [PATCH] difftool: fix bug when printing usage

2017-02-07 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >>> > Likewise, this would become >>> > >>> > GIT_CEILING_DIRECTORIES="$PWD/not" \ >>> > test_expect_code 129 git -C not/repo difftool -h >output && >>> > grep ^usage: output >>> >>> I

Re: [PATCH] difftool: fix bug when printing usage

2017-02-07 Thread Junio C Hamano
Johannes Schindelin writes: >> > Likewise, this would become >> > >> >GIT_CEILING_DIRECTORIES="$PWD/not" \ >> >test_expect_code 129 git -C not/repo difftool -h >output && >> >grep ^usage: output >> >> I agree with the intent, but the execution here is

Re: [PATCH] difftool: fix bug when printing usage

2017-02-07 Thread Johannes Schindelin
Hi Junio, On Mon, 6 Feb 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > [... and he quoted someone ...] > > > >> + # create a ceiling directory to prevent Git from finding a repo > >> + mkdir -p not/repo && > >> + ceiling="$PWD/not" && > >> +

Re: [PATCH] difftool: fix bug when printing usage

2017-02-06 Thread Junio C Hamano
Johannes Schindelin writes: >> +test_expect_success 'basic usage requires no repo' ' >> +lines=$(git difftool -h | grep ^usage: | wc -l) && >> +test "$lines" -eq 1 && > > It may be easier to debug future breakages if you wrote > > git difftool -h | grep

Re: [PATCH] difftool: fix bug when printing usage

2017-02-06 Thread Johannes Schindelin
Hi David, On Sun, 5 Feb 2017, David Aguilar wrote: > "git difftool -h" reports an error: > > fatal: BUG: setup_git_env called without repository > > Defer repository setup so that the help option processing happens before > the repository is initialized. > > Add tests to ensure that the

[PATCH] difftool: fix bug when printing usage

2017-02-05 Thread David Aguilar
"git difftool -h" reports an error: fatal: BUG: setup_git_env called without repository Defer repository setup so that the help option processing happens before the repository is initialized. Add tests to ensure that the basic usage works inside and outside of a repository.