From: David Aguilar <davvid@gmail.com>
To: Samuel Lijin <sxlijin@gmail.com>
Cc: Stavros Liaskos <st.liaskos@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: subtree merging fails
Date: Tue, 7 Feb 2017 10:44:37 -0800 [thread overview]
Message-ID: <20170207184437.c6uuuxcmhi434vbc@gmail.com> (raw)
In-Reply-To: <CAJZjrdU3toam4tDwXBu1Q3UAZm-kML3CzMrsMoJ_2jsGJ3vWrQ@mail.gmail.com>
On Tue, Feb 07, 2017 at 08:59:06AM -0600, Samuel Lijin wrote:
> Have you tried using (without -s subtree) -X subtree=path/to/add/subtree/at?
>
> From the man page:
>
> subtree[=<path>]
> This option is a more advanced form of subtree
> strategy, where the strategy
> makes a guess on how two trees must be shifted to match
> with each other when
> merging. Instead, the specified path is prefixed (or
> stripped from the
> beginning) to make the shape of two trees to match.
I'm not 100% certain, but it's highly likely that the subtree=<prefix>
argument needs to include a trailing slash "/" in the prefix,
otherwise files will be named e.g. "fooREADME" instead of
"foo/README" when prefix=foo.
These days I would steer users towards the "git-subtree" command in
contrib/ so that users don't need to deal with these details. It
handles all of this stuff for you.
https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt
https://github.com/git/git/tree/master/contrib/subtree
Updating the progit book to also mention git-subtree, in addition to the
low-level methods, would probably be a good user-centric change.
--
David
next prev parent reply other threads:[~2017-02-07 19:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 8:16 subtree merging fails Stavros Liaskos
2017-02-07 14:59 ` Samuel Lijin
2017-02-07 18:44 ` David Aguilar [this message]
2017-02-08 10:42 ` Stavros Liaskos
-- strict thread matches above, loose matches on Subject: below --
2017-02-06 8:48 Stavros Liaskos
2017-02-06 17:08 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170207184437.c6uuuxcmhi434vbc@gmail.com \
--to=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=st.liaskos@gmail.com \
--cc=sxlijin@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).