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 729C21F4CE for ; Thu, 31 Mar 2022 19:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234739AbiCaTfo (ORCPT ); Thu, 31 Mar 2022 15:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234713AbiCaTfn (ORCPT ); Thu, 31 Mar 2022 15:35:43 -0400 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C76305FF2D for ; Thu, 31 Mar 2022 12:33:55 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 66C58186174; Thu, 31 Mar 2022 15:33:55 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=8nYjiSIBzMQRGrsDw0Ce3om+5aaK0WvcZGiBOA Do3dI=; b=Fm13C576Q6lRGSbM2UlrH1ZfL0tCh++3LMT7gOkyK7uL5wemhoUL6f JqnURchupy8TfyFbil449TFcWJTNkLLSU4CDdVt7apmUHOfYdSJuwWKB2GmAOzwJ SakgqZG3kNZTqivw87MaXQlnKTmVgpynGnMXnUcgWWqFheivuZD+4= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5EECC186173; Thu, 31 Mar 2022 15:33:55 -0400 (EDT) (envelope-from junio@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-smtp21.pobox.com (Postfix) with ESMTPSA id AF046186172; Thu, 31 Mar 2022 15:33:52 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Tao Klerks via GitGitGadget" Cc: git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Tao Klerks , Glen Choo Subject: Re: [PATCH v6] tracking branches: add advice to ambiguous refspec error References: Date: Thu, 31 Mar 2022 12:33:51 -0700 In-Reply-To: (Tao Klerks via GitGitGadget's message of "Thu, 31 Mar 2022 16:01:25 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7F30F1AE-B129-11EC-BAE8-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Tao Klerks via GitGitGadget" writes: > From: Tao Klerks > > The error "not tracking: ambiguous information for ref" is raised > when we are evaluating what tracking information to set on a branch, > and find that the ref to be added as tracking branch is mapped > under multiple remotes' fetch refspecs. > > This can easily happen when a user copy-pastes a remote definition > in their git config, and forgets to change the tracking path. > > Add advice in this situation, explicitly highlighting which remotes > are involved and suggesting how to correct the situation. > ... > Documentation/config/advice.txt | 4 +++ > advice.c | 1 + > advice.h | 1 + > branch.c | 63 +++++++++++++++++++++++++++++---- > 4 files changed, 62 insertions(+), 7 deletions(-) Can we add a test case for the new "advice" output? Thanks.