Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When updating files with different file name capitalization, the old file name capitalization is kept #895

Closed
hendriks73 opened this issue Sep 30, 2021 · 2 comments
Assignees
Labels
bug 🐦 Hacktoberfest
Milestone

Comments

@hendriks73
Copy link

@hendriks73 hendriks73 commented Sep 30, 2021

Describe the bug

When the capitalization of a file name deployed via the plugin changes, it is not accessible under the new capitalization, but only the old. Also the capitalization in the branch is not changed and stays wrong. Most likely this has to do with GitHub using a case insensitive file system.

Reproduction Steps

  • 1st run: a file called AirPlayDevice.html is pushed to gh-pages branch and can be accessed under AirPlayDevice.html. Great!
  • 2nd run: the file name's capitalization is changed to AirplayDevice.html. When trying to access the file under AirplayDevice.html, a 404 is returned. When trying using the (now wrong!) name AirPlayDevice.html the correct file is returned. In the gh-branches branch, the capitalization is now wrong (no lowercase p).

Note that the file is generated freshly before calling github-pages-deploy-action. So the problem definitely occurs when merging changes into the target branch.

Additional Comments

You might want to check desktop/desktop#2672

Perhaps this could be fixed by setting

git config core.ignorecase false

before merging. I understand this is not something everybody would want, but it would be nice, if it was optional.

Perhaps this issue could also be worked around by users of your action by calling

git config --global core.ignorecase true

before running it.

@hendriks73
Copy link
Author

@hendriks73 hendriks73 commented Oct 1, 2021

Adding
git config --global core.ignorecase true
to the workflow didn't seem to help.

@JamesIves JamesIves added bug 🐦 Hacktoberfest and removed triage ⚠️ labels Oct 6, 2021
markmandel added a commit to googleforgames/quilkin that referenced this issue Nov 23, 2021
Github pages action doesn't handle case changes
very well:
JamesIves/github-pages-deploy-action#895

Closes #443
@JamesIves JamesIves added this to the 4.2.0 milestone Jan 6, 2022
@JamesIves JamesIves self-assigned this Jan 6, 2022
@JamesIves
Copy link
Owner

@JamesIves JamesIves commented Jan 6, 2022

This is resolved in 4.2.0. It's suggested that you update the casing on your files using the git mv command instead of globally setting ignorecase in your configuration unless you absolutely need to.

git mv -f index.html InDeX.html

The action will now commit any case changes as it sets ignorecase internally within the workflow runs so it should pick up any committed case changes.

I'm not going to activate this option behind a flag as it shouldn't effect 99% of users, but should it cause problems I may re-evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐦 Hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants