win32: add a helper to run `git.exe` without a foreground window
commit4b8a2717bb5ea6b787e0037174dcbf53ccf4985c
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 9 Aug 2023 16:54:46 +0000 (9 16:54 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Aug 2023 20:58:13 +0000 (9 13:58 -0700)
tree7a56f02d61cc26098fa3b856431535baa056a0c8
parentfb7d80edcae482f4fa5d4be0227dc3054734e5f3
win32: add a helper to run `git.exe` without a foreground window

On Windows, there are two kinds of executables, console ones and
non-console ones. Git's executables are all console ones.

When launching the former e.g. in a scheduled task, a CMD window pops
up. This is not what we want for the tasks installed via the `git
maintenance` command.

To work around this, let's introduce `headless-git.exe`, which is a
non-console program that does _not_ pop up any window. All it does is to
re-launch `git.exe`, suppressing that console window, passing through
all command-line arguments as-are.

Helped-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Helped-by: Yuyi Wang <Strawberry_Str@hotmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
compat/win32/headless.c [new file with mode: 0644]
config.mak.uname
contrib/buildsystems/CMakeLists.txt
contrib/buildsystems/Generators/Vcxproj.pm
contrib/buildsystems/engine.pl