]> rtime.felk.cvut.cz Git - sojka/gitk.git/blobdiff - gitk
gitk: Make "touching paths" search support backslashes
[sojka/gitk.git] / gitk
diff --git a/gitk b/gitk
index 18e3626845677cfcfd6ab95a8ec52af75307e13a..a701e0d1a5221e5e4653bf124227b297af41695b 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -4522,9 +4522,14 @@ proc makepatterns {l} {
 
 proc do_file_hl {serial} {
     global highlight_files filehighlight highlight_paths gdttype fhl_list
-    global cdup
+    global cdup findtype
 
     if {$gdttype eq [mc "touching paths:"]} {
+       # If "exact" match then convert backslashes to forward slashes.
+       # Most useful to support Windows-flavoured file paths.
+       if {$findtype eq [mc "Exact"]} {
+           set highlight_files [string map {"\\" "/"} $highlight_files]
+       }
        if {[catch {set paths [shellsplit $highlight_files]}]} return
        set highlight_paths [makepatterns $paths]
        highlight_filelist