From: Thomas Taranowski <tom@baringforge.com>
To: git <git@vger.kernel.org>
Subject: git subtree oddity
Date: Wed, 27 Mar 2013 20:12:56 -0700 [thread overview]
Message-ID: <CAH0ocawbOX8C7_EaNFc2PiFT8cnpSJyPD+-8RLDL1S0SX-jQvw@mail.gmail.com> (raw)
I'd like to have the following configuration:
/myproject.git
|__/upstream_dependency -- Points to a remote library git repo
|__/project_source -- local project source
I issue the following commands to pull in the upstream dependency as a
subtree of the myproject.git repo:
git remote add upstream git://gnuradio.org/gnuradio
git fetch upstream
git checkout master
git subtree add -P upstream upstream/master
Now, my expectation is that I would have the following:
/myproject.git
|__/upstream_dependency -- Points to a remote library git repo
|____< all the upstream files are present here, as expected >
|__/project_source < this is still intact, as expected >
|__< all the upstream files are present here. wtf?>
My question is, why does "subtree add" pull in all the subtree files
into the root of the repo, and not just into the specified subtree
prefix?
#
# Here's an excerpt of what I see:
#
$:~/scratch/myproject.git$ ls
AUTHORS gr-comedi gr-utils
cmake gr-digital gr-video-sdl
CMakeLists.txt gr-fcd gr-vocoder
config.h.in gr-fft gr-wavelet
COPYING gr-filter gr-wxgui
docs gr-howto-write-a-block README
dtools gr-noaa README.building-boost
gnuradio-core gr-pager README.hacking
gr-analog gr-qtgui README-win32-mingw-short.txt
gr-atsc gr-shd upstream <---- the subtree directory
gr-audio gr-trellis volk
gr-blocks gruel
grc gr-uh
#
# Also, those same files are in the upstream subtree directory as well
(as expected)
#
$:~/scratch/myproject.git$ ls upstream
AUTHORS grc gruel
cmake gr-comedi gr-uhd
CMakeLists.txt gr-digital gr-utils
config.h.in gr-fcd gr-video-sdl
COPYING gr-fft gr-vocoder
docs gr-filter gr-wavelet
dtools gr-howto-write-a-block gr-wxgui
gnuradio-core gr-noaa README
gr-analog gr-pager README.building-boost
gr-atsc gr-qtgui README.hacking
gr-audio gr-shd README-win32-mingw-short.txt
gr-blocks gr-trellis volk
next reply other threads:[~2013-03-28 3:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 3:12 Thomas Taranowski [this message]
2013-03-28 13:34 ` git subtree oddity 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
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=CAH0ocawbOX8C7_EaNFc2PiFT8cnpSJyPD+-8RLDL1S0SX-jQvw@mail.gmail.com \
--to=tom@baringforge.com \
--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).