From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30263 invoked from network); 8 Jan 2022 22:28:24 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 8 Jan 2022 22:28:24 -0000 Received: by lists.zx2c4.com (OpenSMTPD) with ESMTP id 6baa4c75; Sat, 8 Jan 2022 22:28:07 +0000 (UTC) Return-Path: Received: from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com [136.143.188.11]) by lists.zx2c4.com (OpenSMTPD) with ESMTPS id 14f6190b (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO) for ; Sat, 8 Jan 2022 22:28:06 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1641680883; cv=none; d=zohomail.com; s=zohoarc; b=cpovOplNRqjq+Ewl3FQqFO9HF6+5vTlYumDvf7QQiXtSPPcz5VqAw+F1dGHJ3BYVz8XhqkXb+ow3B4/DyhgkBMkup9pIqlCjmM4BkkylUZ0wkCEHTKrehARSqtcqhtrhMiXEfvP0eeksbG2kQkZnl1CXnVrs7hSOAxCOr+y6JEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641680883; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=g4Hwg95pjUrtO6U09rWLWS1WHpZnypGADZrURtSLFJs=; b=JhztbAgkZT2tPnp2q8woiFyoegWhEs9mG5kvHuVmiWXOWa07TIhhXc+IxyrhCXtxKHt0cJGQptDSU1LmnbnNYvz2s4qhTUSABvfOsGS37RI7/jO6s0huxmhHMoKB0opzyKTRhCufZam3U9kP1AcOp0b7JegB+9XK+R3MzVA2SoI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=nilfm.cc; spf=pass smtp.mailfrom=nilix@nilfm.cc; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1641680883; s=zoho; d=nilfm.cc; i=nilix@nilfm.cc; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; bh=g4Hwg95pjUrtO6U09rWLWS1WHpZnypGADZrURtSLFJs=; b=WqvpDu/EFOArOi3vSbZmCcWGzP4NEUiHnyDCf6i5DEKbcaodpbmQ+eyzirSqNglA f/uyptRTJiej60sbTQFbyVWS6h5wqt7eM1o6crtCdI+Z2mFgf0wyVH5K6Sl0kI5b4/Y pidNV2Ia9enLBilLzsYTlAakx/DD0ODIjNqIprYc= Received: from ksatrya.siroonian.local (c-76-127-49-136.hsd1.nm.comcast.net [76.127.49.136]) by mx.zohomail.com with SMTPS id 1641680881868541.3917410744712; Sat, 8 Jan 2022 14:28:01 -0800 (PST) Date: Sat, 8 Jan 2022 15:28:00 -0700 From: Derek Stevens To: cgit@lists.zx2c4.com Subject: patches: main as default branch, go gettable Message-ID: <20220108222800.gesev62brvbbd3wi@ksatrya.siroonian.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mnusnuvido6yhliw" Content-Disposition: inline X-Zoho-Virus-Status: 1 X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" --mnusnuvido6yhliw Content-Type: multipart/mixed; boundary="ai6ui7shrvasmprh" Content-Disposition: inline --ai6ui7shrvasmprh Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Hello CGit folk! I use cgit for my own git server and have made some minor modifications that might be of interest. The first is the trivial change to assume main as the default branch name, as this is the new standard in git. The second and more interesting is to add a attribute to make a repository go-gettable. Both patches are attached; Happy new year and happy hacking! Cheers, Derek --ai6ui7shrvasmprh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="go_gettable.diff" diff --git a/ui-shared.c b/ui-shared.c index acd8ab5..49a9407 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -785,6 +785,10 @@ void cgit_print_docstart(void) html_txt(ctx.page.title); html("\n"); htmlf("\n", cgit_version); + if (ctx.repo){ + htmlf("\n", + host, cgit_rooturl(), ctx.repo->url, host, cgit_rooturl(), ctx.repo->url); + } if (ctx.cfg.robots && *ctx.cfg.robots) htmlf("\n", ctx.cfg.robots); html("