Merge tag 'gitgui-0.21.0' of git://repo.or.cz/git-gui
[gitweb.git] / git-gui / lib / tools.tcl
index 6ec94113db7d8c75d78e5300469bb8154e37c940..413f1a170079e0cec78ecdbd1adb7baeb83406f2 100644 (file)
@@ -69,6 +69,7 @@ proc tools_populate_one {fullname} {
 proc tools_exec {fullname} {
        global repo_config env current_diff_path
        global current_branch is_detached
+       global selected_paths
 
        if {[is_config_true "guitool.$fullname.needsfile"]} {
                if {$current_diff_path eq {}} {
@@ -100,6 +101,7 @@ proc tools_exec {fullname} {
 
        set env(GIT_GUITOOL) $fullname
        set env(FILENAME) $current_diff_path
+       set env(FILENAMES) [join [array names selected_paths] \n]
        if {$is_detached} {
                set env(CUR_BRANCH) ""
        } else {
@@ -121,6 +123,7 @@ proc tools_exec {fullname} {
 
        unset env(GIT_GUITOOL)
        unset env(FILENAME)
+       unset env(FILENAMES)
        unset env(CUR_BRANCH)
        catch { unset env(ARGS) }
        catch { unset env(REVISION) }