Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintenance: do not open console on Windows #1570

Closed
wants to merge 2 commits into from

Commits on Aug 9, 2023

  1. 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>
    dscho authored and derrickstolee committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    6192cee View commit details
    Browse the repository at this point in the history
  2. git maintenance: avoid console window in scheduled tasks on Windows

    We just introduced a helper to avoid showing a console window when the
    scheduled task runs `git.exe`. Let's actually use it.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
    dscho authored and derrickstolee committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    d27cda4 View commit details
    Browse the repository at this point in the history