From: Junio C Hamano Date: Mon, 5 Jun 2017 00:03:22 +0000 (+0900) Subject: Merge branch 'sd/t3200-typofix' into maint X-Git-Tag: v2.13.1~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e06b421cf09c5c695f277db1002a48f798429c68?ds=inline;hp=-c Merge branch 'sd/t3200-typofix' into maint Test fix. * sd/t3200-typofix: branch test: fix invalid config key access --- e06b421cf09c5c695f277db1002a48f798429c68 diff --combined t/t3200-branch.sh index fe62e7c775,6d355cc7aa..10f8f026ff --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@@ -139,12 -139,6 +139,12 @@@ test_expect_success 'git branch -M baz test $(git rev-parse --abbrev-ref HEAD) = bam ' +test_expect_success 'git branch -M baz bam should add entries to .git/logs/HEAD' ' + msg="Branch: renamed refs/heads/baz to refs/heads/bam" && + grep " 0\{40\}.*$msg$" .git/logs/HEAD && + grep "^0\{40\}.*$msg$" .git/logs/HEAD +' + test_expect_success 'git branch -M baz bam should succeed when baz is checked out as linked working tree' ' git checkout master && git worktree add -b baz bazdir && @@@ -213,31 -207,6 +213,31 @@@ test_expect_success 'git branch --list test_path_is_missing .git/refs/heads/t ' +test_expect_success 'git branch --list -v with --abbrev' ' + test_when_finished "git branch -D t" && + git branch t && + git branch -v --list t >actual.default && + git branch -v --list --abbrev t >actual.abbrev && + test_cmp actual.default actual.abbrev && + + git branch -v --list --no-abbrev t >actual.noabbrev && + git branch -v --list --abbrev=0 t >actual.0abbrev && + test_cmp actual.noabbrev actual.0abbrev && + + git branch -v --list --abbrev=36 t >actual.36abbrev && + # how many hexdigits are used? + read name objdefault rest /dev/null && + test "$objfull" != "$obj36" && + expr "$objfull" : "$obj36" >/dev/null + +' + test_expect_success 'git branch --column' ' COLUMNS=81 git branch --column=column >actual && cat >expected <<\EOF && @@@ -338,7 -307,7 +338,7 @@@ test_expect_success 'git branch -m s/s test_expect_success 'config information was renamed, too' ' test $(git config branch.s.dummy) = Hello && - test_must_fail git config branch.s/s/dummy + test_must_fail git config branch.s/s.dummy ' test_expect_success 'deleting a symref' ' @@@ -978,10 -947,6 +978,10 @@@ test_expect_success '--merged catches i test_must_fail git branch --merged 0000000000000000000000000000000000000000 ' +test_expect_success '--merged is incompatible with --no-merged' ' + test_must_fail git branch --merged HEAD --no-merged HEAD +' + test_expect_success 'tracking with unexpected .fetch refspec' ' rm -rf a b c d && git init a &&