git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Tags from each remote in a separate "name-space"?
Date: Fri, 01 Mar 2019 17:51:04 +0300	[thread overview]
Message-ID: <87wolizm07.fsf@javad.com> (raw)
In-Reply-To: <20190228081103.GA22075@dektop> (Duy Nguyen's message of "Thu, 28 Feb 2019 15:11:03 +0700")

Duy Nguyen <pclouds@gmail.com> writes:
> On Thu, Feb 28, 2019 at 08:54:23AM +0300, Sergey Organov wrote:
>> Hello,
>> 
>> How do I configure git to handle tags from remotes in a manner similar
>> to branches?
>> 
>> Specifically, I want tag 'tag_name' from remote 'origin' to have local
>> name 'origin/tag_name', not 'tag_name', as it is by default. For a repo
>> with a lot of remotes[*] it would allow to keep track of what tag came from
>> where, as well as prevent name conflicts between tags from different
>> remotes (and/or local tags).
>
> On the fetch side, something like this in the config file (assuming
> "origin" remote here) probably would do
>
> [remote "origin"]
> 	fetch = +refs/tags/*:refs/tags/origin/*
> 	tagOpt = --no-tags

Thanks for the clue, Duy!

Just adding

	fetch = +refs/tags/*:refs/tags/origin/*

for each existing remote configuration seems to do the trick indeed.

Now I wonder if it would make sense to implement something like

  $ git remote add --separate-tags ...

to be able to auto-configure this.

-- 
Sergey

      reply	other threads:[~2019-03-01 14:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  5:54 Tags from each remote in a separate "name-space"? Sergey Organov
2019-02-28  8:11 ` Duy Nguyen
2019-03-01 14:51   ` Sergey Organov [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87wolizm07.fsf@javad.com \
    --to=sorganov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).