git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Taranowski <tom@baringforge.com>
To: Jeremy Rosen <jeremy.rosen@openwide.fr>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>,
	"David A. Greene" <greened@obbligato.org>,
	Stephen Smith <ishchis2@gmail.com>
Subject: Re: git subtree oddity
Date: Thu, 28 Mar 2013 12:44:11 -0700	[thread overview]
Message-ID: <CAH0ocayVmTOFjTkYBRuA6RULafD1zY6hq1PWHWKONL9o24SFUA@mail.gmail.com> (raw)
In-Reply-To: <CAH0ocazrojrJPdDDmLyL3RQaxxGjPnmhxq+FzSE0P9Y3Y05C1Q@mail.gmail.com>

Oh, this is odd.  I can get the behavior I want by adding the '-f'
flag to the remote add.

So: git remote add -f upstream git://gnuradio.org/gnuradio

According to the remote add help, the -f is only doing a fetch, which
I was doing as a manual step after the remote add.

Another interesting artifact is that I know see the "warning: no
common commits" log, which I wasn't seeing in my prior process.

So, my problem is 'fixed' now, but it seems like this is a bug,
particularly since most of the subtree merge tuturoials I've seen
online do the manual fetch step.  Is there any additional information
that would be useful for folks to see?

-Tom

On Thu, Mar 28, 2013 at 12:29 PM, Thomas Taranowski <tom@baringforge.com> wrote:
> I agree that subtree solves some specific use cases I would like to
> support.  In particular, I was hoping to use the subtree command in
> lieu of using the subtree merge strategy to manage and overlay changes
> to upstream projects, as well as other local components.
>
> At any rate, it looks like the problem I'm having is not entirely
> related to the subtree command, but happens when I checkout a remote
> into a branch ( which subtree is presumably doing in the background).
>
> It's the same setup as before.  Here is the sequence of commands I'm running.
>
> git init
> git remote add upstream git://gnuradio.org/gnuradio
> fetch upstream
> git checkout -b upstream_tracking upstream/master
>
> Now, at this point, I expect the upstream branch to contain the
> contents of the gnuradio project.  I also expect that my local mater
> branch has only the contents of my local sources, and NOT the contents
> of the gnuradio.  However, if I 'git checkout master', I see the
> contents of the gnuradio project.  Why, when I checkout a branch
> tracking upstream/master, do the changes also appear on my master
> branch, and not just in the remote tracking branch?
>
> As a reference, this is close to what I'm trying to accomplish.  His
> screenshot titled 'Directory Listing in Master' shows what I expect.
> http://typecastexception.com/post/2013/03/16/Managing-Nested-Libraries-Using-the-GIT-Subtree-Merge-Workflow.aspx
>
> Thanks
> -Tom Taranowski
>
> On Thu, Mar 28, 2013 at 9:34 AM, Jeremy Rosen <jeremy.rosen@openwide.fr> wrote:
>>>
>>> I am starting to regret that I caved in and started carrying a copy
>>> of it in contrib/.  It probably is a good idea to drop it from my
>>> tree and let it mature and eventually flourish outside.
>>>
>>
>> that's a shame... it solves a real problem, is simple to use, and really powerfull.
>>
>> but unfortunately, I have sent a patch that solves a serious bug... which had already been reported and patched but had received no answer, and nobody replied to it.
>>
>> Is there anything that can be done to get this rolling, or a way to have the use-case it covers better handle by git-submodule ?
>>
>>
>> currently the problem of a git repo in a git repo is very complicated to deal with in a clean way...
>>
>>
>> Regards
>>
>> Jérémy

  reply	other threads:[~2013-03-28 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28  3:12 git subtree oddity Thomas Taranowski
2013-03-28 13:34 ` Stephen Smith
2013-03-28 16:03   ` Junio C Hamano
2013-03-28 16:34     ` Jeremy Rosen
2013-03-28 19:29       ` Thomas Taranowski
2013-03-28 19:44         ` Thomas Taranowski [this message]
2013-03-29  5:47       ` Junio C Hamano

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=CAH0ocayVmTOFjTkYBRuA6RULafD1zY6hq1PWHWKONL9o24SFUA@mail.gmail.com \
    --to=tom@baringforge.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=greened@obbligato.org \
    --cc=ishchis2@gmail.com \
    --cc=jeremy.rosen@openwide.fr \
    /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).