[LEDE-DEV] [patch master 10/15] quote literal {

Oswald Buddenhagen oswald.buddenhagen at gmx.de
Sat Oct 1 01:57:51 PDT 2016


On Sat, Oct 01, 2016 at 12:30:22AM +0200, Lars Kruse wrote:
> Am Fri, 30 Sep 2016 22:02:24 +0200 schrieb Jan-Tarek Butt <tarek at ring0.de>:
> 
> > ---
> >  scripts/getver.sh | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/getver.sh b/scripts/getver.sh
> > index f8b4ed3..27f246e 100755
> > --- a/scripts/getver.sh
> > +++ b/scripts/getver.sh
> > @@ -25,8 +25,8 @@ try_git() {
> >  		;;
> >  	*)
> >  		BRANCH="$(git rev-parse --abbrev-ref HEAD)"
> > -		ORIGIN="$(git rev-parse --verify --symbolic-full-name "${BRANCH}"@{u} 2>/dev/null)"
> > -		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
> > +		ORIGIN="$(git rev-parse --verify --symbolic-full-name "${BRANCH}"@'{'u'}' 2>/dev/null)"
> > +		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@'{'u'}' 2>/dev/null)" REV="$(git rev-list ${REBOOT}.."$GET_REV" | wc -l | awk '{print $1}')" 
> >  		if [ -n "$ORIGIN" ]; then
> 
> out of curiosity: does this prevent a potential problem or is it just a
> clarification for better readability?
> 
bash doesn't do anything with braces if there is no comma between them,
so this is a no-op. given the separate quoting of each brace, i'd
venture that this patch serves mostly to confuse the reader.



More information about the Lede-dev mailing list