git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] merge: refuse to create too cool a merge by default

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 18, 2016, 21:00 UTC
Message-ID
<CAPig+cRN_3kP8+w2inG+hm_81AXLVx6CFER+MPr_oenDqEdEug@mail.gmail.com>
In-Reply-To
<xmqqshznpmfe.fsf@gitster.mtv.corp.google.com>
On Fri, Mar 18, 2016 at 4:21 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
> While it makes sense to allow merging unrelated histories of two
> projects that started independently into one, in the way "gitk" was
> merged to "git" itself aka "the coolest merge ever", such a merge is
> still an unusual event.  Worse, if somebody creates an independent
> history by starting from a tarball of an established project and
> sends a pull request to the original project, "git merge" however
> happily creates such a merge without any sign of something unusual
> is happening.
>
> Teach "git merge" to refuse to create such a merge by default,
> unless the user passes a new "--allow-unrelated-histories" option to
> tell it that the user is aware that two unrelated projects are
> merged.
> [...]
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> @@ -279,9 +280,10 @@ test_expect_success 'clone shallow depth count' '
>  test_expect_success 'clone shallow object count' '
>         (
>                 cd shallow &&
> +               git prune &&
>                 git count-objects -v
>         ) > count.shallow &&
> -       grep "^count: 55" count.shallow
> +       grep "^count: 54" count.shallow
>  '
Um, wasn't this change the subject of a separate patch[1]?
[1]: http://article.gmane.org/gmane.comp.version-control.git/289246
Previous: Junio C HamanoNext: Ramsay Jones
Message 7 of 10 in “merge: refuse to create too cool a merge by default”
  1. merge: refuse to create too cool a merge by defaultJunio C Hamano, Mar 18, 2016
  2. Linus TorvaldsMar 18, 2016
  3. Junio C HamanoMar 18, 2016
  4. Junio C HamanoApr 6, 2016
  5. Linus TorvaldsApr 6, 2016
  6. Junio C HamanoApr 6, 2016
  7. Eric SunshineMar 18, 2016
  8. Ramsay JonesMar 18, 2016
  9. David TurnerMar 18, 2016
  10. Junio C HamanoMar 18, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.