From: Johannes Sixt Date: Fri, 15 May 2026 15:54:25 GMT Subject: Re: [PATCH v1 01/11] git-gui: allow specifying path '.' to the browser Message-ID: <796217c3-8998-47a8-9a46-298541708d41@kdbg.org> In-Reply-To: <20260514143322.865587-2-mlevedahl@gmail.com> Am 14.05.26 um 16:33 schrieb Mark Levedahl: > Invoking "git-gui browser rev ." should show the file browser for the > commitish rev, starting at the root directory. This errors out in > normalize_relpath because the '.' is removed, yielding an empty list as > argument to [file join ...]. Fix this. Good catch! The description isn't precise, though. '.' means to list the current directory. The mentioned problem happens only if this is also the root of the working tree. > > 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 23fe76e..6048f92 100755 > --- a/git-gui.sh > +++ b/git-gui.sh > @@ -2965,7 +2965,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! -- Hannes