Skip to content

Commit 765f1db

Browse files
committed
git-gui: don't delete source files when auto_mkindex fails
Commit 2cc5b0f (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 <[email protected]> Signed-off-by: Johannes Sixt <[email protected]>
1 parent 61f8788 commit 765f1db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate-tclindex.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ then
2323
: ok
2424
else
2525
echo >&2 " * $TCL_PATH failed; using unoptimized loading"
26-
rm -f $@
26+
rm -f lib/tclIndex
2727
echo '# Autogenerated by git-gui Makefile' >lib/tclIndex
2828
echo >>lib/tclIndex
2929
echo "class.tcl" >>lib/tclIndex

0 commit comments

Comments
 (0)