TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Six top-level folders in a Git repo with the same name

2 pointsby vietjtnguyenover 3 years ago
https:&#x2F;&#x2F;github.com&#x2F;vietjtnguyen&#x2F;whitespace-folder-names<p>https:&#x2F;&#x2F;gitlab.com&#x2F;vietjtnguyen&#x2F;whitespace-folder-names<p>I was surprised when someone pushed commits to an internal repo showing folders with the same name. Leading and trailing whitespace is allowed for a folder name and git respects this. Github and GitLab will both render the full folder name in the DOM but don&#x27;t escape it with `&amp;nbsp;` or use the `white-space: pre` [1] CSS property (TIL) which leads to whitespace collapse. Interestingly the tooltip on Github shows the full name but not on GitLab.<p>To me it&#x27;s another example of how difficult it is to anticipate the full space of user input.<p>[1]: https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;white-space

1 comment

CodeHzover 3 years ago
BTW, the GitHub mobile app rendering them correctly (since it doesn&#x27;t use html)