git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Rosen <jeremy.rosen@openwide.fr>
To: git@vger.kernel.org
Subject: Questions/investigations on git-subtree and tags
Date: Thu, 7 Mar 2013 11:25:59 +0100 (CET)	[thread overview]
Message-ID: <822188477.192374.1362651959144.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <1492019317.191838.1362650820122.JavaMail.root@openwide.fr>

Hello everybody


I am trying to use git-subtree to follow a subproject but I have a couple of problems and I am not sure if I am doing something wrong 

Basically I am trying to use a tag on the subproject as my "base" for the subproject but subtree doesn't seem to handle that properly


my first attempt was to simply do 

"git subtree add --squash git://git.buildroot.net/buildroot 2013.02" 

but subtree refused, telling me that the SHA of the tag is not a valid commit. 
Ok it makes sense, though I think this is a very valid use-case...

so I tried

"git subtree add git://git.buildroot.net/buildroot 2013.02^{commit}" 

which was refused because git fetch can't parse the ^{commit} marker.
Again it makes sense, but I really want to start from that tag.


so I tried

"git fetch git://git.buildroot.net/buildroot 2013.02"
"git subtree add --squash FETCH_HEAD"

which worked. Ok at that point I am slightly abusing git subtree, but it seems a valid usage

except that this last attempt causes serious problems when trying to split out the tree again

the call to "git commit-tree" within "git subtree split" complains that the SHA of the parent
is not a valid commit SHA. Which is true, it's the SHA of the tag.


At this point I am not sure if I am abusing subtree, if I have a legitimate but unimplemented use-case and how to 
fix/implement it.

the squash-commit message only contains the SHA of the tag, should it contain the SHA of the commit ?

"subtree split" can only handle commit SHA, should it somehow follow tag SHA too ? how ?

this is probably a trivial fix for someone with good knowledge of git-subtree but i'm not there yet, so any hint would be welcomed

    Regards

    Jérémy Rosen

fight key loggers : write some perl using vim

       reply	other threads:[~2013-03-07 10:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1492019317.191838.1362650820122.JavaMail.root@openwide.fr>
2013-03-07 10:25 ` Jeremy Rosen [this message]
2013-03-07 11:00   ` Questions/investigations on git-subtree and tags Paul Campbell
2013-03-07 11:05     ` Jeremy Rosen
2013-03-07 12:02       ` Paul Campbell
2013-03-07 12:50         ` Jeremy Rosen
2013-03-07 15:00           ` Paul Campbell
2013-03-07 15:15             ` Jeremy Rosen
2013-03-07 15:29               ` Paul Campbell
2013-03-07 16:09                 ` Jeremy Rosen
2013-03-08 16:29                   ` Jeremy Rosen
2013-03-08 17:23                     ` Junio C Hamano
2013-03-08 17:29                       ` Jeremy Rosen
2013-03-12 10:02                         ` Jeremy Rosen
2013-03-12 23:57                           ` Paul Campbell

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=822188477.192374.1362651959144.JavaMail.root@openwide.fr \
    --to=jeremy.rosen@openwide.fr \
    --cc=git@vger.kernel.org \
    /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).