Fix gitk.cmd to work correctly when paths contain ampersand (&) symbol by ADTC · Pull Request #252 · msysgit/msysgit
added 2 commits
September 15, 2014 17:38With the immediate expansion, paths containing the ampersand symbol (&) will not work in this script. This is likely to occur when the user profile is located in a folder that contains the symbol in its name. The command processor misinterprets the symbol as to mean the union of two separate commands. To avoid the issue, "delayed expansion" is used and the environment variables are demarcated using the exclamation mark (!) instead of the percentage symbol (%). Signed-off-by: ADTC <send2adtc@gmail.com>
Taking cue from start-ssh-agent.cmd, enhanced gitk.cmd to fallback to the immediate expansion script if delayed expansion is unavailable. Both script sections are the same, except for the different environment variable delimiters. When new changes are made, both sections must be updated correctly, taking care to use the correct delimiter (! or %) to demarcate the environment variables. (In fact, the fallback section is exactly the same as the original script before previous commit.) Signed-off-by: ADTC <send2adtc@gmail.com>
dscho added a commit that referenced this pull request
Sep 15, 2014This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters