diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-08 21:49:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-08 21:49:50 -0700 |
commit | 00d27937bf0348e7da615f04b65f535a58e096c1 (patch) | |
tree | f21f1bd9c94e7294182b396f691526c96dd01196 /t/t7060-wtstatus.sh | |
parent | d0b61dc65faf6f20c6305d47b3deca978d1d5843 (diff) | |
parent | 888525d7865fbf9a277ef5fb8c1fe57f2fb1a0c5 (diff) | |
download | git-00d27937bf0348e7da615f04b65f535a58e096c1.tar.gz |
Merge branch 'jh/status-v2-porcelain'
Enhance "git status --porcelain" output by collecting more data on
the state of the index and the working tree files, which may
further be used to teach git-prompt (in contrib/) to make fewer
calls to git.
* jh/status-v2-porcelain:
status: unit tests for --porcelain=v2
test-lib-functions.sh: add lf_to_nul helper
git-status.txt: describe --porcelain=v2 format
status: print branch info with --porcelain=v2 --branch
status: print per-file porcelain v2 status data
status: collect per-file data for --porcelain=v2
status: support --porcelain[=<version>]
status: cleanup API to wt_status_print
status: rename long-format print routines
Diffstat (limited to 't/t7060-wtstatus.sh')
-rwxr-xr-x | t/t7060-wtstatus.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh index 4d17363a92..53cf42fac1 100755 --- a/t/t7060-wtstatus.sh +++ b/t/t7060-wtstatus.sh @@ -232,4 +232,25 @@ test_expect_success 'status --branch with detached HEAD' ' test_i18ncmp expected actual ' +## Duplicate the above test and verify --porcelain=v1 arg parsing. +test_expect_success 'status --porcelain=v1 --branch with detached HEAD' ' + git reset --hard && + git checkout master^0 && + git status --branch --porcelain=v1 >actual && + cat >expected <<-EOF && + ## HEAD (no branch) + ?? .gitconfig + ?? actual + ?? expect + ?? expected + ?? mdconflict/ + EOF + test_i18ncmp expected actual +' + +## Verify parser error on invalid --porcelain argument. +test_expect_success 'status --porcelain=bogus' ' + test_must_fail git status --porcelain=bogus +' + test_done |