Skip to content

Commit 91890f9

Browse files
committed
git (git-gui): prevent wish from interpreting git-gui options
While the /cmd/git-gui.exe wrapper was never intended to be used directly via the command-line (`git-gui` is the long-deprecated dashed form, after all), it *should* ideally be possible to pass command-line parameters to that wrapper. One reported problem was that wish.exe thinks that the options starting with a dash are intended for its use. What we need to do is simply separate the git-gui options from the (non-existing) wish options using a double dash. This fixes git-for-windows/git#1284 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 66ccd20 commit 91890f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mingw-w64-git/git-wrapper.c

+1
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ int main(void)
539539
}
540540
is_git_command = 0;
541541
PathAppend(buffer, L"git-gui");
542+
wcsncat(buffer, L" --", BUFSIZE - wcslen(buffer) - 1);
542543
prefix_args = buffer;
543544
prefix_args_len = wcslen(buffer);
544545
}

0 commit comments

Comments
 (0)