tests: let git init create directories when applicable
It's functionally equivalent to create a directory, cd into it, git init, and cd out of the directory, or simply git init with the directory specified. In several cases, we were doing the former without performing any other operations in the git repo, which just made the test unneccesarily complex. Even in the case where we still want to cd into the directory, calling git init with the directory name eliminates the need for a separate mkdir command. This changeset converts the former approach to the latter with the goal of increasing the readability of the tests. Thanks to Felipe Contreras for the patch which this was based on.
Showing
- tests/test-clone.t 2 additions, 3 deletionstests/test-clone.t
- tests/test-conflict-1.t 1 addition, 5 deletionstests/test-conflict-1.t
- tests/test-conflict-2.t 1 addition, 5 deletionstests/test-conflict-2.t
- tests/test-convergedmerge.t 1 addition, 5 deletionstests/test-convergedmerge.t
- tests/test-empty-working-tree.t 3 additions, 8 deletionstests/test-empty-working-tree.t
- tests/test-encoding.t 3 additions, 7 deletionstests/test-encoding.t
- tests/test-file-removal.t 3 additions, 7 deletionstests/test-file-removal.t
- tests/test-git-clone.t 2 additions, 3 deletionstests/test-git-clone.t
- tests/test-git-submodules.t 4 additions, 6 deletionstests/test-git-submodules.t
- tests/test-git-tags.t 2 additions, 3 deletionstests/test-git-tags.t
- tests/test-git-workflow.t 1 addition, 3 deletionstests/test-git-workflow.t
- tests/test-hg-author.t 2 additions, 4 deletionstests/test-hg-author.t
- tests/test-hg-branch.t 2 additions, 4 deletionstests/test-hg-branch.t
- tests/test-hg-tags.t 2 additions, 4 deletionstests/test-hg-tags.t
- tests/test-incoming.t 2 additions, 4 deletionstests/test-incoming.t
- tests/test-keywords.t 2 additions, 3 deletionstests/test-keywords.t
- tests/test-merge.t 3 additions, 7 deletionstests/test-merge.t
- tests/test-octopus.t 3 additions, 8 deletionstests/test-octopus.t
- tests/test-outgoing.t 2 additions, 4 deletionstests/test-outgoing.t
- tests/test-pull-after-strip.t 2 additions, 3 deletionstests/test-pull-after-strip.t
Loading
Please register or sign in to comment