{"thread":{"id":"13805","subject":"BUG: \"git stash apply <arg>\" broken, \"git-stash apply <arg>\" works","startedAt":"2008-06-04T23:46:56Z","lastAt":"2008-06-05T11:17:05Z","messageCount":3,"participants":["Eric Raible","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"78679","messageId":"279b37b20806041646jc29a695w685c3e01efc0dd0b@mail.gmail.com","threadId":"13805","inReplyTo":null,"subject":"BUG: \"git stash apply <arg>\" broken, \"git-stash apply <arg>\" works","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2008-06-04T23:46:56Z","receivedAt":"2008-06-04T23:46:56Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"Synopsis:\n\"git stash apply stash@{1}\" doesn't work, but\n\"git-stash apply stash@{1}\" does.\n\nPlatform:\nwin xp (yeah, I know, I know)\nmsys (Git-1.5.5-preview20080413.exe)\ngit version 1.5.5.1015.g9d258\n\nTo reproduce:\n\t# Create a minimal repo\n\tmkdir stash-bug\n\tcd stash-bug\n\tgit init\n\techo line1 > file\n\tgit add file\n\tgit commit -m initial\n\n\t# Create the stash that we'll use\n\techo \"This is correct\" > file\n\tgit stash save \"Save off correct line in what will be stash@{1}\"\n\n\t# Create another stash (the default one) which we won't use\n\techo \"This should not be shown\" > file\n\tgit stash save \"Save off incorrect line in what will be stash@{0}\"\n\n\t# They are correctly created\n\tgit stash list\n\n\t# \"git-stash apply arg\" works\n\tgit reset --hard\n\tgit-stash apply stash@{1}\n\techo \"git-stash apply respects its argument\"\n\tcat file\n\n\t# But \"git stash apply arg\" doesn't\n\tgit reset --hard\n\tgit stash apply stash@{1}\n\techo \"git stash apply (no dash) doesn't respect its argument\"\n\tcat file\n\n- Eric\n"},{"id":"78682","messageId":"alpine.DEB.1.00.0806050112550.21190@racer","threadId":"13805","inReplyTo":"279b37b20806041646jc29a695w685c3e01efc0dd0b@mail.gmail.com","subject":"Re: BUG: \"git stash apply <arg>\" broken, \"git-stash apply <arg>\" works","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-06-05T00:13:46Z","receivedAt":"2008-06-05T00:13:46Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 4 Jun 2008, Eric Raible wrote:\n\n> Synopsis:\n> \"git stash apply stash@{1}\" doesn't work, but\n> \"git-stash apply stash@{1}\" does.\n> \n> Platform:\n> win xp (yeah, I know, I know)\n> msys (Git-1.5.5-preview20080413.exe)\n\nThis is most likely an issue with MSys, not Git.  As far as I know, \nSteffen started to have a look at it, but I do not really know: I took my \nretreat from msysGit.\n\nCiao,\nDscho\n"},{"id":"78744","messageId":"loom.20080605T110928-264@post.gmane.org","threadId":"13805","inReplyTo":"alpine.DEB.1.00.0806050112550.21190@racer","subject":"Re: BUG: \"git stash apply <arg>\" broken, \"git-stash apply <arg>\" works","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2008-06-05T11:17:05Z","receivedAt":"2008-06-05T11:17:05Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"Johannes Schindelin <Johannes.Schindelin <at> gmx.de> writes:\n\n> \n> This is most likely an issue with MSys, not Git.  As far as I know, \n> Steffen started to have a look at it, but I do not really know: I took my \n> retreat from msysGit.\n> \n> Ciao,\n> Dscho\n> \n\nNot surprisingly this was exactly right, and I just posted a patch on\nhttp://code.google.com/p/msysgit/ which fixes it.  It turns out that\ncommand lines passed to CreateProcess() which contain '{' need to be\nquoted (specifically quote_arg() needs to set 'force_quotes' to 1).\n\nThanks for the pointer.\n\n- Eric\n"}]}