Merge branch 'sd/t3200-typofix' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:22 +0000 (09:03 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 00:03:22 +0000 (09:03 +0900)
Test fix.

* sd/t3200-typofix:
branch test: fix invalid config key access

1  2 
t/t3200-branch.sh
diff --combined t/t3200-branch.sh
index fe62e7c775da6a8fc191ed1dc6634d5285ddbc4b,6d355cc7aa3931afe6ae92b01c21149b8ce66534..10f8f026ffb4b21e62bdfa5fe1b8a4d6a3b3f13c
@@@ -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 <actual.abbrev &&
 +      read name obj36 rest <actual.36abbrev &&
 +      objfull=$(git rev-parse --verify t) &&
 +
 +      # are we really getting abbreviations?
 +      test "$obj36" != "$objdefault" &&
 +      expr "$obj36" : "$objdefault" >/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 &&