summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-07 18:18:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-07-07 18:18:26 (GMT)
commitfcd91f8de20bf7969599a7a60cba73117d99f2d1 (patch)
tree41fe45b3c1cd2ef3f1b84cc1fdeff14468cd6997 /t
parent0cc4da303641611e8d9cc431e7b4d3f1a6a0dc86 (diff)
parentc30e742c4981585061ed52c14abd9ebd32a0e18b (diff)
downloadgit-fcd91f8de20bf7969599a7a60cba73117d99f2d1.zip
git-fcd91f8de20bf7969599a7a60cba73117d99f2d1.tar.gz
git-fcd91f8de20bf7969599a7a60cba73117d99f2d1.tar.bz2
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')
-rwxr-xr-xt/t1502-rev-parse-parseopt.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh
index 4346795..b3195c4 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