]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-gui: don't delete source files when auto_mkindex fails
authorJohannes Sixt <j6t@kdbg.org>
Fri, 6 Jun 2025 05:41:42 +0000 (07:41 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Fri, 6 Jun 2025 05:43:37 +0000 (07:43 +0200)
Commit 2cc5b0facfa4 (git-gui: extract script to generate "tclIndex",
2025-03-11) converted commands in a Makefile rule to a shell script.
In this process, the Makefile variable $@ had to be replaced by the
file name that it represents, 'lib/tclIndex'. However, the occurrence
in `rm -f $@` was missed. In a shell script, $@ expands to all
command line arguments, which happen to be the source files lib/*.tcl
in this case. Needless to say that we do not want to remove source
files during a build. Replace $@ by the intended 'lib/tclIndex'.

Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
generate-tclindex.sh

index 36e3a0bd90eefa56469b004acceab02bc18e5278..0b031d8339c44398bfa310e9f631bd37afcf6190 100755 (executable)
@@ -23,7 +23,7 @@ then
        : ok
 else
         echo >&2 "    * $TCL_PATH failed; using unoptimized loading"
-        rm -f $@
+        rm -f lib/tclIndex
         echo '# Autogenerated by git-gui Makefile' >lib/tclIndex
         echo >>lib/tclIndex
         echo "class.tcl" >>lib/tclIndex