aboutsummaryrefslogtreecommitdiffstats
path: root/faq
diff options
context:
space:
mode:
authorBaptiste Jonglez <git@bitsofnetworks.org>2026-02-27 16:51:11 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2026-09-18 13:46:59 +0200
commitbd308735b3cfd40a57b20723a6e6862bf8303dc0 (patch)
tree030a8e64b5aaf3345c9ba130ee89593f7abcfe1c /faq
parent2e40a36b56f26593fe8fab4f07ed831395d5f0d2 (diff)
downloadcgit-bd308735b3cfd40a57b20723a6e6862bf8303dc0.tar.gz
cgit-bd308735b3cfd40a57b20723a6e6862bf8303dc0.tar.bz2
cgit-bd308735b3cfd40a57b20723a6e6862bf8303dc0.zip
cgit: Fix guessing default branch
Even when HEAD is set to "main" in a repository, cgit still uses the "master" branch to detect the age of the last commit. Example: $ cat repositories/openwrt/openwrt.git/HEAD ref: refs/heads/main $ stat repositories/openwrt/openwrt.git/refs/heads/master Modify: 2024-02-22 23:00:01.285731731 +0000 $ stat repositories/openwrt/openwrt.git/refs/heads/main Modify: 2026-02-27 15:33:49.506017172 +0000 In this situation, cgit displays "25 months" for this repository on the index page. I guess the internal format for HEAD has changed at some point, so it needs to be taken into account when parsing it in cgit. Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'faq')
0 files changed, 0 insertions, 0 deletions