We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3473ad0 commit ad35f61Copy full SHA for ad35f61
t/t2025-checkout-to.sh
@@ -96,4 +96,22 @@ test_expect_success 'checkout from a bare repo without --to' '
96
)
97
'
98
99
+test_expect_success 'checkout with grafts' '
100
+ test_when_finished rm .git/info/grafts &&
101
+ test_commit abc &&
102
+ SHA1=`git rev-parse HEAD` &&
103
+ test_commit def &&
104
+ test_commit xyz &&
105
+ echo "`git rev-parse HEAD` $SHA1" >.git/info/grafts &&
106
+ cat >expected <<-\EOF &&
107
+ xyz
108
+ abc
109
+ EOF
110
+ git log --format=%s -2 >actual &&
111
+ test_cmp expected actual &&
112
+ git checkout --detach --to grafted master &&
113
+ git --git-dir=grafted/.git log --format=%s -2 >actual &&
114
+ test_cmp expected actual
115
+'
116
+
117
test_done
0 commit comments