How to patch a file that is not in a module's git repo? I want to patch CheckoutCartEventSubscriber.php, which can be found in /web/modules/contrib/commerce/modules/checkout/src/EventSubscriber when installed via composer.
So I cloned Commerce from the drupal.org git repository, navigated to the /modules/checkout/src/, and found that there is no EventSubscriber directory.  All the other directories that can be found in the composer install exist except EventSubscriber.
The github repo browser doesn't show the EventSubscriber directory, either.
So where is this directory? How can I find the file to patch it?
That gihub repository looks to be outdated, as the last commit was made May 15, 2020
To see a module's repository, go to the projects page and click on on &quot;Browse code repository&quot;

Which will take you to the GitLab repository.


So where is this directory?

Well... that directory doesn't exist. Maybe your composer.json already contains a patch that creates it? OR someone manually added that folder and file, as that folder and file is not officially part of Commerce.