Johannes Schindelin 5b472674cc git-wrapper: support COMSPEC better
The quoting rules of `cmd.exe` are really, really quirky. In particular,
if there are more than two quotes, the entire set of rules changes. That
is the reason why

	CMD /C "C:\Program Files\Git\usr\bin\bash.exe" -l -i

works, but

	CMD /C "C:\Program Files\Git\usr\bin\bash.exe" -l -i "test.sh"

fails with this error message:

	'C:\Program' is not recognized as an internal or external command,
	operable program or batch file.

The recommended fix is to pass the /S option to `cmd.exe` and surround
the entire command-line by an extra set of quotes. And here lies the
rub: for that to work, we have to append an extra quote. At the end of
the command-line. *After* the last argument was appended, if any.

This commit supports that use case by introducing the option
"APPEND_QUOTE". The intended usage is to use the following string
resource:

	SHOW_CONSOLE=1 APPEND_QUOTE=1
	@@COMSPEC@@ /S /C \"\"@@EXEPATH@@\\usr\\bin\\bash.exe\" --login -i

(Note that there are only three quotes on that command-line, the fourth
to be appended due to the `APPEND_QUOTE` setting.)

This is (1/3) to fix https://github.com/git-for-windows/git/issues/396

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-09-29 16:45:54 +02:00
2015-09-29 16:45:49 +02:00
2015-09-29 16:45:48 +02:00
2015-09-29 16:45:48 +02:00
2015-09-29 16:45:47 +02:00
2015-09-29 16:45:53 +02:00
2015-08-03 11:01:27 -07:00
2015-08-25 14:57:08 -07:00
2015-08-25 14:57:08 -07:00
2015-08-11 13:48:15 -07:00
2015-09-29 16:45:20 +02:00
2015-08-03 11:01:21 -07:00
2015-08-03 11:01:21 -07:00
2015-08-03 11:01:27 -07:00
2015-09-29 16:45:47 +02:00
2015-05-20 10:19:12 -07:00
2015-06-29 11:39:10 -07:00
2015-06-25 10:47:46 -07:00
2015-08-31 15:38:52 -07:00
2015-05-26 13:24:46 -07:00
2015-09-29 16:45:20 +02:00
2015-08-19 14:48:56 -07:00
2015-08-03 11:01:18 -07:00
2015-09-28 13:18:19 -07:00
2015-09-29 16:45:49 +02:00
2015-08-03 11:01:27 -07:00
2015-09-29 16:45:49 +02:00
2015-09-04 10:43:23 -07:00
2015-09-29 16:45:51 +02:00
2015-08-25 14:57:09 -07:00
2015-08-25 14:57:08 -07:00
2015-09-17 12:16:17 -07:00
2015-06-05 12:17:37 -07:00
2015-05-22 09:33:08 -07:00
2015-08-25 14:57:08 -07:00
2015-09-01 16:31:07 -07:00
2015-08-25 14:57:09 -07:00
2015-08-03 11:01:27 -07:00
2015-08-31 15:39:03 -07:00
2015-09-09 14:30:35 -07:00
2015-06-05 12:17:37 -07:00
2015-08-11 14:29:36 -07:00

Git for Windows

Join the chat at https://gitter.im/git-for-windows/git

This is the source code of Git for Windows, forked from Git.

This project is run by a governance model. If you encounter problems, you can report them as GitHub issues, discuss them on Git for Windows' Google Group, and contribute bug fixes.

Description
A fork of Git containing Windows-specific patches.
Readme 462 MiB
2025-08-19 03:50:05 -05:00
Languages
C 51.7%
Shell 37.5%
Perl 4.3%
Tcl 3%
Python 0.8%
Other 2.5%