A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
Git case problems on Mac OS | Cloud Platform | Acquia Product Documentation
Cloud Platform
Git case problems on Mac OS
Git case problems on Mac OS
Date Published: February 24, 2022
By default, Mac OS uses a case insensitive file system. This can lead to issues for Drupal developers when a filename changes case in a module or core release. To mitigate this, Acquia recommends adding a global config to force git to pay attention to the case in filenames. You can do this by running the following from a command line:
git config --global core.ignorecase false
Here is an example of how this Mac issue can cause problems for Drupal developers:
In a recent release of the Purge module, the case was changed on a series of filenames. A developer using Composer on their Mac could have followed the correct workflow to update the module, but unless git was set to respect case, git wouldn't detect that those files changed because by default on a Mac git doesn't pay attention to the case of filenames.
This specific example update to the Purge module can result in the following errors on a Drupal site:
Pages rendering with the following message:
The website encountered an unexpected error. Please try again later.
Watchdog logs showing the following error:
Error: Class 'Drupal\purge\Plugin\Purge\Queue\NumberOfItemsStatistic' not found in Drupal\purge\Plugin\Purge\Queue\StatsTracker->initializeStatistics() (line 101 of...
In this situation, a developer would need to do the following:
Remove purge module locally ("rm -rf purge/" from "docroot/modules/contrib")
Push removal to Acquia git repo
run "git config --global core.ignorecase false" to make global git adjustment to force git to pay attention to case in filenames
run "composer update" to pull in purge module
Push update to Acquia git with ("git push --force [BRANCH]")