Skip to content

Commit 2c66188

Browse files
mark987ttaylorr
authored andcommitted
git-gui: remove unused proc is_shellscript
Commit 7d076d5 (git-gui: handle shell script text filters when loading for blame, 2011-12-09) added is_shellscript to test if a file is executable by the shell, used only when searching for textconv filters. The previous commit rearranged the tests for finding such filters, and removed the only user of is_shellscript. Remove this function. Signed-off-by: Mark Levedahl <[email protected]> Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent 4eb9b11 commit 2c66188

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

git-gui.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -549,16 +549,6 @@ proc _git_cmd {name} {
549549
return $v
550550
}
551551

552-
# Test a file for a hashbang to identify executable scripts on Windows.
553-
proc is_shellscript {filename} {
554-
if {![file exists $filename]} {return 0}
555-
set f [open $filename r]
556-
fconfigure $f -encoding binary
557-
set magic [read $f 2]
558-
close $f
559-
return [expr {$magic eq "#!"}]
560-
}
561-
562552
# Run a shell command connected via pipes on stdout.
563553
# This is for use with textconv filters and uses sh -c "..." to allow it to
564554
# contain a command with arguments. We presume this

0 commit comments

Comments
 (0)