From: "René Scharfe" <l.s.r@web.de>
To: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Cc: George Shammas <georgyo@gmail.com>, git@vger.kernel.org
Subject: Re: git merge -s subtree seems to be broken.
Date: Wed, 1 Aug 2018 02:58:50 +0200 [thread overview]
Message-ID: <d60fc243-7271-bc49-b687-ade2b6e315ea@web.de> (raw)
In-Reply-To: <xmqqeffj9ku3.fsf@gitster-ct.c.googlers.com>
Am 31.07.2018 um 23:06 schrieb Junio C Hamano:
> Jeff King <peff@peff.net> writes:
>
>> On Tue, Jul 31, 2018 at 01:23:04PM -0400, Jeff King wrote:
>> ...
>> So here it is fixed, and with a commit message. I'm not happy to omit a
>> regression test, but I actually couldn't come up with a minimal one that
>> tickled the problem, because we're playing around with heuristics.
How about something like this? (squashable)
---
t/t6029-merge-subtree.sh | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/t/t6029-merge-subtree.sh b/t/t6029-merge-subtree.sh
index 3e692454a7..474a850de6 100755
--- a/t/t6029-merge-subtree.sh
+++ b/t/t6029-merge-subtree.sh
@@ -29,6 +29,34 @@ test_expect_success 'subtree available and works like recursive' '
'
+test_expect_success 'setup branch sub' '
+ git checkout --orphan sub &&
+ git rm -rf . &&
+ test_commit foo
+'
+
+test_expect_success 'setup branch main' '
+ git checkout -b main master &&
+ git merge -s ours --no-commit --allow-unrelated-histories sub &&
+ git read-tree --prefix=dir/ -u sub &&
+ git commit -m "initial merge of sub into main" &&
+ test_path_is_file dir/foo.t &&
+ test_path_is_file hello
+'
+
+test_expect_success 'update branch sub' '
+ git checkout sub &&
+ test_commit bar
+'
+
+test_expect_success 'update branch main' '
+ git checkout main &&
+ git merge -s subtree sub -m "second merge of sub into main" &&
+ test_path_is_file dir/bar.t &&
+ test_path_is_file dir/foo.t &&
+ test_path_is_file hello
+'
+
test_expect_success 'setup' '
mkdir git-gui &&
cd git-gui &&
--
2.18.0
next prev parent reply other threads:[~2018-08-01 0:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 14:09 git merge -s subtree seems to be broken George Shammas
2018-07-31 15:03 ` George Shammas
2018-07-31 15:50 ` Jeff King
2018-07-31 16:08 ` Junio C Hamano
2018-08-01 0:58 ` René Scharfe
2018-07-31 15:53 ` Junio C Hamano
2018-07-31 15:56 ` George Shammas
2018-07-31 16:15 ` Jeff King
2018-07-31 17:17 ` Junio C Hamano
2018-07-31 17:23 ` Jeff King
2018-07-31 19:04 ` Jeff King
2018-07-31 19:52 ` George Shammas
2018-07-31 20:40 ` Jeff King
2018-07-31 21:06 ` Junio C Hamano
2018-08-01 0:58 ` René Scharfe [this message]
2018-08-02 18:58 ` Jeff King
2018-08-02 18:45 ` Jeff King
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=d60fc243-7271-bc49-b687-ade2b6e315ea@web.de \
--to=l.s.r@web.de \
--cc=georgyo@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).