I tried searching Xorg gitlab but can't find it for now. I would like to suggest this patch to give option of avoiding .xsession-errors completely.
3 Answers
Let's analyze the file origin locally
$ dpkg -S /etc/X11/Xsession
x11-common: /etc/X11/Xsession
$ apt-cache show x11-common | grep Source | sort -u
Source: xorgor using packages.ubuntu.com - it says that source package is xorg(see this page).
Semi-appstream is on Debian Salsa - . You can try to send pull request here.
But I can't find this file on Freedesktop Gitlab.
About the premise - I think that your patch will never be included upstream, because of great possibilities of .xsession-errors. Developers and users use this file to determine what is wrong. If you want to change this - change it on your own machine.
The source of the Xsession file is Debian.
The file is located in the Debian/Ubuntu xorg source > debian/local/ folder.
Xorg is the upstream source for the /etc/X11/Xsession file.
If you think that your patch may one or more bugs, check to see if those bugs are already being tracked and awaiting your patch.
If you want the patch to get visibility and feedback, try the xorg-devel mailing list. However, I suggest starting with the ubuntu-devel mailing list, which includes many smart engineers and some Xorg devs - they can give you early feedback if your patch is ready for xorg, or needs some kind of work.
1