1#!/bin/sh
23
test_description='checkout switching away from an invalid branch'
45
. ./test-lib.sh
67
test_expect_success 'setup' '
8echo hello >world &&
9git add world &&
10git commit -m initial
11'
1213
test_expect_success 'checkout master from invalid HEAD' '
14echo 0000000000000000000000000000000000000000 >.git/HEAD &&
15git checkout master --
16'
1718
test_done