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

Re: vcs_info: '%' in payloads not escaped



Bart Schaefer wrote on Fri, Jan 06, 2017 at 07:55:24 -0800:
> On Jan 5,  4:07pm, Daniel Shahaf wrote:
> }
> } How about the following?
> } 
> } [[[
> } @@ -131,12 +131,14 @@ VCS_INFO_git_handle_patches () {
> }          else
> }              git_applied_s=""
> }          fi
> } +        git_applied_s=${git_applied_s//'%'/%%}
> }      else
> }          git_applied_s=${hook_com[applied-string]}
> }      fi
> 
> Shouldn't that + go above the "else"?  No point in substituting on
> git_applied_s when it has just been set to "" ?

I was just future-proofing the code against potential future changes in
the 'else' branch.  See users/22290 ;-)



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