diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-09-20 11:16:32 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-20 11:16:33 -0700 |
| commit | 83c1cc99a8a1944ced58049227dbf0e64578e042 (patch) | |
| tree | ee9541ac9ccc7eb3114c47854375e1fd6bed0a9c /t | |
| parent | 5d7700843738175c8503f8b94ecb6e7e96aedebe (diff) | |
| parent | d3edb0bddec29c97fb0314d9b1ee77d2e7d22382 (diff) | |
| download | git-83c1cc99a8a1944ced58049227dbf0e64578e042.tar.xz | |
Merge branch 'jk/git-pm-bare-repo-fix'
In Git 2.39, Git.pm stopped working in a bare repository, which has
been corrected.
* jk/git-pm-bare-repo-fix:
Git.pm: use "rev-parse --absolute-git-dir" rather than perl code
Git.pm: fix bare repository search with Directory option
Diffstat (limited to 't')
| -rwxr-xr-x | t/t9700-perl-git.sh | 3 | ||||
| -rwxr-xr-x | t/t9700/test.pl | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh index ccc8212d73..4431697122 100755 --- a/t/t9700-perl-git.sh +++ b/t/t9700-perl-git.sh @@ -45,7 +45,8 @@ test_expect_success 'set up test repository' ' ' test_expect_success 'set up bare repository' ' - git init --bare bare.git + git init --bare bare.git && + git -C bare.git --work-tree=. commit --allow-empty -m "bare commit" ' test_expect_success 'use t9700/test.pl to test Git.pm' ' diff --git a/t/t9700/test.pl b/t/t9700/test.pl index d8e85482ab..2e1d50d4d1 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -147,6 +147,11 @@ close TEMPFILE3; unlink $tmpfile3; chdir($abs_repo_dir); +# open alternate bare repo +my $r4 = Git->repository(Directory => "$abs_repo_dir/bare.git"); +is($r4->command_oneline(qw(log --format=%s)), "bare commit", + "log of bare repo works"); + # unquoting paths is(Git::unquote_path('abc'), 'abc', 'unquote unquoted path'); is(Git::unquote_path('"abc def"'), 'abc def', 'unquote simple quoted path'); |
