Skip to content

[Bug]: Duplicated filenames cause collisions when cloning repo on case-insensitive filesystems #950

Description

@jsacrist

Before submitting

  • I have searched existing issues to make sure this bug hasn't already been reported
  • I have updated to the latest version of the software to verify the issue still exists
  • I have cleared cache/cookies/storage or tried in a private/incognito window (if applicable)

Hardware

Not Applicable

Connection Type

HTTP

Local or Hosted

https://client.meshtastic.org, http://meshtastic.local

Firmware Version

N/A

Operating System

Windows 11

Browser

No response

Expected Behavior

# git clone https://github.com/meshtastic/web.git
Cloning into 'web'...
remote: Enumerating objects: 17721, done.
remote: Counting objects: 100% (527/527), done.
remote: Compressing objects: 100% (298/298), done.
remote: Total 17721 (delta 370), reused 238 (delta 229), pack-reused 17194 (from 3)
Receiving objects: 100% (17721/17721), 8.30 MiB | 14.53 MiB/s, done.
Resolving deltas: 100% (11977/11977), done.

Actual Behavior

# git clone https://github.com/meshtastic/web.git
Cloning into 'web'...
remote: Enumerating objects: 17721, done.
remote: Counting objects: 100% (527/527), done.
remote: Compressing objects: 100% (298/298), done.
remote: Total 17721 (delta 370), reused 238 (delta 229), pack-reused 17194 (from 3)
Receiving objects: 100% (17721/17721), 8.30 MiB | 13.69 MiB/s, done.
Resolving deltas: 100% (11977/11977), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'packages/web/public/Logo.svg'
  'packages/web/public/logo.svg'
  'packages/web/public/Logo_Black.svg'
  'packages/web/public/logo_black.svg'
  'packages/web/public/Logo_White.svg'
  'packages/web/public/logo_white.svg'

Steps to Reproduce

  1. Use a windows computer (or any system with a case-insensitive filesystem
  2. Clone the web repository (git clone https://github.com/meshtastic/web.git)
  3. Look at the console output to confirm that some files were not properly created during the repo cloning.

Relevant console output

Screenshots

No response

Additional Context

Some assets located in packages/web/public/ are duplicated and have the same name with different casing.

# md5sum *.* | sort
35dfcbac4af00af77c1b47b98aef1846  Logo_Black.svg
35dfcbac4af00af77c1b47b98aef1846  logo_black.svg
3d2c6963a8e9782051ce2dc640718283  Logo_White.svg
3d2c6963a8e9782051ce2dc640718283  logo_white.svg
5da15ac75bbdb8141397257f7356c50c  chirpy.svg
957c1f0c0e43c43a6caf3129c79e081b  favicon.ico
96259c06b25501b0bd34382c638cdaee  site.webmanifest
f77c87f977e0fcce05a6df46c885a129  robots.txt
fd8e93a430a6c42e243f145e2b3404ac  apple-touch-icon.png
fdd5572a21f8b51598f9490b068420af  Logo.svg
fdd5572a21f8b51598f9490b068420af  icon.svg
fdd5572a21f8b51598f9490b068420af  logo.svg

The offending files are:

  • Logo_Black.svg, logo_black.svg
  • Logo_White.svg, logo_white.svg
  • Logo.svg, logo.svg.

Cloning the repository in a case-insensitive filesystem (Like NTFS on a Windows system) results in the following warning:

C:\Users\user\OneDrive\Desktop\tmp>git clone https://github.com/meshtastic/web.git
Cloning into 'web'...
remote: Enumerating objects: 17721, done.
remote: Counting objects: 100% (527/527), done.
remote: Compressing objects: 100% (298/298), done.
remote: Total 17721 (delta 370), reused 238 (delta 229), pack-reused 17194 (from 3)
Receiving objects: 100% (17721/17721), 8.30 MiB | 13.69 MiB/s, done.
Resolving deltas: 100% (11977/11977), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

  'packages/web/public/Logo.svg'
  'packages/web/public/logo.svg'
  'packages/web/public/Logo_Black.svg'
  'packages/web/public/logo_black.svg'
  'packages/web/public/Logo_White.svg'
  'packages/web/public/logo_white.svg'

Doing a quick search in the codebase suggests that only the lowercase version of each file is actually being used. Fixing this should be a matter of simply deleting the uppercase version of the duplicated files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions