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);