]> source.dussan.org Git - gitblit.git/commit
Set local variable visibility in batch scripts
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Wed, 21 Jul 2021 07:54:27 +0000 (09:54 +0200)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Wed, 21 Jul 2021 17:33:42 +0000 (19:33 +0200)
commit159f7fcf759a4d779d50173c6aa866915fb60a62
tree7a434c92c07a6e3b30c5b9ff2c32d0495d8ea5e7
parentd42411430114374bde004f38dae506704ceb3d3f
Set local variable visibility in batch scripts

Use SETLOCAL in batch scripts to restrict the visibility of variables
that are set in the script to the script execution. Otherwise the variables
will also be set in the calling shell. That is not a problem when a script
is executed by double clicking it in Windows Explorer. But now that the
scripts are changed so that they can be called on the command line from
other folders, they should also no clutter the calling environment.
src/main/distrib/win/add-indexed-branch.cmd
src/main/distrib/win/installService.cmd
src/main/distrib/win/uninstallService.cmd