{"thread":{"id":"10191","subject":"Merge problems with git-mingw","startedAt":"2007-10-08T11:06:42Z","lastAt":"2007-10-10T07:00:12Z","messageCount":17,"participants":["Peter Karlsson","Lars Hjemli","Johannes Sixt","Steffen Prohaska","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55181","messageId":"Pine.LNX.4.64.0710081203020.29715@ds9.cixit.se","threadId":"10191","inReplyTo":null,"subject":"Merge problems with git-mingw","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-08T11:06:42Z","receivedAt":"2007-10-08T11:06:42Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Hi!\n\nI am running the mingw port of Git from a Cygwin environment, because I\nhad problems with the Cygwin version (not sure what the problem was,\nprobably a CRLF issue). Everything works fine, except for merging:\n\n  $ git merge master\n  usage: git-var [-l | <variable>]\n  $\n\nDoes anyone have any idea on what could cause that? (I've checked that\ngit-var is indeed the mingw version and not the Cygwin version).\n\n  $ git --version\n  git version 1.5.3.mingw.1\n\nI'm running on top of another version control system, so I need to\nswitch back to master and update the sources from upstream using that\nsystem's tools, and then merge it back into my branch. Without \"git\nmerge\" working, that is a bit problematic, to say the least... :-)\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"55182","messageId":"8c5c35580710080500n78259210v1b087e1ef506c0ee@mail.gmail.com","threadId":"10191","inReplyTo":"Pine.LNX.4.64.0710081203020.29715@ds9.cixit.se","subject":"Re: Merge problems with git-mingw","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-08T12:00:55Z","receivedAt":"2007-10-08T12:00:55Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/8/07, Peter Karlsson <peter@softwolves.pp.se> wrote:\n>   $ git merge master\n>   usage: git-var [-l | <variable>]\n>   $\n\nWhat does this command return?\n\n  $ git var GIT_COMMITTER_IDENT\n\n--\nlarsh\n"},{"id":"55183","messageId":"Pine.LNX.4.64.0710081333350.29715@ds9.cixit.se","threadId":"10191","inReplyTo":"8c5c35580710080500n78259210v1b087e1ef506c0ee@mail.gmail.com","subject":"Re: Merge problems with git-mingw","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-08T12:33:50Z","receivedAt":"2007-10-08T12:33:50Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"> What does this command return?\n> \n>   $ git var GIT_COMMITTER_IDENT\n\nDoesn't seem to work:\n\n  $ git var GIT_COMMITTER_IDENT\n  usage: git-var [-l | <variable>]\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"55187","messageId":"8c5c35580710080610y739fb51aga82964e212c7917f@mail.gmail.com","threadId":"10191","inReplyTo":"Pine.LNX.4.64.0710081333350.29715@ds9.cixit.se","subject":"Re: Merge problems with git-mingw","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-08T13:10:20Z","receivedAt":"2007-10-08T13:10:20Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/8/07, Peter Karlsson <peter@softwolves.pp.se> wrote:\n> > What does this command return?\n> >\n> >   $ git var GIT_COMMITTER_IDENT\n>\n> Doesn't seem to work:\n>\n>   $ git var GIT_COMMITTER_IDENT\n>   usage: git-var [-l | <variable>]\n\nSomething is weird with your setup and/or the mingw port, but you can\nprobably work around the issue by doing this:\n\n$ git config user.name \"your name\"\n$ git config user.email \"your email\"\n\nOptionally, you can add the --global flag to both commands to make the\nconfig visible in all of your repos.\n\n--\nlarsh\n"},{"id":"55195","messageId":"Pine.LNX.4.64.0710081555480.29570@ds9.cixit.se","threadId":"10191","inReplyTo":"8c5c35580710080610y739fb51aga82964e212c7917f@mail.gmail.com","subject":"Re: Merge problems with git-mingw","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-08T14:56:26Z","receivedAt":"2007-10-08T14:56:26Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Hi!\n\n> Something is weird with your setup and/or the mingw port, but you can\n> probably work around the issue by doing this:\n> \n> $ git config user.name \"your name\"\n> $ git config user.email \"your email\"\n\nBoth of those are configured properly, but even after configuring them\nlocally for the repository only, I get the same error with \"git var\".\nWeird.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"55204","messageId":"8c5c35580710081259j6d7e8587r546d4c35d42a67a6@mail.gmail.com","threadId":"10191","inReplyTo":"Pine.LNX.4.64.0710081555480.29570@ds9.cixit.se","subject":"Re: Merge problems with git-mingw","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-08T19:59:56Z","receivedAt":"2007-10-08T19:59:56Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"[Johannes CC'ed as the mingw.git maintainer]\n\nOn 10/8/07, Peter Karlsson <peter@softwolves.pp.se> wrote:\n> $ git var GIT_COMMITTER_IDENT\n> usage: git-var [-l | <variable>]\n\nDoes 'git var -l' work as expected? Also, could you try the latest\ngit-package provided by the cygwin installer? If CRLF-handling was\nyour problem, take a look at the description of core.autocrlf with\n'git help config'.\n\n[This does look like an issue with running mingw.git under Cygwin.\nJohannes, is this even supposed to work?]\n\n--\nlarsh\n"},{"id":"55228","messageId":"470B1B52.20009@viscovery.net","threadId":"10191","inReplyTo":"8c5c35580710081259j6d7e8587r546d4c35d42a67a6@mail.gmail.com","subject":"Re: Merge problems with git-mingw","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-09T06:10:26Z","receivedAt":"2007-10-09T06:10:26Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Lars Hjemli schrieb:\n> On 10/8/07, Peter Karlsson <peter@softwolves.pp.se> wrote:\n>> $ git var GIT_COMMITTER_IDENT\n>> usage: git-var [-l | <variable>]\n> \n> Does 'git var -l' work as expected? Also, could you try the latest\n> git-package provided by the cygwin installer? If CRLF-handling was\n> your problem, take a look at the description of core.autocrlf with\n> 'git help config'.\n> \n> [This does look like an issue with running mingw.git under Cygwin.\n> Johannes, is this even supposed to work?]\n\nSure, why not? Cygwin's settings as well as core.autocrlf should be \ncompletely irrelevant. I've no clue what could be wrong here.\n\n-- Hannes\n"},{"id":"55233","messageId":"Pine.LNX.4.64.0710090800220.26773@ds9.cixit.se","threadId":"10191","inReplyTo":"8c5c35580710081259j6d7e8587r546d4c35d42a67a6@mail.gmail.com","subject":"Re: Merge problems with git-mingw","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-09T07:06:17Z","receivedAt":"2007-10-09T07:06:17Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"HI!\n\n> Does 'git var -l' work as expected?\n\nHmm, it also gives an error message:\n\n$ git var -l\nusage: git-var [-l | <variable>]\n\n> Also, could you try the latest git-package provided by the cygwin\n> installer? If CRLF-handling was your problem, take a look at the\n> description of core.autocrlf with 'git help config'.\n\nI tried it with Git 1.5.3.2 from Cygwin, and the problem I'm having is\nnot with the CRLF handling in the checked out files, but rather in the\nrepository database itself. Cloning a repository with Cygwin-Git\nproduced various errors about the object database being corrupt.\nMingw-Git does not produce those errors.\n\n> [This does look like an issue with running mingw.git under Cygwin.\n> Johannes, is this even supposed to work?]\n\nI get the same error running mingw-git from a regular cmd.exe prompt,\nso it doesn't seem to be related to Cygwin at all.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"55237","messageId":"470B2F7E.4080308@viscovery.net","threadId":"10191","inReplyTo":"Pine.LNX.4.64.0710090800220.26773@ds9.cixit.se","subject":"Re: Merge problems with git-mingw","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-09T07:36:30Z","receivedAt":"2007-10-09T07:36:30Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Peter Karlsson schrieb:\n> I get the same error running mingw-git from a regular cmd.exe prompt,\n> so it doesn't seem to be related to Cygwin at all.\n\nWhat if you run 'git var -l' outside a repository? From CMD?\nHave you tried 'git-var -l' (note the dash)? From CMD?\nAre you sure you have only one version of git in the PATH?\nWhat's in your .git/config?\n\n-- Hannes\n"},{"id":"55239","messageId":"Pine.LNX.4.64.0710090953240.26773@ds9.cixit.se","threadId":"10191","inReplyTo":"470B2F7E.4080308@viscovery.net","subject":"Re: Merge problems with git-mingw","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2007-10-09T08:56:17Z","receivedAt":"2007-10-09T08:56:17Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Hi!\n\n> What if you run 'git var -l' outside a repository? From CMD?\n> Have you tried 'git-var -l' (note the dash)? From CMD?\n\nC:\\Program Files\\Git\\bin>git var -l\nusage: git-var [-l | <variable>]\n\nC:\\Program Files\\Git\\bin>git-var -l\nfatal: Not a git repository\n\nC:\\Program Files\\Git\\bin>git --version\ngit version 1.5.3.mingw.1\n\n> Are you sure you have only one version of git in the PATH?\n\nYes.\n\n> What's in your .git/config?\n\nThis is the .git/config file for one of the repositories where it\nfails:\n\n  [core]\n        repositoryformatversion = 0\n        filemode = false\n        bare = false\n        logallrefupdates = true\n        symlinks = false\n        pager = less -x3 -r\n\n  [instaweb]\n        local = true\n        httpd = c:/cygwin/usr/sbin/lighttpd.exe -f\n        port = 4321\n        browser = c:/progra~1/opera/opera.exe\n        modulepath = c:/cygwin/usr/lib/apache\n  [diff]\n        renames = copies\n        external = C:/Program Files/tkdiff/tkdiff.exe\n  [user]\n        name = Peter Karlsson\n        email = peter.karlsson@tandbergdata.com\n\nThis is my global $HOME/.gitconfig:\n\n  [user]\n  name = Peter Karlsson\n  email = peter@softwolves.pp.se\n  [core]\n          editor = c:/cygwin/bin/joe.exe\n          pager = less -x3 -r\n  [color]\n  [color]\n          pager = true\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"55240","messageId":"470B43D2.6090307@viscovery.net","threadId":"10191","inReplyTo":"Pine.LNX.4.64.0710090953240.26773@ds9.cixit.se","subject":"Re: Merge problems with git-mingw","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-09T09:03:14Z","receivedAt":"2007-10-09T09:03:14Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Peter Karlsson schrieb:\n> C:\\Program Files\\Git\\bin>git var -l\n> usage: git-var [-l | <variable>]\n> \n> C:\\Program Files\\Git\\bin>git-var -l\n> fatal: Not a git repository\n> \n> C:\\Program Files\\Git\\bin>git --version\n> git version 1.5.3.mingw.1\n\nFor the time being, install this beast in a path without blanks.\n\nThis needs fixing, appearently. :(\n\n-- Hannes\n"},{"id":"55290","messageId":"BA71DD45-9226-4661-9C92-60EEEA8638D0@zib.de","threadId":"10191","inReplyTo":"470B43D2.6090307@viscovery.net","subject":"Re: Merge problems with git-mingw","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-09T16:33:37Z","receivedAt":"2007-10-09T16:33:37Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Oct 9, 2007, at 11:03 AM, Johannes Sixt wrote:\n\n> Peter Karlsson schrieb:\n>> C:\\Program Files\\Git\\bin>git var -l\n>> usage: git-var [-l | <variable>]\n>> C:\\Program Files\\Git\\bin>git-var -l\n>> fatal: Not a git repository\n>> C:\\Program Files\\Git\\bin>git --version\n>> git version 1.5.3.mingw.1\n>\n> For the time being, install this beast in a path without blanks.\n>\n> This needs fixing, appearently. :(\n\nI have the printf 'callstack' below from the v1.5.3.mingw.1 version  \n(9c792c5)\nApparently spawnve, which is called in compat/mingw.c, corrupts argv.\n\nI have no idea how to continue debugging. Maybe some one else can  \ntake over.\n\n\tSteffen\n\n\n$ git var GIT_COMMITTER_IDENT\n\nargv at git.c:429\n3\nC:\\Program Files (x86)\\Git\\bin\\git.exe\nvar\nC:/Program Files (x86)/Git/bin/git-var\nGIT_COMMITTER_IDENT\n\nargv at compat/mingw.c:301\nC:/Program Files (x86)/Git/bin/git-var\nGIT_COMMITTER_IDENT\n(null)\n\nargv at var.c:54\n4\nC:/Program\nFiles\n(x86)/Git/bin/git-var\nGIT_COMMITTER_IDENT\nusage: git-var [-l | <variable>]\n"},{"id":"55292","messageId":"470BB44B.3030500@viscovery.net","threadId":"10191","inReplyTo":"BA71DD45-9226-4661-9C92-60EEEA8638D0@zib.de","subject":"Re: Merge problems with git-mingw","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-09T17:03:07Z","receivedAt":"2007-10-09T17:03:07Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Steffen Prohaska schrieb:\n> \n> On Oct 9, 2007, at 11:03 AM, Johannes Sixt wrote:\n> \n>> Peter Karlsson schrieb:\n>>> C:\\Program Files\\Git\\bin>git var -l\n>>> usage: git-var [-l | <variable>]\n>>> C:\\Program Files\\Git\\bin>git-var -l\n>>> fatal: Not a git repository\n>>> C:\\Program Files\\Git\\bin>git --version\n>>> git version 1.5.3.mingw.1\n>>\n>> For the time being, install this beast in a path without blanks.\n>>\n>> This needs fixing, appearently. :(\n> \n> I have the printf 'callstack' below from the v1.5.3.mingw.1 version \n> (9c792c5)\n> Apparently spawnve, which is called in compat/mingw.c, corrupts argv.\n\nThank you. Here is a quick-fix.\n\n-- Hannes\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8bb0dba..361216f 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -303,7 +303,7 @@ void openlog(const char *ident, int option,\n  {\n  }\n\n-static const char *quote_arg(const char *arg)\n+const char *quote_arg(const char *arg)\n  {\n  \t/* count chars to quote */\n  \tint len = 0, n = 0;\ndiff --git a/exec_cmd.c b/exec_cmd.c\nindex bad4843..7ab5a0f 100644\n--- a/exec_cmd.c\n+++ b/exec_cmd.c\n@@ -129,7 +129,8 @@ int execv_git_cmd(const char **argv)\n  \t\t */\n\n  \t\ttmp = argv[0];\n-\t\targv[0] = git_command;\n+\t\textern const char *quote_arg(const char *arg);\n+\t\targv[0] = quote_arg(git_command);\n\n  \t\ttrace_argv_printf(argv, -1, \"trace: exec:\");\n"},{"id":"55294","messageId":"alpine.LFD.0.999.0710091108480.5039@woody.linux-foundation.org","threadId":"10191","inReplyTo":"470BB44B.3030500@viscovery.net","subject":"Re: Merge problems with git-mingw","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-10-09T18:09:35Z","receivedAt":"2007-10-09T18:09:35Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 9 Oct 2007, Johannes Sixt wrote:\n>\n> +\t\textern const char *quote_arg(const char *arg);\n> +\t\targv[0] = quote_arg(git_command);\n\nExtern declarations inside a local scope will not work on more modern gcc \nversions. Don't do it. Do proper prototyping in proper scope.\n\n\t\tLinus\n"},{"id":"55317","messageId":"11919659771056-git-send-email-prohaska@zib.de","threadId":"10191","inReplyTo":"470BB44B.3030500@viscovery.net","subject":"[PATCH] exec_git_cmd: fix executing commands if path contains spaces","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-10-09T21:39:37Z","receivedAt":"2007-10-09T21:39:37Z","isPatch":true,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"This patch fixed executing of non-builtins if installation\ndir contains spaces. That is 'git var' works now.\n\nThe original patch is by Johannes Sixt <j.sixt@viscovery.net>.\n\nSigned-off-by: Steffen Prohaska <prohaska@zib.de>\n---\n compat/mingw.c    |    2 +-\n exec_cmd.c        |    2 +-\n git-compat-util.h |    1 +\n 3 files changed, 3 insertions(+), 2 deletions(-)\n\nOk, this is what I created from the quick-fix. It works for\nme in msysgit. \n\nShould the patch be polished that it can be applied to git.git\nor will we only apply it to 4msysgit?\n\nIf it should be polished, what would be the right way?\nifdef in exec_cmd.c?\n\n\tSteffen\n\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 6632192..0dd0cb0 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -196,7 +196,7 @@ void openlog(const char *ident, int option, int facility)\n {\n }\n \n-static const char *quote_arg(const char *arg)\n+const char *quote_arg(const char *arg)\n {\n \t/* count chars to quote */\n \tint len = 0, n = 0;\ndiff --git a/exec_cmd.c b/exec_cmd.c\nindex 2a8e48b..4c7c7ca 100644\n--- a/exec_cmd.c\n+++ b/exec_cmd.c\n@@ -132,7 +132,7 @@ int execv_git_cmd(const char **argv)\n \t\t */\n \n \t\ttmp = argv[0];\n-\t\targv[0] = git_command;\n+\t\targv[0] = quote_arg(git_command);\n \n \t\ttrace_argv_printf(argv, -1, \"trace: exec:\");\n \ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex ba5a1a1..5276221 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -482,6 +482,7 @@ int mingw_socket(int domain, int type, int protocol);\n #define fsync(x) 0\n \n extern void quote_argv(const char **dst, const char **src);\n+extern const char *quote_arg(const char *arg);\n extern const char *parse_interpreter(const char *cmd);\n \n extern __attribute__((noreturn)) int git_exit(int code);\n-- \n1.5.3.mingw.1.13.g70ed-dirty\n"},{"id":"55335","messageId":"470C6E58.3080208@viscovery.net","threadId":"10191","inReplyTo":"11919659771056-git-send-email-prohaska@zib.de","subject":"Re: [PATCH] exec_git_cmd: fix executing commands if path contains spaces","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-10T06:16:56Z","receivedAt":"2007-10-10T06:16:56Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Steffen Prohaska schrieb:\n> Ok, this is what I created from the quick-fix. It works for\n> me in msysgit. \n> \n> Should the patch be polished that it can be applied to git.git\n> or will we only apply it to 4msysgit?\n\nI'll apply it to mingw.git, and as long as you don't rebase or pull from \nthere, you'd also have to apply it to 4msysgit.\n\ngit.git is a no-go at this time - compat/mingw.c doesn't exist, yet.\n\n> If it should be polished, what would be the right way?\n> ifdef in exec_cmd.c?\n\nThis area needs more polishing, and it will be among the *last* mingw \npatches that flow upstream.\n\nBTW, I think the fix is incomplete anyway: We quote only argv[0], but \nactually all of argv should be quoted. Will test.\n\n-- Hannes\n"},{"id":"55340","messageId":"470C787C.6090900@viscovery.net","threadId":"10191","inReplyTo":"470C6E58.3080208@viscovery.net","subject":"[PATCH] Fix invocation of external git commands with arguments with spaces.","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-10-10T07:00:12Z","receivedAt":"2007-10-10T07:00:12Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"If an external git command (not a shell script) was invoked with arguments\nthat contain spaces, these arguments would be split into separate\narguments. They must be quoted. This also affected installations where\n$prefix contained a space, as in \"C:\\Program Files\\GIT\". Both errors can\nbe triggered by invoking\n\n     git hash-object \"a b\"\n\nwhere \"a b\" is an existing file.\n---\nJohannes Sixt schrieb:\n> BTW, I think the fix is incomplete anyway: We quote only argv[0], but \n> actually all of argv should be quoted. Will test.\n\nHere is the proper fix.\n\nYes, this leaks memory on the error path. We can clean that up later...\n\n-- Hannes\n\n  compat/mingw.c |    7 ++++++-\n  1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex 8bb0dba..2554f19 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -405,7 +405,12 @@ void mingw_execve()\n  {\n  \t/* check if git_command is a shell script */\n  \tif (!try_shell_exec(cmd, argv, env)) {\n-\t\tint ret = spawnve(_P_WAIT, cmd, argv, env);\n+\t\tconst char **qargv;\n+\t\tint n;\n+\t\tfor (n = 0; argv[n];) n++;\n+\t\tqargv = xmalloc((n+1)*sizeof(char*));\n+\t\tquote_argv(qargv, argv);\n+\t\tint ret = spawnve(_P_WAIT, cmd, qargv, env);\n  \t\tif (ret != -1)\n  \t\t\texit(ret);\n  \t}\n-- \n1.5.3.717.g01fc-dirty\n"}]}