git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, johannes.schindelin@gmx.de,
	Derrick Stolee <derrickstolee@github.com>
Subject: [PATCH 0/2] maintenance: do not open console on Windows
Date: Wed, 09 Aug 2023 16:54:45 +0000	[thread overview]
Message-ID: <pull.1570.git.1691600087.gitgitgadget@gmail.com> (raw)

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

             reply	other threads:[~2023-08-09 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 16:54 Derrick Stolee via GitGitGadget [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1570.git.1691600087.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).