Re: git-1.7.3 breakage: "git stash show xxx" doesn't show anything
On 09/24/2010 02:19 PM, Robin H. Johnson wrote:
Show 26 quoted lines
> Downstream bug: http://bugs.gentoo.org/338586
>
> telling git-stash to show a specific stash no longer works with git-1.7.3:
> git stash show stash@{0}
> <no output!?>
>
> Downgrading to dev-vcs/git-1.7.2.3 and it works fine.
> Noticed on two stable amd64 systems.
>
> Reproduction:
> $ rm -rf foo && mkdir foo && cd foo
> $ git init
> Initialized empty Git repository in /home/vapier/foo/.git/
> $ echo f > f && git add f && git commit -qmm
> $ > f
> $ git stash
> Saved working directory and index state WIP on master: d287dea m
> HEAD is now at d287dea m
> $ git stash list | cat
> stash@{0}: WIP on master: d287dea m
> $ git stash show | cat
> f | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
> $ git stash show stash@{0} | cat
> <nothing!>
>diff --git a/git-stash.sh b/git-stash.sh
index 7ce818b..4fbfb62 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -265,7 +265,7 @@ parse_flags_and_rev()
i_tree=
REV=$(git rev-parse --no-flags --symbolic "$@" 2>/dev/null)
- FLAGS=$(git rev-parse --no-revs -- "$@" 2>/dev/null)
+ FLAGS=$(git rev-parse --no-revs --flags "$@" 2>/dev/null)
set -- $FLAGS