[PATCH 0/2] maintenance: do not open console on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux