git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Nicolay <m.nicolay@osm-ag.de>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: missing tags from "git fetch"
Date: Fri, 25 Oct 2019 12:17:26 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1910251150411.2754@cpza.bfz-tzou.qr> (raw)
In-Reply-To: <20191002135518.GA3599@sigill.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 2765 bytes --]

Hi!

On Wednesday 2019-10-02 15:55, Jeff King wrote:
> It's a documentation bug, I think. We won't auto-follow tags when
> fetching into FETCH_HEAD (but this is further confused by the fact that
> fetching into FETCH_HEAD will auto-update a tracking ref).
>
> So instead of this:
>
>> $ git fetch origin master
>
> try this:
>
>  $ git fetch origin
>
> or even this:
>
>  $ 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.

Is there any other way to force auto-follow tags? If there is no sane 
way, I have to create a throwawy branch and delete it immediately.

=====================================================
$ git fetch origin master:refs/remotes/origin/master
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From /tmp/r1
  * [new branch]            master     -> origin/master
  * [new tag]               t1         -> t1
  * [new tag]               t2         -> t2
$ ls .git/refs/remotes/origin
master
$ git fetch origin master:refs/remotes/origin/master
From /tmp/r1
  - [deleted]               (none)     -> origin/master
$ ls .git/refs/remotes/origin
/bin/ls: cannot access .git/refs/remotes/origin: No such file or directory
$ git fetch origin master:refs/remotes/origin/master
From /tmp/r1
  * [new branch]            master     -> origin/master
$ ls .git/refs/remotes/origin
master
$ git --version
git version 2.23.0
=====================================================

Best regards
Martin Nicolay

-- 
_______________________________________________________________________________
No MS-Word attachments (http://www.gnu.org/philosophy/no-word-attachments.html)
_______________________________________________________________________________
OSM AG | Ruhrallee 191 | 45136 Essen | Fon: 0201-89 555 | Fax: 0201-89 55 400
web: www.osm-ag.de | e-mail: info@osm-ag.de
IBAN: DE67 4325 0030 0001 0059 82 | BIC: WELADED1HRN
USt-ldNr.: DE163337313 | HRB: 28171 Essen
Aufsichtsratsvorsitzende: Dipl.-Kff. Sabine Elsas
Vorstand: Johannes Kuhn (Vorsitzender), Christian Damsky, Axel Roland

--
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht
gestattet.
_______________________________________________________________________________

  parent reply	other threads:[~2019-10-25 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 13:10 missing tags from "git fetch" Martin Nicolay
2019-10-02 13:55 ` Jeff King
2019-10-02 15:24   ` Martin Nicolay
2019-10-25 10:17   ` Martin Nicolay [this message]
2019-11-22 13:00     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.20.1910251150411.2754@cpza.bfz-tzou.qr \
    --to=m.nicolay@osm-ag.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).