Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > The normal rule is anything outside refs/heads/ is detached. This > strictens the rule a bit more: if the branch is checked out (either in > $GIT_COMMON_DIR/HEAD or any $GIT_DIR/repos/.../HEAD) then it's > detached as well. > > A hint is given so the user knows where to go and do something there > if they still want to checkout undetached here. > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> (Only nitpicks during this round of review). > diff --git a/t/t2025-checkout-to.sh b/t/t2025-checkout-to.sh > index 76eae4a..f6a5c47 100755 > --- a/t/t2025-checkout-to.sh > +++ b/t/t2025-checkout-to.sh > @@ -13,13 +13,14 @@ test_expect_success 'checkout --to not updating paths' ' > ' > > test_expect_success 'checkout --to a new worktree' ' > + git rev-parse HEAD >expect && > git checkout --to here master && > ( > cd here && > test_cmp ../init.t init.t && > - git symbolic-ref HEAD >actual && > - echo refs/heads/master >expect && > - test_cmp expect actual && > + ! git symbolic-ref HEAD && test_must_fail? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html