diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:05:03 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:05:03 +0900 |
commit | 74ef46558ea98f4e24d1016c9961eb3d0d372be2 (patch) | |
tree | 050382c3e3cabbb1a64b8d3d1374b47b224d2c28 /t | |
parent | Merge branch 'js/wincred-empty-cred' into maint (diff) | |
parent | mingw: document the standard handle redirection (diff) | |
download | tgif-74ef46558ea98f4e24d1016c9961eb3d0d372be2.tar.xz |
Merge branch 'js/mingw-redirect-std-handles' into maint
MinGW updates.
* js/mingw-redirect-std-handles:
mingw: document the standard handle redirection
mingw: optionally redirect stderr/stdout via the same handle
mingw: add experimental feature to redirect standard handles
Diffstat (limited to 't')
-rwxr-xr-x | t/t0001-init.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 86c1a51654..c413bff9cf 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -453,4 +453,16 @@ test_expect_success 're-init from a linked worktree' ' ) ' +test_expect_success MINGW 'redirect std handles' ' + GIT_REDIRECT_STDOUT=output.txt git rev-parse --git-dir && + test .git = "$(cat output.txt)" && + test -z "$(GIT_REDIRECT_STDOUT=off git rev-parse --git-dir)" && + test_must_fail env \ + GIT_REDIRECT_STDOUT=output.txt \ + GIT_REDIRECT_STDERR="2>&1" \ + git rev-parse --git-dir --verify refs/invalid && + printf ".git\nfatal: Needed a single revision\n" >expect && + test_cmp expect output.txt +' + test_done |