git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-gui: fix browser with initial path

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Dec 10, 2010, 08:48 UTC
Message-ID
<AANLkTim8BhN9czr6Jx5J28iNop4XdFDcNKbbjxddW9-i@mail.gmail.com>
In-Reply-To
<1290497870-28673-1-git-send-email-bert.wesarg@googlemail.com>
Ping.
On Tue, Nov 23, 2010 at 08:37, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
Show 33 quoted lines
> The path given to the browser does not end in a slash, which results in bad
> path given to blame and broke [Up To Parent]. Also the path was not
> escaped before displaying.
>
> Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>
> ---
>  git-gui/lib/browser.tcl |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/git-gui/lib/browser.tcl b/git-gui/lib/browser.tcl
> index c241572..a88a68b 100644
> --- a/git-gui/lib/browser.tcl
> +++ b/git-gui/lib/browser.tcl
> @@ -26,8 +26,14 @@ constructor new {commit {path {}}} {
>        wm withdraw $top
>        wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
>
> +       if {$path ne {}} {
> +               if {[string index $path end] ne {/}} {
> +                       append path /
> +               }
> +       }
> +
>        set browser_commit $commit
> -       set browser_path $browser_commit:$path
> +       set browser_path "$browser_commit:[escape_path $path]"
>
>        ${NS}::label $w.path \
>                -textvariable @browser_path \
> --
> tg: (6f10c41..) bw/git-gui/fix-browser-up (depends on: master)
>
Previous: Bert WesargNext: Pat Thoyts
Message 2 of 4 in “git-gui: fix browser with initial path”
  1. git-gui: fix browser with initial pathBert Wesarg, Nov 23, 2010
  2. Bert WesargDec 10, 2010
  3. Pat ThoytsJan 28, 2011
  4. Bert WesargJan 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.