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

Re: Pulling tags from git.git

From
Junio C Hamano <junkio@cox.net>
Date
Mar 7, 2006, 18:10 UTC
Message-ID
<7vr75ejfd2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<440DA82D.3060909@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 5 quoted lines
> Imagine Linus, getting his "please pull" emails and doing so only to
> find dozens of temporary tags fetched by the pull. Junio's patch (if I
> read it correctly) unconditionally fetches *ALL* tags reachable from
> the top of the commit-chain, which means there is no longer any way to
> keep temporary tags in a repo from which someone else will pull.

I thought we made fetch made by such a promiscous pull not to follow tags, so that wouldn't be a problem. Tag following is only to happen when you track other's branches. That is:

	$ git pull git://git.kernel.org/pub/scm/git/git.git master

would store my "master" branch tip only in your .git/FETCH_HEAD and you merge it immediately, without following my tags, while:

	$ git pull git://git.kernel.org/pub/scm/git/git.git master:origin

(which is what you get by "git pull" without arguments) would follow my tags, because you are storing the branch head into your local branch "origin".

Show 6 quoted lines
> I for one riddle my repos with temporary tags whenever I'm trying
> something I'm not so sure of, or find an interesting bug or a design
> decision I'm not 100% sure of. Perhaps I should rather do this with
> branches, but imo branches are for doing work, whereas tags just mark
> a spot in the development so I easily can find them with gitk or some
> such.

I also have many throwaway unannotated tags. Whenever I have a WIP that I want to split up or reorder, I tag the tip of that topic branch with "git tag anchor-blah" tag, rewind the tip to the commit before the one I want to redo, and then do this repeatedly:

	$ git diff -R anchor-blah >P.diff
        $ ... edit P.diff to keep the part I want to apply first
        $ git apply --index P.diff
        $ ... maybe edit a bit further
        $ git commit

until there is no difference between the rewound-and-redone tip and anchor-blah other than whatever clean-ups I do during the above cycle. Propagating such throw-away tags is not very useful. And I think it is reasonable to say that throw-away tags tend to be unannotated.

Previous: Andreas EricssonNext: A Large Angry SCM
Message 8 of 15 in “Pulling tags from git.git”
  1. David HoMar 6, 2006
  2. David HoMar 6, 2006
  3. Andreas EricssonMar 7, 2006
  4. Junio C HamanoMar 7, 2006
  5. Andreas EricssonMar 7, 2006
  6. A Large Angry SCMMar 7, 2006
  7. Andreas EricssonMar 7, 2006
  8. Junio C HamanoMar 7, 2006
  9. A Large Angry SCMMar 8, 2006
  10. Andreas EricssonMar 8, 2006
  11. Florian WeimerMar 9, 2006
  12. Andreas EricssonMar 9, 2006
  13. Florian WeimerMar 20, 2006
  14. Junio C HamanoMar 20, 2006
  15. David HoMar 7, 2006

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.