Skip to content

Commit f869211

Browse files
harry-hovgitster
authored andcommitted
t5509: use a bare repository for test push target
`receive.denyCurrentBranch` currently has a bug where it allows pushing into non-bare repository using namespaces as long as it does not have any commits. This would cause t5509 to fail once that bug is fixed because it pushes into an unborn current branch. In t5509, no operations are performed inside `pushee`, as it is only a target for `git push` and `git ls-remote` calls. Therefore it does not need to have a worktree. So, it is safe to change `pushee` to a bare repository. Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: Hariom Verma <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 45f274f commit f869211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t5509-fetch-push-namespaces.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test_expect_success setup '
2020
) &&
2121
commit0=$(cd original && git rev-parse HEAD^) &&
2222
commit1=$(cd original && git rev-parse HEAD) &&
23-
git init pushee &&
23+
git init --bare pushee &&
2424
git init puller
2525
'
2626

0 commit comments

Comments
 (0)