freebsd-ports icon indicating copy to clipboard operation
freebsd-ports copied to clipboard

Fix git clone and working on repo under Windows

Open PhilZ-cwm6 opened this issue 2 years ago • 8 comments

Windows can support long file names, but these file names are not allowed: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9

Source: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

PhilZ-cwm6 avatar Mar 20 '22 19:03 PhilZ-cwm6

This should allow cloning or working on the repo remotely from a Windows machine

PhilZ-cwm6 avatar Mar 20 '22 19:03 PhilZ-cwm6

If an OS can't support a file name prn - this is obviously a bug there. It doesn't make sense to rename all such files everywhere, rather the bug should be fixed.

Did you try to report this to Microsoft?

yurivict avatar Mar 20 '22 20:03 yurivict

You will also need to add a line to MOVED, somehting like japanese/prn|japanese/prn-bin|2022-03-20|Allow cloning the repository on Windows

rene0 avatar Mar 20 '22 20:03 rene0

@yurivict : this is not a freebsd vs ms, every os has its restrictions. Win restrictions are all in the official doc I linked to. There is no way to work on the repo using Github Desktop or any win system without respecting os limitations

@rene0 : feel free to amend my commit, or specify exactly where I would add this line ?

Best regards

PhilZ-cwm6 avatar Mar 20 '22 22:03 PhilZ-cwm6

Added the commit to MOVED, but did not rebase and there is conflict with MOVED I think that compatibility to work on the repo from windows should be preserved

PhilZ-cwm6 avatar Mar 20 '22 22:03 PhilZ-cwm6

squashed and rebased on current branch

PhilZ-cwm6 avatar Mar 24 '22 15:03 PhilZ-cwm6

Rename the port to pr0n.

michael-o avatar Sep 10 '22 06:09 michael-o

@PhilZ-cwm6 The restrictions on file names on POSIX systems is that they must be nonempty and may not contain NUL bytes or the slash character. Any other file name is permitted. I don't think compatibility with Windows is of importance to the FreeBSD project in this regard.

clausecker avatar May 11 '23 22:05 clausecker