xbmc/xbmc — comment on commit 9ed430118886c56e478e9e7fdd308f21f13dcf85
File:  line 0
By Voyager-xbmc:

this is a catch22 situation. I understand now why you wanted the delayed expansion (the counter variable). However, windows doesn't allow to have "selective" local variables, which means GIT_REV is also local - everything is now considered local. So when leaving the extract_git_rev batch file the GIT_REV is reset to its value prior to calling the script ie. empty.