Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _git: Quote the return value of __git_committish_range{first,last}



Wieland Hoffmann wrote on Wed, Aug 12, 2015 at 11:36:17 +0200:
> Otherwise, __git_is_committish_range performs word splitting if it's
> passed a range that includes spaces (like "master@{1 week ago}..master").
...
> -  local first=$(__git_committish_range_first $1)
> -  local last=$(__git_committish_range_last $1)
> +  local first="$(__git_committish_range_first $1)"
> +  local last="$(__git_committish_range_last $1)"

I see this has been applied, but for future reference, note that it is
only necessary for 5.0.8 and older, since in zsh from git 'local' is
a reserved word and
    local x=$(echo foo bar)
doesn't perform word splitting.

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author