Commit e30c070
committed
Use consistent
In the test tools, this always runs the `git` program as `git.exe`
on Windows, while continuing always to run it as `git` on other
systems.
Prior to this change, on Windows `gix-testtools` used `git` in some
operations and `git.exe` in others:
- `parse_git_version` used `git.exe`.
- Other functions used `git`.
- For the git daemon, `git-daemon.exe` was used.
For the way `gix-testtools` uses the `git` program, it would be
fine to call it `git` on all platforms. For example, it does not
form full paths to the executable that have to be found to exist
in operations other than running it. (For running it, the `.exe`
suffix is allowed to be omitted.) So it would probably be fine to
use the even simpler logic of having it be `git` everywhere. But
since `git.exe` was sometimes used, `git-daemon.exe` was used, and
using `git.exe` is more similar to the behavior in `git-path`, it
is changed to use `git.exe` when the platform is Windows.
Because `gix-testtools` does not depend on `gix-path`, it doesn't
use `gix_path::env::exe_invocation` to decide how to call `git`.
That keeps it from finding `git` in some Windows environments
(those where `git` is in a standard/predictable location but not in
`PATH`). This change has no effect on that limitation.git command name in gix-testtools1 parent 01737ad commit e30c070
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
176 | | - | |
| 181 | + | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| |||
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
185 | | - | |
| 190 | + | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
| |||
738 | 743 | | |
739 | 744 | | |
740 | 745 | | |
741 | | - | |
| 746 | + | |
742 | 747 | | |
743 | 748 | | |
744 | 749 | | |
| |||
951 | 956 | | |
952 | 957 | | |
953 | 958 | | |
954 | | - | |
| 959 | + | |
955 | 960 | | |
956 | 961 | | |
957 | 962 | | |
| |||
0 commit comments