Git development
 help / color / mirror / Atom feed
* BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works
@ 2008-06-04 23:46 Eric Raible
  2008-06-05  0:13 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Raible @ 2008-06-04 23:46 UTC (permalink / raw)
  To: git; +Cc: nanako3, gitster

Synopsis:
"git stash apply stash@{1}" doesn't work, but
"git-stash apply stash@{1}" does.

Platform:
win xp (yeah, I know, I know)
msys (Git-1.5.5-preview20080413.exe)
git version 1.5.5.1015.g9d258

To reproduce:
	# Create a minimal repo
	mkdir stash-bug
	cd stash-bug
	git init
	echo line1 > file
	git add file
	git commit -m initial

	# Create the stash that we'll use
	echo "This is correct" > file
	git stash save "Save off correct line in what will be stash@{1}"

	# Create another stash (the default one) which we won't use
	echo "This should not be shown" > file
	git stash save "Save off incorrect line in what will be stash@{0}"

	# They are correctly created
	git stash list

	# "git-stash apply arg" works
	git reset --hard
	git-stash apply stash@{1}
	echo "git-stash apply respects its argument"
	cat file

	# But "git stash apply arg" doesn't
	git reset --hard
	git stash apply stash@{1}
	echo "git stash apply (no dash) doesn't respect its argument"
	cat file

- Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works
  2008-06-04 23:46 BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works Eric Raible
@ 2008-06-05  0:13 ` Johannes Schindelin
  2008-06-05 11:17   ` Eric Raible
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2008-06-05  0:13 UTC (permalink / raw)
  To: Eric Raible; +Cc: git, nanako3, gitster

Hi,

On Wed, 4 Jun 2008, Eric Raible wrote:

> Synopsis:
> "git stash apply stash@{1}" doesn't work, but
> "git-stash apply stash@{1}" does.
> 
> Platform:
> win xp (yeah, I know, I know)
> msys (Git-1.5.5-preview20080413.exe)

This is most likely an issue with MSys, not Git.  As far as I know, 
Steffen started to have a look at it, but I do not really know: I took my 
retreat from msysGit.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works
  2008-06-05  0:13 ` Johannes Schindelin
@ 2008-06-05 11:17   ` Eric Raible
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Raible @ 2008-06-05 11:17 UTC (permalink / raw)
  To: git

Johannes Schindelin <Johannes.Schindelin <at> gmx.de> writes:

> 
> This is most likely an issue with MSys, not Git.  As far as I know, 
> Steffen started to have a look at it, but I do not really know: I took my 
> retreat from msysGit.
> 
> Ciao,
> Dscho
> 

Not surprisingly this was exactly right, and I just posted a patch on
http://code.google.com/p/msysgit/ which fixes it.  It turns out that
command lines passed to CreateProcess() which contain '{' need to be
quoted (specifically quote_arg() needs to set 'force_quotes' to 1).

Thanks for the pointer.

- Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-05 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 23:46 BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works Eric Raible
2008-06-05  0:13 ` Johannes Schindelin
2008-06-05 11:17   ` Eric Raible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox