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

[PATCH 0/2] gitweb: shorten commitdiff index hashes with file modes

From
Travor Liu <travor_lzh@outlook.com>
Date
Jul 15, 2026, 09:11 UTC
Message-ID
<SA1PR10MB997715AD62D7F2AF64EB1A9887F1F82@SA1PR10MB997715.namprd10.prod.outlook.com>
From: Travor Liu <travor_lzh@outlook.com>

This series fixes gitweb rendering of commitdiff index lines that carry a trailing file mode, such as:

    index <old>..<new> 100644

gitweb currently recognizes the mode before matching the object IDs, which appends the file-type annotation first. The later object-ID matcher expects the ID range to end the line, so these common index lines keep two full, unlinked object IDs.

Patch 1 moves the mode handling so the index object IDs can still be shortened and linked.

Patch 2 adds a gitweb regression test for the common "index <old>..<new> 100644" form.

Tested with:
    make NO_RUST=YesPlease
    cd t && prove -v t9502-gitweb-standalone-parse-output.sh
Travor Liu (2):
  gitweb: shorten index hashes with trailing file modes
  t9502: test gitweb index hash formatting with modes
 gitweb/gitweb.perl                        | 18 +++++++++++++-----
 t/t9502-gitweb-standalone-parse-output.sh | 14 ++++++++++++++
 2 files changed, 27 insertions(+), 5 deletions(-)
-- 
2.52.0
Next: Travor Liu
Message 1 of 6 in “gitweb: shorten commitdiff index hashes with file modes”
  1. 0/2 gitweb: shorten commitdiff index hashes with file modesTravor Liu, Jul 15, 2026
  2. 1/2 gitweb: shorten index hashes with trailing file modesTravor Liu, Jul 15, 2026
  3. 2/2 t9502: test gitweb index hash formatting with modesTravor Liu, Jul 15, 2026
  4. Junio C HamanoJul 17, 2026
  5. Travor LiuJul 17, 2026
  6. gitweb: shorten index hashes with trailing file modesTravor Liu, Jul 17, 2026

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.