From patchwork Mon Oct 7 08:43:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Wong X-Patchwork-Id: 11176961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AA4C139A for ; Mon, 7 Oct 2019 08:43:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73F9020867 for ; Mon, 7 Oct 2019 08:43:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727290AbfJGInk (ORCPT ); Mon, 7 Oct 2019 04:43:40 -0400 Received: from dcvr.yhbt.net ([64.71.152.64]:44352 "EHLO dcvr.yhbt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727262AbfJGInk (ORCPT ); Mon, 7 Oct 2019 04:43:40 -0400 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 97B8C1F4BD; Mon, 7 Oct 2019 08:43:39 +0000 (UTC) Date: Mon, 7 Oct 2019 08:43:39 +0000 From: Eric Wong To: Junio C Hamano Cc: git@vger.kernel.org, Derrick Stolee , Johannes Schindelin , Phillip Wood Subject: [PATCH v3 21/20] convert: drop invalid comment for subprocess_entry Message-ID: <20191007084339.GA7808@dcvr> References: <20191006233043.3516-1-e@80x24.org> <20191006233043.3516-21-e@80x24.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano wrote: > Eric Wong writes: > > > Comments stating that "struct hashmap_entry" must be the first > > member in a struct are no longer valid. > > After this patch, there is one "/* must be the first member! */" > comment left in convert.c, which is both misleading and unfortunate; > a structure 'subprocess_entry' wants to be the first field of any > enclosing structure, where 'subprocess_entry' has a hashmap_entry as > its first field. Oops, I was only grepping for hashmap_entry :x Thanks for the sharp eyes :> Also, the first member requirement for the oidmap stuff could be lifted sometime in the future... ----8<----- Subject: [PATCH] convert: drop invalid comment for subprocess_entry "struct hashmap_entry" inside "struct subprocess_entry" no longer needs to be the first member of any struct, so the old comment is no longer true. Signed-off-by: Eric Wong Reported-by: Junio C Hamano --- convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.c b/convert.c index 94ff837649..93c1e1eae9 100644 --- a/convert.c +++ b/convert.c @@ -753,7 +753,7 @@ static int apply_single_file_filter(const char *path, const char *src, size_t le #define CAP_DELAY (1u<<2) struct cmd2process { - struct subprocess_entry subprocess; /* must be the first member! */ + struct subprocess_entry subprocess; unsigned int supported_capabilities; };