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
Jan 28, 2011, 11:04 UTC
Message-ID
<AANLkTi=9vwg9mvvyWax0jr1OmAr+JUn7TNt98=9MxR6G@mail.gmail.com>
In-Reply-To
<87sjwdmhrs.fsf@fox.patthoyts.tk>

On Fri, Jan 28, 2011 at 11:42, Pat Thoyts <patthoyts@users.sourceforge.net> wrote:

Show 10 quoted lines
> The commit comment for this doesn't really reflect whats being
> done. Commit 1ab8628 fixed the [Up To Parent] problem and this just
> fixes the display on the browser title.
>
> So I plan to take this with the commit comment as:
>
>  git-gui: fix display of path in browser title
>
>  Ensure the browser path is shown on the title with a / suffix and escape
>  any backslashes or newlines in path elements before display.

No, the main problem is, that the path does not end in a slash, but the browser code expect this, ie. it build sub pathes by just concatenating '$path' and '$file', or with '$dir/', without a slash inbetween. Its not only the visual part. Try this without the patch (int git.git):

git gui browse git-gui/

In the path line there should be now 'master:git-gui'. Than go into 'lib'. You have 'master:git-guilib/'. And than double click about.tcl, The blame view will get the 'git-guilib/about.tcl'.

Because the browser is itself consistent in this behavior, the only problem was when the browser was a path given to start with. And this path needs have a trailing slash. And this patch ensures this.

Bert
Show 8 quoted lines
>
>  Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>
> --
> Pat Thoyts                            http://www.patthoyts.tk/
> PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
>
>
Previous: Pat Thoyts
Message 4 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.