From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6E982459E0 for ; Tue, 29 Apr 2025 17:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946086; cv=none; b=g9yRhYs9p0Ri8dMZMvz3JyPwb1pCoyxO+AkN/7rn3v5NsH1hMUUE+3IJWjgU3UuiwiT3rPcAJToTG0hoKn1KSobQIR/q19aUvOtI0KBuhni4U02ZnOo/3gJlTa3VNPjV4G74p+b6SYdZyjHHO5D8NJXb2r/2z1LrAWDvMv4JuRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745946086; c=relaxed/simple; bh=7P1zhqvyxeADd132WZimmPJcqotJkf1vh+GKIKelcDI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=sx98hgRJcqgD6PZPxFc73HYBfpItlGLeS719ICjH90tvG/UdgJWwX7I6KpcHUjD0ZE/IVAJgb+GMqiiwYyLAIABCoKJRIkUO/hnAMRI9h6nrrAp1Dd+2DA8je5d0DJU1JlA53iOHv/FUGYQ2i3+Y3Uh25d7zBTaxzo9p72L83xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=S1hGcjBQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=rZEhG7rd; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="S1hGcjBQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rZEhG7rd" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id C05201380155; Tue, 29 Apr 2025 13:01:22 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-05.internal (MEProxy); Tue, 29 Apr 2025 13:01:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1745946082; x=1746032482; bh=YDhezVznz/ icJ8bDUet4bAVG9QnGaeO3D/mrBBQjL8w=; b=S1hGcjBQi1KgzN57biR6gQ9ji5 f0loFTIX2ICbFn49e192nizCnKGboQ+DwjfR+MiiOgSDuElhKbKXj7i3ZYQPD8wE CHwZ9UXoZTxy6Wuh/lgy9fBKK/nyEe2Ll1QLus9JeqwCz7YCdLT4DA95Ctu/LFr/ +lRrGXuzgDspjBy7fj6hfGSEVJmWQD7EeYSqG8d6pfBThMkO2RXUG2aHcFl962Vh QatQV7MX+3gdh5vWOXG8aV8KwiMjuq6uvldAGiXZ+FpR8g1wxJVro3/NLkXap0uS DpPdhJvviw52b6bHVzu4vuoPBrBk1XnJ7IXFljqdaK9Ta2ukVXWS8eoCEcZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1745946082; x=1746032482; bh=YDhezVznz/icJ8bDUet4bAVG9QnGaeO3D/m rBBQjL8w=; b=rZEhG7rdDost7rcn06K8ieuS1mJSRPa/k0yUmGN0ec+HL0H0jTV Q7zKNPtGAqmAATuavfLHV7vR9JBjI+CbqTcbzihDwsqYW7Ie1kxQvMcDbxNp8ySi DvBQOfVuWbhVnmAD9maJHgT8eY2XhYJYtdi7EwhFCGkmOhninGgHpL37xcpg75kA dl+JW4EcEpH4lwa/j1xEG4AyReFDhwIF5T5TF1u4/m/4bUSf+fmemac2ZnjDkwPB BeWB5xKU35odsHvLec+YQUORV6gCiixlvJlRnCLDqrjMXntqRkbzUkJga1F7dl8E MhXJqci+PD1GFFJAt/GMXQozzEiO1+YredQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvieegfeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesthdtredttder tdenucfhrhhomheplfhunhhiohcuvecujfgrmhgrnhhouceoghhithhsthgvrhesphhosg hogidrtghomheqnecuggftrfgrthhtvghrnhepfeevteetjeehueegffelvdetieevffeu feejleeuffetiefggfeftdfhfeeigeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhithhsthgvrhesphhosghogidrtghomhdpnhgspghr tghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithhgihhtgh grughgvghtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghr nhgvlhdrohhrghdprhgtphhtthhopehnvgifrhgvnhesghhmrghilhdrtghomhdprhgtph htthhopehgihhtshhtvghrsehpohgsohigrdgtohhm X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Apr 2025 13:01:22 -0400 (EDT) From: Junio C Hamano To: "Elijah Newren via GitGitGadget" Cc: git@vger.kernel.org, Elijah Newren Subject: Re: [PATCH] tree-walk.h: fix incorrect API comment In-Reply-To: (Elijah Newren via GitGitGadget's message of "Tue, 29 Apr 2025 15:45:03 +0000") References: Date: Tue, 29 Apr 2025 10:01:21 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Elijah Newren via GitGitGadget" writes: > From: Elijah Newren > > When commit 50ddb089ff68 (tree-walk.c: remove the_repo from > get_tree_entry(), 2019-06-27) added an extra parameter to > get_tree_entry(), it did not fix the ordering comment about the meaning > of the parameters. Rather than just changing "third"->"fourth" and > "fourth"->"fifth", give the paramemters meaningful names (or actually, > just take the existing names from the get_tree_entry() definition in the > tree-walk.c file) and strike the comment. Please drop "and strike the comment" part. The "oid" and "mode" being out-parameters is significant for callers. > /** > * Find an entry in a tree given a pathname and the sha1 of a tree to > - * search. Returns 0 if the entry is found and -1 otherwise. The third > - * and fourth parameters are set to the entry's sha1 and mode respectively. > + * search. Returns 0 if the entry is found and -1 otherwise. > */ > -int get_tree_entry(struct repository *, const struct object_id *, const char *, struct object_id *, unsigned short *); > +int get_tree_entry(struct repository *repo, const struct object_id *tree_oid, > + const char *name, struct object_id *oid, > + unsigned short *mode); > > /** > * Generate the full pathname of a tree entry based from the root of the > > base-commit: f65182a99e545d2f2bc22e6c1c2da192133b16a3 Find an entry with the "name" in a tree object "tree_oid", and return the the object name and the mode of the found entry via the "oid" and the "mode" parameters. Return 0 if the entry is found, and -1 otherwise. or something, perhaps. Thanks.