git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories
@ 2018-10-24  8:04 Uwe Kleine-König
  2018-10-25  5:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2018-10-24  8:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Miklos Vajna

Without passing --allow-unrelated-histories the command sequence
fails as intended since commit e379fdf34fee ("merge: refuse to create
too cool a merge by default"). To setup a subtree merging unrelated
histories is normal, so add the option to the howto document.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 Documentation/howto/using-merge-subtree.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt
index 1ae8d1214ec0..a499a94ac228 100644
--- a/Documentation/howto/using-merge-subtree.txt
+++ b/Documentation/howto/using-merge-subtree.txt
@@ -33,7 +33,7 @@ Here is the command sequence you need:
 
 ----------------
 $ git remote add -f Bproject /path/to/B <1>
-$ git merge -s ours --no-commit Bproject/master <2>
+$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2>
 $ git read-tree --prefix=dir-B/ -u Bproject/master <3>
 $ git commit -m "Merge B project as our subdirectory" <4>
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories
  2018-10-24  8:04 [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories Uwe Kleine-König
@ 2018-10-25  5:43 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2018-10-25  5:43 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: git, Miklos Vajna

Uwe Kleine-König <uwe@kleine-koenig.org> writes:

> Without passing --allow-unrelated-histories the command sequence
> fails as intended since commit e379fdf34fee ("merge: refuse to create
> too cool a merge by default"). To setup a subtree merging unrelated
> histories is normal, so add the option to the howto document.
>

Thanks.  We should have been more careful when we tightened "git
merge".

Will apply.

> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  Documentation/howto/using-merge-subtree.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/howto/using-merge-subtree.txt b/Documentation/howto/using-merge-subtree.txt
> index 1ae8d1214ec0..a499a94ac228 100644
> --- a/Documentation/howto/using-merge-subtree.txt
> +++ b/Documentation/howto/using-merge-subtree.txt
> @@ -33,7 +33,7 @@ Here is the command sequence you need:
>  
>  ----------------
>  $ git remote add -f Bproject /path/to/B <1>
> -$ git merge -s ours --no-commit Bproject/master <2>
> +$ git merge -s ours --no-commit --allow-unrelated-histories Bproject/master <2>
>  $ git read-tree --prefix=dir-B/ -u Bproject/master <3>
>  $ git commit -m "Merge B project as our subdirectory" <4>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-25  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24  8:04 [PATCH] howto/using-merge-subtree: mention --allow-unrelated-histories Uwe Kleine-König
2018-10-25  5:43 ` Junio C Hamano

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).