Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. Troubleshooting
  3. Known Issues

Git case problems on Mac OS

    See more
    • Updated
    • August 25, 2020 08:49

    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]")
    • Run cache rebuild ("drush cr")

    Topics

    • git
    Avatar
    Matt Farineau
    • August 25, 2020 08:49
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    3 out of 4 found this helpful

    Return to top

    Related articles

    • Workaround for default PHP settings
    • Setting the private file directory on Acquia Cloud
    • How to better integrate New Relic with your application on Acquia Cloud
    • Purging Varnish cache on Acquia Cloud
    • Platform CDN provision checklist

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.