I’m trying to get info about my stash, but git is telling me that stash@{0} and stash@{1} are ambiguous. git stash list works fine, and .git/logs/refs/stash seems to have the appropriate content (not that I’m an expert on git internals).
% git stash list
stash@{0}: On master: two
stash@{1}: On master: one
% git stash show stash@{1}
fatal: ambiguous argument 'stash@1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
Just plain git stash show works fine. So why are the names that git stash list gives me considered ambiguous?
Your shell is eating your curly brackets, so while you say
stash@{1}, git seesstash@1, and that makes no sense to it. Quote the argument (usegit stash apply "stash@{1}"orgit stash apply stash@"{1}"; quoting either way will work) or reconfigure your shell to only expand curly brackets when there is a comma between them (zsh can be configured either way; bash only expands curly brackets with a comma or range between them while other shells may behave differently).