From d25617e2686dd4afe62276351eedc37c8e58bab7 Mon Sep 17 00:00:00 2001 From: Nico Rieck Date: Sun, 31 May 2015 01:18:22 +0200 Subject: [PATCH] git-wrapper: let git gui run in the background This fixes https://github.com/git-for-windows/git/issues/172. Signed-off-by: Nico Rieck Signed-off-by: Johannes Schindelin --- compat/win32/git-wrapper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compat/win32/git-wrapper.c b/compat/win32/git-wrapper.c index f888064defb232..1e214af2a4c4a6 100644 --- a/compat/win32/git-wrapper.c +++ b/compat/win32/git-wrapper.c @@ -163,6 +163,10 @@ static LPWSTR fixup_commandline(LPWSTR exepath, LPWSTR *exep, int *wait, } wcscat(cmd, p); } + + if (wargc > 1 && !wcscmp(wargv[1], L"gui")) + *wait = 0; + LocalFree(wargv); return cmd; @@ -342,6 +346,7 @@ int main(void) } else if (!wcsicmp(basename, L"git-gui.exe")) { static WCHAR buffer[BUFSIZE]; + wait = 0; allocate_console = 1; if (!PathRemoveFileSpec(exepath)) { fwprintf(stderr,