From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id A963C1F4CE for ; Thu, 31 Mar 2022 22:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242404AbiCaWnL (ORCPT ); Thu, 31 Mar 2022 18:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233865AbiCaWnK (ORCPT ); Thu, 31 Mar 2022 18:43:10 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9B72156E4 for ; Thu, 31 Mar 2022 15:41:21 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7EF58126814; Thu, 31 Mar 2022 18:41:20 -0400 (EDT) (envelope-from gitster@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=sasl; bh=KaqhtwE+804U4nWWEtoJm00tG kYheuLEE0KhF35lRkg=; b=ZKeZ9ZirGPT59wCuARsStOgj97HQNKPxlF4VQL5BF jnldlmfuvtRZklWbtY3RCWKZjWqsWGbjWGEjlBzAfRijOuWDuYm5ZOYcYmnGDom9 ANKR4iDoAPqk1EH8zlc7TmHHrxaYT450PUBsyg2AGD7AV8tdhu3jRVdkwX9wfL3u hk= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 72343126813; Thu, 31 Mar 2022 18:41:20 -0400 (EDT) (envelope-from gitster@pobox.com) Received: from pobox.com (unknown [35.227.145.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id D5AC5126812; Thu, 31 Mar 2022 18:41:19 -0400 (EDT) (envelope-from gitster@pobox.com) From: Junio C Hamano To: git@vger.kernel.org Cc: Glen Choo Subject: [PATCH 1/2] branch: rework comments for future developers Date: Thu, 31 Mar 2022 15:41:17 -0700 Message-Id: <20220331224118.3014407-1-gitster@pobox.com> X-Mailer: git-send-email 2.35.1-917-g7c4048624a In-Reply-To: References: MIME-Version: 1.0 X-Pobox-Relay-ID: AF050F68-B143-11EC-A806-CB998F0A682E-77302942!pb-smtp2.pobox.com Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Glen Choo For two cases in which we do not explicitly pass --track=3D option down to the submodule--helper subprocess, we have comments that say "we do not have to pass --track", but in fact we not just do not have to, but it would be incorrect to pass any --track option to the subprocess (instead, the correct behaviour is to let the subprocess figure out what is the appropriate tracking mode to use). Signed-off-by: Glen Choo --- branch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/branch.c b/branch.c index ed6f993aa6..8ee9f43539 100644 --- a/branch.c +++ b/branch.c @@ -549,9 +549,9 @@ static int submodule_create_branch(struct repository = *r, strvec_push(&child.args, "--track=3Dinherit"); break; case BRANCH_TRACK_UNSPECIFIED: - /* Default for "git checkout". No need to pass --track. */ + /* Default for "git checkout". Do not pass --track. */ case BRANCH_TRACK_REMOTE: - /* Default for "git branch". No need to pass --track. */ + /* Default for "git branch". Do not pass --track. */ break; } =20 --=20 2.35.1-917-g7c4048624a