-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add a dummy CVS backend to recognize and skip CVS working directories #115
Conversation
## [v0.10.0](v0.9.0...v0.10.0) (2019-04-27) * drop mitchellh/go-homedir dependency [#122](#122) ([Songmu](https://github.com/Songmu)) * introduce Go Modules and adjust releng files [#121](#121) ([Songmu](https://github.com/Songmu)) * Add a dummy CVS backend to recognize and skip CVS working directories [#115](#115) ([knu](https://github.com/knu)) * add -l option on get command which immediately look after get [#112](#112) ([kuboon](https://github.com/kuboon)) * add support for Fossil SCM [#98](#98) ([motemen](https://github.com/motemen)) * Use parsed username also with ssh for Git [#101](#101) ([jjv](https://github.com/jjv)) * Add ghq.completeUser config to disable user completion of `ghq get` [#118](#118) ([k0kubun](https://github.com/k0kubun)) * ghq get --vcs=<vcs> [#72](#72) ([motemen](https://github.com/motemen)) * warn if executable was not found when RunCommand [#70](#70) ([motemen](https://github.com/motemen)) * support `meta name="go-import"` to detect Go repository [#120](#120) ([Songmu](https://github.com/Songmu)) * support refs which start with URL Authority in ghq get [#119](#119) ([Songmu](https://github.com/Songmu))
FYI; My ghq.root is
ghq-v0.9.0 list returns the below;
However, ghq-v0.10.0 list returns only
When I renamed |
@masutaka That is an unfortunate problem with a case insensitive filesystem. It's too bad there is no way to get the exact file name written on disk via os.Stat(); Name() of FileInfo just returns what was passed to os.Stat(). I guess the only way to perform a case sensitive match is to open the parent directory and iterate through the directory entries. |
Since `os.Stat("CVS")` successfully picks `cvs` on a case insensitive filesystem, we need to iterate through the directory entries to see if the directory with the exact name exists. cf. x-motemen#115 (comment)
Since `os.Stat("CVS")` successfully picks `cvs` on a case insensitive filesystem, we need to iterate through directory entries to see if a directory with the exact name exists. cf. x-motemen#115 (comment)
If you have a CVS working directory tree in ghq.root, ghq walks into it and never gets out until it traverses the whole tree.
CVS does not have a single URL which it can clone from, but you need a pair of a CVSROOT URL and a module path which can include any level of relative directory components. That's why I gave up on implementing real Clone()/Update() functions.
To wrap up, this patch teaches ghq to just keep away from CVS working trees.