diff mbox series

[v2,11/11] t6001: avoid direct file system access

Message ID 81e46f955363fee8576b378f22273436e28b3675.1626989327.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Fix direct filesystem access in various test files. | expand

Commit Message

Han-Wen Nienhuys July 22, 2021, 9:28 p.m. UTC
From: Han-Wen Nienhuys <hanwen@google.com>

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
---
 t/t6001-rev-list-graft.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Junio C Hamano July 23, 2021, 5:40 p.m. UTC | #1
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Han-Wen Nienhuys <hanwen@google.com>
>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>  t/t6001-rev-list-graft.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh
> index 90d93f77fa7..7294147334a 100755
> --- a/t/t6001-rev-list-graft.sh
> +++ b/t/t6001-rev-list-graft.sh
> @@ -23,7 +23,8 @@ test_expect_success setup '
>  	git commit -a -m "Third in one history." &&
>  	A2=$(git rev-parse --verify HEAD) &&
>  
> -	rm -f .git/refs/heads/main .git/index &&
> +	git update-ref -d refs/heads/main &&
> +	rm -f .git/index &&

Makes sense.  We might want a further clean-up to avoid removing the
index file by hand but that is totally outside the scope of the
"refs" series.

Thanks.
diff mbox series

Patch

diff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh
index 90d93f77fa7..7294147334a 100755
--- a/t/t6001-rev-list-graft.sh
+++ b/t/t6001-rev-list-graft.sh
@@ -23,7 +23,8 @@  test_expect_success setup '
 	git commit -a -m "Third in one history." &&
 	A2=$(git rev-parse --verify HEAD) &&
 
-	rm -f .git/refs/heads/main .git/index &&
+	git update-ref -d refs/heads/main &&
+	rm -f .git/index &&
 
 	echo >fileA fileA again &&
 	echo >subdir/fileB fileB again &&