Discussion

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

https://github.com/vietjtnguyen/whitespace-folder-names

https://gitlab.com/vietjtnguyen/whitespace-folder-names

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't escape it with ` ` 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.

To me it's another example of how difficult it is to anticipate the full space of user input.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

2 points vietjtnguyen 4 years ago 1 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton