t3204: test git-branch @-expansion corner cases
commita356e8e2a724012c8120bfa69133b6118b1565f4
authorJeff King <peff@peff.net>
Thu, 2 Mar 2017 08:23:06 +0000 (2 03:23 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Mar 2017 19:05:04 +0000 (2 11:05 -0800)
tree7d0941a3f7b3c147a7415fe63f6ced65fc96570b
parent0e9f62dab9fcce57279751bba47718d3f8baf3c8
t3204: test git-branch @-expansion corner cases

git-branch feeds the branch names from the command line to
strbuf_branchname(), but we do not yet tell that function
which kinds of expansions should be allowed. Let's create a
set of tests that cover both the allowed and disallowed
cases.

That shows off some breakages where we currently create or
delete the wrong ref (and will make sure that we do not
break any cases that _should_ be working when we do add more
restrictions).

Note that we check branch creation and deletion, but do not
bother with renames. Those follow the same code path as
creation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3204-branch-name-interpretation.sh [new file with mode: 0755]