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 1281 invoked from network); 5 Aug 2022 05:00:13 -0000 Received: from lists.zx2c4.com (165.227.139.114) by inbox.vuxu.org with ESMTPUTF8; 5 Aug 2022 05:00:13 -0000 Received: by lists.zx2c4.com (OpenSMTPD) with ESMTP id db8aec6a; Fri, 5 Aug 2022 04:59:55 +0000 (UTC) Return-Path: Received: from mail.kasad.com (mail.kasad.com [140.82.7.10]) by lists.zx2c4.com (OpenSMTPD) with ESMTPS id 9592d3ab (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Fri, 5 Aug 2022 04:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kasad.com; i=@kasad.com; q=dns/txt; s=mail; t=1659675592; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=6ukDW3yYkPPrd1aXPpWBGmnhYxhYuaLzrEa3m6DaexM=; b=mI6UPYWJGfe+K+Eg924E6pFWs/u8l+qYa8c0Y3POQvb+RKa2DDrG9147SAt3MGjZG0LAP 5XYUJyOiwORjVBnXORf8coXRLt+dVl6kJJyLVJ+8OcCNoFtNwJqBl3aFgwCbnL53sUImQR7 3e5n7snFyIewk4BXLVP066u6KUs/ub8SrsrqfoO0oaiLeEJctqcnL7pB9KN2SXDTqpaxKUe dYiULpBH/hRlhku0wDedeDK0qhNRH6Hct/s9LVowjgBDMvYZqVdF5JhfwTVlEvK+wMmF7PI v/syIhnqNT/Si36P8zDxgdZVy2JK3BE7TvP853kGcGVxlRBw7FigzXd3Is0g== Received: from localhost (c-98-35-26-36.hsd1.ca.comcast.net [98.35.26.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail.kasad.com (Postfix) with ESMTPSA id 17C1A27377; Thu, 4 Aug 2022 21:59:52 -0700 (PDT) From: Kian Kasad To: cgit@lists.zx2c4.com Cc: Kian Kasad Subject: [PATCH 3/6] Don't display commit age on graph page Date: Thu, 4 Aug 2022 21:59:36 -0700 Message-Id: <20220805045939.57987-4-kian@kasad.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805045939.57987-1-kian@kasad.com> References: <20211230210820.3ncgngexbbhlpbdq@frisbee.local> <20220805045939.57987-1-kian@kasad.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" Hides the commit age column on the graph page. It is still shown on the log page, even when the "enable-commit-graph" option is set to "combined". --- cmd.c | 2 +- ui-log.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd.c b/cmd.c index 1f86047..c780895 100644 --- a/cmd.c +++ b/cmd.c @@ -109,7 +109,7 @@ static void graph_fn(void) { cgit_print_log(ctx.qry.oid, ctx.qry.ofs, ctx.cfg.max_commit_count, ctx.qry.grep, ctx.qry.search, ctx.qry.path, 1, - (ctx.repo->enable_commit_graph == 2) ? 1 : 0, + (ctx.repo->enable_commit_graph == 2) ? 2 : 0, ctx.repo->commit_sort); } diff --git a/ui-log.c b/ui-log.c index 20774bf..c795fb2 100644 --- a/ui-log.c +++ b/ui-log.c @@ -175,7 +175,7 @@ static int show_commit(struct commit *commit, struct rev_info *revs) static void print_commit(struct commit *commit, struct rev_info *revs) { struct commitinfo *info; - int columns = revs->graph ? 4 : 3; + int columns = (revs->graph && ctx.repo->enable_commit_graph == 1) ? 4 : 3; struct strbuf graphbuf = STRBUF_INIT; struct strbuf msgbuf = STRBUF_INIT; @@ -246,7 +246,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) html_txt(info->author); cgit_close_filter(ctx.repo->email_filter); - if (revs->graph) { + if (revs->graph && ctx.repo->enable_commit_graph == 1) { html(""); cgit_print_age(info->committer_date, info->committer_tz, TM_WEEK * 2); } @@ -368,7 +368,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern struct rev_info rev; struct commit *commit; struct strvec rev_argv = STRVEC_INIT; - int i, columns = commit_graph ? 4 : 3; + int i, columns = commit_graph == 1 ? 4 : 3; int must_free_tip = 0; /* rev_argv.argv[0] will be ignored by setup_revisions */ @@ -471,7 +471,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern html(")"); } html("Author"); - if (rev.graph) + if (rev.graph && commit_graph == 1) html("Age"); if (ctx.repo->enable_log_filecount) { html("Files"); -- 2.37.1