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, URIBL_CSS,URIBL_CSS_A 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 523F01F4D7 for ; Fri, 10 Jun 2022 17:09:08 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="yelGRjaK"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350068AbiFJRI6 (ORCPT ); Fri, 10 Jun 2022 13:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346927AbiFJRI5 (ORCPT ); Fri, 10 Jun 2022 13:08:57 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08A4143ACE for ; Fri, 10 Jun 2022 10:08:55 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 11C1513E02D; Fri, 10 Jun 2022 13:08: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=Yb1bokWBZBoK7dwOOyquiR07OkLocev9G5HbJH 3+ASA=; b=yelGRjaKapnJWaCo96pEiqWFtKEWTGeP6eA+7hP18nw6LAgA8InGpQ FW3QxR0wKaDof3C4jEVlqOBcGRd3j20N/Y3aoZ9gYu7Pd1vjwHKASrUzDr3Pkf+B 3XDb02BiJfWYrOaEF+Eu4AMhKF4ETi4d5TN8Wej1B3gtay2U278pY= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0A12E13E02C; Fri, 10 Jun 2022 13:08:55 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.92.57]) (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 6793B13E02B; Fri, 10 Jun 2022 13:08:54 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Pavel Rappo , Jacob Keller Cc: git@vger.kernel.org Subject: Re: Should `git remote show` display excluded branches as to-be-fetched? References: Date: Fri, 10 Jun 2022 10:08:53 -0700 In-Reply-To: (Pavel Rappo's message of "Fri, 10 Jun 2022 13:59:03 +0100") 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: 01EF5674-E8E0-11EC-8023-CB998F0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Pavel Rappo writes: > Here's a console session: > > % git config --get-all remote.jdk19.fetch > +refs/heads/*:refs/remotes/jdk19/* > ^refs/heads/pr/* Thanks "Negative refspecs" is relatively new feature introduced in c0192df6 (refspec: add support for negative refspecs, 2020-09-30), so it would not be so surprising if it still had some surprising behaviour ;-) Jacob, care to take a look? > % git remote show jdk19 > > * remote jdk19 > Fetch URL: git@github.com:openjdk/jdk19.git > Push URL: git@github.com:openjdk/jdk19.git > HEAD branch: master > Remote branches: > master tracked > pr/1 new (next fetch will store in remotes/jdk19) > pr/2 new (next fetch will store in remotes/jdk19) > pr/3 new (next fetch will store in remotes/jdk19) > Local ref configured for 'git push': > master pushes to master (fast-forwardable) > > I would naively expect the pr/1, pr/2, and pr/3 branches to be either: > > - not displayed, or better > - displayed with a hint that they won't be fetched (since they match a > _negative_ refspec, which is the second line in the `git config` > output above) > > Thanks, > -Pavel