git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] maintenance: do not open console on Windows
@ 2023-08-09 16:54 Derrick Stolee via GitGitGadget
  2023-08-09 16:54 ` [PATCH 1/2] win32: add a helper to run `git.exe` without a foreground window Johannes Schindelin via GitGitGadget
  2023-08-09 16:54 ` [PATCH 2/2] git maintenance: avoid console window in scheduled tasks on Windows Johannes Schindelin via GitGitGadget
  0 siblings, 2 replies; 3+ messages in thread
From: Derrick Stolee via GitGitGadget @ 2023-08-09 16:54 UTC (permalink / raw)
  To: git; +Cc: gitster, johannes.schindelin, Derrick Stolee

These two patches are cherry-picks of commits that have lived in
git-for-windows/git since 2019 when background maintenance was originally
introduced.

If we run the core Git project's version of background maintenance on a
Windows platform, then each background maintenance run will create a new
console window, visible to the user. This is due to quirks around how
Windows applications work: they require some parent application and will
create a console window if one does not exist.

This is solved by creating a new 'headless-git.exe' executable that knows
how to hide its own window. This isn't an appropriate change to make to
'git.exe' since that expects to be run within an existing console or
application.

 1. Patch 1 introduces the 'headless-git.exe' executable with the ability to
    hide its window.
 2. Patch 2 modifies the schtasks integration to use 'headless-git.exe'
    instead of 'git.exe'.

Thanks, -Stolee

Johannes Schindelin (2):
  win32: add a helper to run `git.exe` without a foreground window
  git maintenance: avoid console window in scheduled tasks on Windows

 Makefile                                   |   9 ++
 builtin/gc.c                               |   2 +-
 compat/win32/headless.c                    | 115 +++++++++++++++++++++
 config.mak.uname                           |   3 +
 contrib/buildsystems/CMakeLists.txt        |   9 ++
 contrib/buildsystems/Generators/Vcxproj.pm |   4 +-
 contrib/buildsystems/engine.pl             |   1 +
 7 files changed, 140 insertions(+), 3 deletions(-)
 create mode 100644 compat/win32/headless.c


base-commit: a82fb66fed250e16d3010c75404503bea3f0ab61
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1570%2Fderrickstolee%2Fheadless-git-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1570/derrickstolee/headless-git-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1570
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-09 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 16:54 [PATCH 0/2] maintenance: do not open console on Windows Derrick Stolee via GitGitGadget
2023-08-09 16:54 ` [PATCH 1/2] win32: add a helper to run `git.exe` without a foreground window Johannes Schindelin via GitGitGadget
2023-08-09 16:54 ` [PATCH 2/2] git maintenance: avoid console window in scheduled tasks on Windows Johannes Schindelin via GitGitGadget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).