diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-18 13:49:53 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-18 13:49:53 -0800 |
commit | ec27a940134e940a68228401e54f89d610858a26 (patch) | |
tree | 20201a138630a1d06a78cc54d07c4443656d8af1 /t | |
parent | Merge branch 'sb/submodule-fetchjobs-default-to-one' (diff) | |
parent | stripspace: allow -s/-c outside git repository (diff) | |
download | tgif-ec27a940134e940a68228401e54f89d610858a26.tar.xz |
Merge branch 'jn/stripspace-wo-repository'
"git stripspace" should be usable outside a git repository, but
under the "-s" or "-c" mode, it didn't.
* jn/stripspace-wo-repository:
stripspace: allow -s/-c outside git repository
Diffstat (limited to 't')
-rwxr-xr-x | t/t0030-stripspace.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh index 5ce47e8af5..0c24a0f9a3 100755 --- a/t/t0030-stripspace.sh +++ b/t/t0030-stripspace.sh @@ -430,9 +430,15 @@ test_expect_success '-c with changed comment char' ' test_expect_success '-c with comment char defined in .git/config' ' test_config core.commentchar = && printf "= foo\n" >expect && - printf "foo" | ( - mkdir sub && cd sub && git stripspace -c - ) >actual && + rm -fr sub && + mkdir sub && + printf "foo" | git -C sub stripspace -c >actual && + test_cmp expect actual +' + +test_expect_success '-c outside git repository' ' + printf "# foo\n" >expect && + printf "foo" | nongit git stripspace -c >actual && test_cmp expect actual ' |