From patchwork Mon Jun 5 10:05:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13267151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0C99C7EE23 for ; Mon, 5 Jun 2023 10:06:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjFEKGa (ORCPT ); Mon, 5 Jun 2023 06:06:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231681AbjFEKG2 (ORCPT ); Mon, 5 Jun 2023 06:06:28 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A9A8E3 for ; Mon, 5 Jun 2023 03:06:27 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4C3B43200902; Mon, 5 Jun 2023 06:06:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 05 Jun 2023 06:06:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1685959585; x=1686045985; bh=Vvo1TPjnwQYCV0GHxONkdkl5y sAT/81X67gMojfy86w=; b=qU9fPY4eL/NCSKkRuKPVxAqBo1+lgkh8iCGV8R76w ujYh7jv1FApDmzn3DqQ4/l+tt7Ptaqy+1EZE6PhItAxIYnawy/SpS0HVJ/5LB8AJ 1/zsQpENmET9mqrjktGmzA/JqlpSJUMD9nRIhTDbV+rPBgHgIQKDmS7Fev7Tn4vL znC8sZQvLJ1vWbvcMTGtU27USCfcSJ8SDZcHssZJDdX/bx5ofxuMfnJ4725ncuAk N9lmAJwfg01tfBgVp3pdK5LlRpNcagHzXv1PIX5Uo+ld77R6s1FrENdw24mgI3sb OXgSYXPPlwLwWudYjeqpIEste59ZbAfrJK0bffFtfIt1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1685959585; x=1686045985; bh=Vvo1TPjnwQYCV0GHxONkdkl5ysAT/81X67g Mojfy86w=; b=lQtfJEadqYOVCUSA1FCAMc1LP65cIOTJs9Fj55r9GirbnbsA/QA I+DzbvDDrZAhx4mc+yaAC6ekqmO7RtFNFvBle2FA4hCbIYpEToMPhdulJs/sYTOk +hnw3B/2UgzUoWACKv0ctnQCqthfxvuuSycCTB5jmiKQj5o1m48eDmHoUKbyRbWt /MCPbS4L0mo8Ize0OxmZDMI8w66c1RA0x0EaUrIUYjxcEzJGam7MohstshWb+eGG Vqb5u97AHT5zLijk+7UgKwaeKcaMDvpwtTO/iGzSDHAXKaMKt61iZnrpgWVIpiLu 18s0vjRjEj6iUz+D6hwAc4r7BLHYGv75L1A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelledgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepmfhrihhsthhofhhfvghrucfjrghughhssggrkhhkuceo tghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeevgf elveeikeegjeeikeeuvefhleeiuddvleegfeekjedtkeevtdetgfffveettdenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegtohguvgeskhhhrg hughhssggrkhhkrdhnrghmvg X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jun 2023 06:06:24 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , Jeff King , Junio C Hamano Subject: [PATCH v4 1/2] notes: update documentation for `use_default_notes` Date: Mon, 5 Jun 2023 12:05:22 +0200 Message-ID: <3eaa725d3a476e3cfd7331104f35bbd322d9394f.1685958731.git.code@khaugsbakk.name> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org `suppress_default_notes` was renamed to `use_default_notes` in 3a03cf6b1d (notes: refactor display notes default handling, 2011-03-29). The commit message says that “values less than one [indicates] “not set” ”, but what was meant was probably “less than zero” (the author of 3a03cf6b1d agrees on this point). Signed-off-by: Kristoffer Haugsbakk --- notes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/notes.h b/notes.h index c1682c39a9..a823840e49 100644 --- a/notes.h +++ b/notes.h @@ -286,8 +286,9 @@ void disable_display_notes(struct display_notes_opt *opt, int *show_notes); * If 'opt' is not NULL, then it specifies additional settings for the * displaying: * - * - suppress_default_notes indicates that the notes from - * core.notesRef and notes.displayRef should not be loaded. + * - use_default_notes: less than `0` is "unset", which means that the + * default notes are shown iff no other notes are given. Otherwise, + * treat it like a boolean. * * - extra_notes_refs may contain a list of globs (in the same style * as notes.displayRef) where notes should be loaded from. From patchwork Mon Jun 5 10:05:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kristoffer Haugsbakk X-Patchwork-Id: 13267152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C326C7EE23 for ; Mon, 5 Jun 2023 10:06:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231713AbjFEKGh (ORCPT ); Mon, 5 Jun 2023 06:06:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231681AbjFEKGc (ORCPT ); Mon, 5 Jun 2023 06:06:32 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD3A6B0 for ; Mon, 5 Jun 2023 03:06:31 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 095F13200583; Mon, 5 Jun 2023 06:06:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 05 Jun 2023 06:06:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khaugsbakk.name; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1685959590; x=1686045990; bh=b7WdA8yaEnAaWVokTm3Wl92x4 YbbiqegX8pCiHHIQjc=; b=zV1QIftWKlUatS/uOaRSxd+jNAE4ccokt01Q9Gvgm xoDZZdIKGaocCuitIGEGiL1urVNlLo14RS9r1izhc1deCRlq1S1NOtiaeAg7Uyab aiQ93I8h1eyBosy3iLEmEeIn+OxakVv35CTqbuRXUi/ldX1lU2vc2a6hueJT3rmH hxW+wzETTD5U5ty3U+QuiRnn6tGh6OjNJlNqy/IGW7DZK47zdu/eFOFphH6hTCNb tplRdQCHO2WYHma8RRR64zu8POWGYgCSibagetXqXwxhbMc+D71vlLAnb9Y+8FQp HUrgilolKfbl3PC7mOEojrNjxwXIeU3ixRQZ8hSkS7e5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1685959590; x=1686045990; bh=b7WdA8yaEnAaWVokTm3Wl92x4YbbiqegX8p CiHHIQjc=; b=Umtd2QsrhpB0OU6MwIN3t4rY7d3rJpQDkZ0XtVwxggUVHexFvnq J/TC5jjsHofrhLO2M3vi8dEc6wXNsyNRbi7Yh576+wI4x/IYX1/6H7E4bBR7sBdY kwmSfnO2MDMU/wNXF9RZ1k7Yqwnsgi7peWGf6ZuTpSByU3qe+ad0oqBGj9cauYFE dOcO1UBfuagN5KvlCq7bvptES0YYlYjMGK7dpUti4nBjx7D+WzffkFkca72ajKbs kty+A89pi1N1ia7LvYwDdcIwW7GL5nzVLeos+KJiEmmk1IMftM2VHh9Q2kQg1yta jjvspiNycXgYLp1rWm5d40wOFGZhiO8t7ag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelledgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepmfhrihhsthhofhhfvghrucfjrghughhssggrkhhkuceo tghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeeuie euffeuffethffhfeellefhueehteettdehveegjeethefgveffuefggfelhfenucffohhm rghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheptghouggvsehkhhgruhhgshgsrghkkhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i2671468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jun 2023 06:06:29 -0400 (EDT) From: Kristoffer Haugsbakk To: git@vger.kernel.org Cc: Kristoffer Haugsbakk , Jeff King , Junio C Hamano Subject: [PATCH v4 2/2] notes: move the documentation to the struct Date: Mon, 5 Jun 2023 12:05:23 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Its better to document the struct members directly instead of on a function that takes a pointer to the struct. This will also make it easier to update the documentation in the future. Make adjustments for this new context. Also drop “may contain” since we don’t need to emphasize that a list could be empty. Suggested-by: Jeff King Signed-off-by: Kristoffer Haugsbakk --- Notes (series): v3: Suggested in: https://lore.kernel.org/git/20230601175218.GB4165405@coredump.intra.peff.net/ v4: • Put docs on each member instead • Update commit message accordingly • Drop “may contain” since we don’t have to emphasize that a list could be empty • Formatting is based on clang-format and `bloom_filter_settings` in `bloom.h` notes.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/notes.h b/notes.h index a823840e49..064fd7143a 100644 --- a/notes.h +++ b/notes.h @@ -256,7 +256,17 @@ void free_notes(struct notes_tree *t); struct string_list; struct display_notes_opt { + /* + * Less than `0` is "unset", which means that the default notes + * are shown iff no other notes are given. Otherwise, + * treat it like a boolean. + */ int use_default_notes; + + /* + * A list of globs (in the same style as notes.displayRef) where + * notes should be loaded from. + */ struct string_list extra_notes_refs; }; @@ -283,15 +293,7 @@ void disable_display_notes(struct display_notes_opt *opt, int *show_notes); /* * Load the notes machinery for displaying several notes trees. * - * If 'opt' is not NULL, then it specifies additional settings for the - * displaying: - * - * - use_default_notes: less than `0` is "unset", which means that the - * default notes are shown iff no other notes are given. Otherwise, - * treat it like a boolean. - * - * - extra_notes_refs may contain a list of globs (in the same style - * as notes.displayRef) where notes should be loaded from. + * 'opt' may be NULL. */ void load_display_notes(struct display_notes_opt *opt);