From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D87B0C432C0 for ; Fri, 22 Nov 2019 13:00:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6EC820715 for ; Fri, 22 Nov 2019 13:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727490AbfKVNAW (ORCPT ); Fri, 22 Nov 2019 08:00:22 -0500 Received: from cloud.peff.net ([104.130.231.41]:57946 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726813AbfKVNAW (ORCPT ); Fri, 22 Nov 2019 08:00:22 -0500 Received: (qmail 21050 invoked by uid 109); 22 Nov 2019 13:00:22 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Fri, 22 Nov 2019 13:00:22 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 24697 invoked by uid 111); 22 Nov 2019 13:04:13 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 22 Nov 2019 08:04:13 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 22 Nov 2019 08:00:20 -0500 From: Jeff King To: Martin Nicolay Cc: git@vger.kernel.org Subject: Re: missing tags from "git fetch" Message-ID: <20191122130020.GA22423@sigill.intra.peff.net> References: <20191002135518.GA3599@sigill.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Oct 25, 2019 at 12:17:26PM +0200, Martin Nicolay wrote: > > $ git fetch origin master:refs/remotes/origin/master > > I thought it would work, but it works only once. On the second time the ref > for the remote branch is deleted. It seems git is confused by specifying a > ref it expect to manage itself. It seems like a bad interaction with `fetch.prune` (I don't have it set, and the problem doesn't appear, but if I set it, I can reproduce your issue). I'm not sure why, though. It's true that the ref _is_ mentioned in the configured refspec for origin, but we shouldn't be looking at that refspec at all (since we have a refspec on the command line). -Peff