From: Mark Levedahl Date: Sun, 31 May 2026 23:02:23 GMT Subject: [PATCH v3 10/12] git-gui: allow specifying path '.' to the browser Message-ID: <20260531230225.126817-11-mlevedahl@gmail.com> In-Reply-To: <20260531230225.126817-1-mlevedahl@gmail.com> Invoking "git-gui browser rev ." should show the file browser for the commitish rev, starting at the current directory. When the current directory is the working tree root, this errors out in normalize_relpath because the '.' is removed, yielding an empty list as argument to [file join ...]. git ls-tree (underlying the browser) accepts '.', so use that as the value when in the root. Signed-off-by: Mark Levedahl --- git-gui.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-gui.sh b/git-gui.sh index f48d929da8..16d6b3051a 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2993,7 +2993,11 @@ proc normalize_relpath {path} { } lappend elements $item } - return [eval file join $elements] + if {$elements ne {}} { + return [eval file join $elements] + } else { + return {.} + } } # -- Not a normal commit type invocation? Do that instead! -- 2.54.0.99.14