git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Not a BUG: For first push to a bare repo, using "--tags" prevents creation of master branch

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 2, 2015, 23:48 UTC
Message-ID
<xmqq6175zn70.fsf_-_@gitster.dls.corp.google.com>
In-Reply-To
<vpqoal3p8wo.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> I recall "fetch --tags" was updated to become your "--tags-also" by
>> e66ef7ae (Merge branch 'mh/fetch-tags-in-addition-to-normal-refs',
>> 2013-12-12).  Perhaps we should do the same on the push side.
>
> Would we still have a way to push tags only with this?
>
> fetch and push are a bit different: it's almost never a bad idea to run
> fetch (I see remote-tracking as a kind of cache, and fetch is the way to
> refresh this cache), but pushing too much can be harmful. Not a strong
> objection, but I'm not sure that this change is 100% safe for everyone.

Whether the user is familiar with "git fetch --tags" or not, "git push --tags" that is not spelled as "git push 'tags/*'" does look like an option that augments what the command normally does, and the "mistaken" (non-)bug report was very understandable.

After having thought about this, I would say that it would not add much value to the system if we add it as "git push --tags-also". We should either keep the current semantics as-is, or we replace "git push --tags" to make it similar to what "git fetch --tags" does, I think.

Previous: Junio C Hamano
Message 9 of 9 in “BUG: For first push to a bare repo, using "--tags" prevents creation of master branch”
  1. Michael DarlingMay 29, 2015
  2. Matthieu MoyMay 29, 2015
  3. Junio C HamanoMay 29, 2015
  4. Matthieu MoyMay 29, 2015
  5. Junio C HamanoMay 29, 2015
  6. Junio C HamanoMay 29, 2015
  7. Matthieu MoyMay 29, 2015
  8. Junio C HamanoMay 29, 2015
  9. Junio C HamanoJun 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.