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

Re: [PATCH] gitweb: snapshot cleanups & support for offering multiple formats

From
Matt McCutchen <hashproduct@gmail.com>
Date
Jul 22, 2007, 15:05 UTC
Message-ID
<3bbc18d20707220805hd95c4ccsc48f140888403391@mail.gmail.com>
In-Reply-To
<7vd4ylt3eh.fsf@assigned-by-dhcp.cox.net>
On 7/22/07, Junio C Hamano <gitster@pobox.com> wrote:
> Thanks.  Will apply.

Jakub, thanks for picking this up. I was running out of energy to push what began as an offer of a possibly useful local customization any further toward adoption.

That said: the backward compatibility code for gitweb _site_ configuration is broken because it is inside an if statement that only runs for gitweb _repository_ configuration. I tested it with a gitweb_config.perl with

$feature{'snapshot'}{'default'} = ['x-gzip', 'gz', 'gzip']; $feature{'snapshot'}{'override'} = 0;

and gitweb generated "snapshot ( )" (no visible link). Inspection of the source revealed links to "sf=x-gzip", "sf=gz", and "sf=gzip" with empty strings for the link text. The expected behavior is "_snapshot_", linking to "sf=tgz", with a tooltip indicating "tar.gz" format.

Moving the code out of the `if' wouldn't solve the problem by itself because feature_snapshot is only reached if override is enabled, but the site configuration compatibility needs to work whether or not override is enabled. That's why Junio was considering adding a separate function gitweb_bc_feature_snapshot. I think a nicer alternative would be to change gitweb_check_feature to call the sub (if any) whether or not override is enabled and let the sub check $feature{'foo'}{'override'} itself to decide whether to look for an override. Then each feature_* sub is the central point for both override processing and backward compatibility for that feature.

Matt
Previous: Junio C HamanoNext: Jakub Narebski
Message 25 of 35 in “gitweb: snapshot cleanups & support for offering multiple formats”
  1. gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen, Jun 28, 2007
  2. Junio C HamanoJul 7, 2007
  3. Junio C HamanoJul 8, 2007
  4. Jakub NarebskiJul 11, 2007
  5. Junio C HamanoJul 11, 2007
  6. Matt McCutchenJul 12, 2007
  7. Jakub NarebskiJul 12, 2007
  8. Matt McCutchenJul 17, 2007
  9. gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen, Jul 17, 2007
  10. Jakub NarebskiJul 18, 2007
  11. Junio C HamanoJul 19, 2007
  12. Luben TuikovJul 19, 2007
  13. Jakub NarebskiJul 19, 2007
  14. Luben TuikovJul 19, 2007
  15. gitweb: Enable transparent compression form HTTP outputJakub Narebski, Jul 25, 2007
  16. Petr BaudisAug 25, 2007
  17. Jakub NarebskiAug 25, 2007
  18. Petr BaudisAug 25, 2007
  19. Jakub NarebskiAug 27, 2007
  20. Jakub NarebskiJul 19, 2007
  21. Junio C HamanoJul 20, 2007
  22. Jakub NarebskiJul 19, 2007
  23. gitweb: snapshot cleanups & support for offering multiple formatsJakub Narebski, Jul 21, 2007
  24. Junio C HamanoJul 22, 2007
  25. Matt McCutchenJul 22, 2007
  26. gitweb: Fix support for legacy gitweb config for snapshotsJakub Narebski, Jul 22, 2007
  27. Matt McCutchenJul 22, 2007
  28. Junio C HamanoJul 22, 2007
  29. Junio C HamanoJul 8, 2007
  30. Matt McCutchenJul 9, 2007
  31. gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen, Jul 9, 2007
  32. Jakub NarebskiJul 10, 2007
  33. Junio C HamanoJul 9, 2007
  34. gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen, Jul 10, 2007
  35. gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen, Jul 10, 2007

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.