Thanks, Jonathan. That did indeed fix it. Thanks for your help and clarification that it does indeed work in my shell when escaped properly. On Wed, Nov 3, 2010 at 10:07 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Hi Brian, > > Brian Riehman wrote: > >> The stash command relies on bash-specific shell scripting techniques > > Git actually uses the ${var%glob} syntax pretty widely, and it is > fairly portable (see http://unix.org/2008edition/ and search for "sh -" > for details). I suspect the problem is rather the seemingly-unbalanced > braces: > >> < if test "${REV}" != "${REV%{*\}}" > > How about this patch? > > Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> > --- > diff --git a/git-stash.sh b/git-stash.sh > index 5fb1245..0a41226 100755 > --- a/git-stash.sh > +++ b/git-stash.sh > @@ -311,7 +311,7 @@ parse_flags_and_rev() > test "$ref_stash" = "$(git rev-parse --symbolic-full-name "${REV%@*}")" && > IS_STASH_REF=t > > - if test "${REV}" != "${REV%{*\}}" > + if test "${REV}" != "${REV%\{*\}}" > then > # maintainers: it would be better if git rev-parse indicated > # this condition with a non-zero status code but as of 1.7.2.1 it > -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html