Yes, how about 100k parents?
Here is a live GitHub example with a merge of 100k commits: https://github.com/cirosantilli/test-octopus-100k Generated with this script.
Trivia
Linus does not like commits with more than 60 parents: https://www.destroyallsoftware.com/blog/2017/the-biggest-and-weirdest-commits-in-linux-kernel-git-history
It's pulled, and it's fine, but there's clearly a balance between "octopus merges are fine" and "Christ, that's not an octopus, that's a Cthulhu merge".
Have a look at the format for the Git commit object
https://stackoverflow.com/questions/22968856/what-is-the-file-format-of-a-git-commit-object/37438460#37438460
From that analysis, we can see that the list of parents list is an arbitrary newline separated list of type:
parent {parent_1_sha}
parent {parent_2_sha}
...
parent {parent_N_sha}
and so an arbitrary number of parents is allowed.
Minimal example
Script:
#!/usr/bin/env bash
set -eu
mkdir tmp
cd tmp
git init
touch root
git add .
git commit -m root
sha_root="$(git log -1 --format="%H")"
touch 1
git add .
git commit -m 1
sha1="$(git log -1 --format="%H")"
git reset --hard "$sha_root"
touch 2
git add .
git commit -m 2
sha2="$(git log -1 --format="%H")"
git reset --hard "$sha_root"
touch 3
git add .
git commit -m 3
sha3="$(git log -1 --format="%H")"
git merge -m merge "$sha1" "$sha2"
View it:
git log --abbrev-commit --decorate --graph --pretty=oneline --all
Output:
*-. 70b4d8c (HEAD -> master) merge
|\ \
| | * e54f235 2
| * | c7ab8ef 1
| |/
* / ae5f932 3
|/
* ef2f89e root
How it shows on git log:
commit 70b4d8c93b8ba47d3a2b2d4d45619ad5e0f34289 (HEAD -> master)
Merge: ae5f932 c7ab8ef e54f235
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu Dec 3 23:45:07 2020 +0000
merge
commit ae5f932c1de34255400806f85f7f58ff52b7ae86
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu Dec 3 23:45:07 2020 +0000
3
commit c7ab8efcb25e49ffc653ce5308cd5151d6a3fb94
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu Dec 3 23:45:07 2020 +0000
1
commit e54f235a54da0900cec99301099673e3bc1cd01e
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu Dec 3 23:45:07 2020 +0000
2
commit ef2f89eeb8fa83779b58b604f9814ec6fdfcc20c
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date: Thu Dec 3 23:45:07 2020 +0000
root
Tested on git version 2.25.1.