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

Re: [PATCH] gitweb: Fix links to lines in blobs when javascript-actions are enabled

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2011, 17:17 UTC
Message-ID
<7v7h4tykf3.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1317117060-3955-1-git-send-email-peter@stuge.se>
Peter Stuge <peter@stuge.se> writes:
Show 11 quoted lines
> Some javascript code will run in the browser onLoad and signals back to
> gitweb that the browser can actually do javascript.
>
> The code adds [?;]js=1 into the URL of all links on the page. The code
> always added [?;]js=1 to the end of links, which is wrong when links
> contain a URI fragment, such as links directly to a line in a blob:
> ..?p=repo.git;a=blob;f=file#l123
>
> In this case, [?;]js=1 must be added before the hashmark.
>
> Signed-off-by: Peter Stuge <peter@stuge.se>

Nicely done. You forgot to mention another bug you fixed (see Jakub's sample in the thread), so I'll amend in a few sentences to describe it as well.

Thanks.
Previous: Peter StugeNext: Peter Stuge
Message 9 of 14 in “gitweb: Add js=1 before an URI fragment to fix line number links”
  1. gitweb: Add js=1 before an URI fragment to fix line number linksPeter Stuge, Sep 26, 2011
  2. Junio C HamanoSep 26, 2011
  3. Peter StugeSep 26, 2011
  4. Junio C HamanoSep 26, 2011
  5. Peter StugeSep 26, 2011
  6. Johannes SixtSep 27, 2011
  7. Peter StugeSep 27, 2011
  8. gitweb: Fix links to lines in blobs when javascript-actions are enabledPeter Stuge, Sep 27, 2011
  9. Junio C HamanoSep 27, 2011
  10. Peter StugeSep 28, 2011
  11. Junio C HamanoSep 27, 2011
  12. Junio C HamanoSep 26, 2011
  13. Peter StugeSep 26, 2011
  14. Jakub NarebskiSep 26, 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.