git/list[1] front-page[2] threads[3] people[4] search[5] about
 

BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works

From
EREric Raible <raible@gmail.com>
Date
Jun 4, 2008, 23:46 UTC
Message-ID
<279b37b20806041646jc29a695w685c3e01efc0dd0b@mail.gmail.com>

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
Next: Johannes Schindelin
Message 1 of 3 in “BUG: "git stash apply <arg>" broken, "git-stash apply <arg>" works”
  1. Eric RaibleJun 4, 2008
  2. Johannes SchindelinJun 5, 2008
  3. Eric RaibleJun 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.