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

'next'ed --allow-unrelated-histories could cause lots of grief

From
Yaroslav Halchenko <yoh@onerussian.com>
Date
Apr 21, 2016, 16:10 UTC
Message-ID
<20160421161043.GK7907@onerussian.com>
Dear Git Gurus,
I guess whenever it rains it indeed pours, so it is me whining again.

I have decided to try 2.8.1.369.geae769a available from debian experimental and through our (datalad) tests failing I became aware of the

    https://github.com/git/git/pull/158/commits/e379fdf34fee96cd205be83ff4e71699bdc32b18
    merge: refuse to create too cool a merge by default

which is planned for the next release. I guess it is indeed a worthwhile accident-prevention measure BUT not sure if it is so important as to cause a change in behavior on which some projects using git through the cmdline interface might have been relying upon for years!

Given that git is quite 'self-healing', i.e. if someone has managed to make a merge he didn't intend to, there is always a way back (e.g., as simple as git reset --hard HEAD^), I am really not sure how valuable such change of default behavior would be? Could it may be made into a warning instead? or reversed option "--dont-allow-unrelated-histories"?

Moreover, it was explicitly stated that "no configuration variable to enable this by default exists and will not be added", which would cause 3rd party scripts/code/projects relying on previous behavior to provide version specific handling (either to add that --allow-unrelated-histories or not)... very cumbersome! If nothing else remains, could there at least be a config option which we could then use regardless of the version of git we are using for such merges?

P.S. Please maintain CC list
Thank you in advance for your consideration,
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
Next: Junio C Hamano
Message 1 of 8 in “'next'ed --allow-unrelated-histories could cause lots of grief”
  1. Yaroslav HalchenkoApr 21, 2016
  2. Junio C HamanoApr 21, 2016
  3. Yaroslav HalchenkoApr 21, 2016
  4. Junio C HamanoApr 21, 2016
  5. Yaroslav HalchenkoApr 21, 2016
  6. Joey HessApr 21, 2016
  7. Junio C HamanoApr 21, 2016
  8. Joey HessApr 21, 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.