|
86 | 86 | unlink $tmpfile; |
87 | 87 |
|
88 | 88 | # paths |
89 | | -is($r->repo_path, "./.git", "repo_path"); |
| 89 | +is($r->repo_path, $abs_repo_dir . "/.git", "repo_path"); |
90 | 90 | is($r->wc_path, $abs_repo_dir . "/", "wc_path"); |
91 | 91 | is($r->wc_subdir, "", "wc_subdir initial"); |
92 | 92 | $r->wc_chdir("directory1"); |
93 | 93 | is($r->wc_subdir, "directory1", "wc_subdir after wc_chdir"); |
94 | | -TODO: { |
95 | | - local $TODO = "commands do not work after wc_chdir"; |
96 | | - # Failure output is active even in non-verbose mode and thus |
97 | | - # annoying. Hence we skip these tests as long as they fail. |
98 | | - todo_skip 'config after wc_chdir', 1; |
99 | | - is($r->config("color.string"), "value", "config after wc_chdir"); |
100 | | -} |
| 94 | +is($r->config("test.string"), "value", "config after wc_chdir"); |
| 95 | + |
| 96 | +# Object generation in sub directory |
| 97 | +chdir("directory2"); |
| 98 | +my $r2 = Git->repository(); |
| 99 | +is($r2->repo_path, $abs_repo_dir . "/.git", "repo_path (2)"); |
| 100 | +is($r2->wc_path, $abs_repo_dir . "/", "wc_path (2)"); |
| 101 | +is($r2->wc_subdir, "directory2/", "wc_subdir initial (2)"); |
| 102 | + |
| 103 | +# commands in sub directory |
| 104 | +my $last_commit = $r2->command_oneline(qw(rev-parse --verify HEAD)); |
| 105 | +like($last_commit, qr/^[0-9a-fA-F]{40}$/, 'rev-parse returned hash'); |
| 106 | +my $dir_commit = $r2->command_oneline('log', '-n1', '--pretty=format:%H', '.'); |
| 107 | +isnt($last_commit, $dir_commit, 'log . does not show last commit'); |
0 commit comments