diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-07-07 11:18:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-07 11:18:26 -0700 |
commit | fcd91f8de20bf7969599a7a60cba73117d99f2d1 (patch) | |
tree | 41fe45b3c1cd2ef3f1b84cc1fdeff14468cd6997 /t/t1502-rev-parse-parseopt.sh | |
parent | 0cc4da303641611e8d9cc431e7b4d3f1a6a0dc86 (diff) | |
parent | c30e742c4981585061ed52c14abd9ebd32a0e18b (diff) | |
download | git-fcd91f8de20bf7969599a7a60cba73117d99f2d1.tar.gz |
Merge branch 'maint'
* maint:
backmerge a few more fixes to 1.7.1.X series
rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
fix git branch -m in presence of cross devices
Conflicts:
RelNotes
builtin/rev-parse.c
Diffstat (limited to 't/t1502-rev-parse-parseopt.sh')
-rwxr-xr-x | t/t1502-rev-parse-parseopt.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh index 4346795855..b3195c4707 100755 --- a/t/t1502-rev-parse-parseopt.sh +++ b/t/t1502-rev-parse-parseopt.sh @@ -81,4 +81,22 @@ test_expect_success 'test --parseopt --keep-dashdash' ' test_cmp expect output ' +cat >expect <<EOF +set -- --foo -- '--' 'arg' '--spam=ham' +EOF + +test_expect_success 'test --parseopt --keep-dashdash --stop-at-non-option with --' ' + git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo -- arg --spam=ham <optionspec >output && + test_cmp expect output +' + +cat > expect <<EOF +set -- --foo -- 'arg' '--spam=ham' +EOF + +test_expect_success 'test --parseopt --keep-dashdash --stop-at-non-option without --' ' + git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- --foo arg --spam=ham <optionspec >output && + test_cmp expect output +' + test_done |