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

Re: Questions/investigations on git-subtree and tags

From
JRJeremy Rosen <jeremy.rosen@openwide.fr>
Date
Mar 7, 2013, 15:15 UTC
Message-ID
<757358726.204239.1362669338484.JavaMail.root@openwide.fr>
In-Reply-To
<CALeLG_=xzL1SA0G63FGb5v8K5WQOUg4yaodNm6zwf7kU1pAYvg@mail.gmail.com>
Show 9 quoted lines
> >
> > Ok, I can understand that you don't want to import tags for
> > namespace reason, but in that case shouldn't
> > git subtree add refuse to create a subtree when the tag isn't a
> > commit
> 
> It shouldn't and tries not to, but is limited in it's ability to
> identify if a refspec points to a commit or not in the remote repo.
> 
ok, i've studied a little more
* the target for "git subtree add <url> <refspec> can only be a remote branch or tag, since we git fetch 
can only target remote refs.
* in case of a branch, git subtree forgets the branch and only use the commit linked to the branch. for 
tags, the fetch part is ok, it's the merge part that fail. adding ^{} at the right place would probably fix that
Show 8 quoted lines
> 
> I've posted a patch (which is pending a lot of other changes to
> git-subtree that I'm corralling) that tries to prevent some obvious
> errors in the refspec. But letting the git fetch used by git-subtree
> add and git-subtree pull catch the error and report it may be the
> best
> option.
> 
that's interesting... do you have a link ? 
> 
> I've never really tried using --squash, I don't see that it adds any
> value for me.
> 
my project has a git subtree for a linux kernel and another subtree for buildroot, 
a default .git is about 1.5G, squashing it reduces it to 200M so it's worth it for me :)
Previous: Paul CampbellNext: Paul Campbell
Message 7 of 14 in “Questions/investigations on git-subtree and tags”
  1. Jeremy RosenMar 7, 2013
  2. Paul CampbellMar 7, 2013
  3. Jeremy RosenMar 7, 2013
  4. Paul CampbellMar 7, 2013
  5. Jeremy RosenMar 7, 2013
  6. Paul CampbellMar 7, 2013
  7. Jeremy RosenMar 7, 2013
  8. Paul CampbellMar 7, 2013
  9. Jeremy RosenMar 7, 2013
  10. Jeremy RosenMar 8, 2013
  11. Junio C HamanoMar 8, 2013
  12. Jeremy RosenMar 8, 2013
  13. Jeremy RosenMar 12, 2013
  14. Paul CampbellMar 12, 2013

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.