Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-gui: add support for filenames starting with tilde #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,7 @@ proc do_explore {} {
# Open file relative to the working tree by the default associated app.
proc do_file_open {file} {
global _gitworktree
if {[string index $file 0] eq {~}} {set file ./$file}
set explorer [get_explorer]
set full_file_path [file join $_gitworktree $file]
exec $explorer [file nativename $full_file_path] &
Expand Down
1 change: 1 addition & 0 deletions lib/diff.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ proc show_other_diff {path w m cont_info} {
set max_sz 100000
set type unknown
if {[catch {
if {[string index $path 0] eq {~}} {set path ./$path}
set type [file type $path]
switch -- $type {
directory {
Expand Down
2 changes: 1 addition & 1 deletion lib/index.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ proc delete_helper {path_list path_index deletion_errors batch_size \

set path [lindex $path_list $path_index]

set deletion_failed [catch {file delete -- $path} deletion_error]
set deletion_failed [catch {file delete -- ./$path} deletion_error]

if {$deletion_failed} {
lappend deletion_errors [list "$deletion_error"]
Expand Down