You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See attached image. When cd'ing into a directory so that the working directory is technically the same but the actual path is different, git-nest does some really weird things. It chooses the current working directory as the root (which is technically correct and the same), but chooses the correct path as the repository root and thus says that the current working directory is not a git repository.
Maybe lowecasing paths at comparisons could be enough. I think it's because Windows and MacOS filesystems are case-insensitive by default (which is much preferred, MacOS supports both). Ext-4 on the other hand is case sensitive.
This problem should be taken in consideration when comparing paths. Golang offers a function that checks wether the underlying filesystem is case-sensitive or not: https://pkg.go.dev/github.com/golang/dep/internal/fs#IsCaseSensitiveFilesystem. However, this function performs some system calls, which might lead to performance impacts on larger scale.
I propose a function for comparing paths, which should be the new default way of comparing paths:
func (pPath) Equals(otherPath) bool {
// check for case sensitivity// if case insensitive, then lowecase and compare// else compare directly
}
The text was updated successfully, but these errors were encountered:
See attached image. When
cd
'ing into a directory so that the working directory is technically the same but the actual path is different, git-nest does some really weird things. It chooses the current working directory as the root (which is technically correct and the same), but chooses the correct path as the repository root and thus says that the current working directory is not a git repository.Maybe lowecasing paths at comparisons could be enough. I think it's because Windows and MacOS filesystems are case-insensitive by default (which is much preferred, MacOS supports both). Ext-4 on the other hand is case sensitive.
This problem should be taken in consideration when comparing paths. Golang offers a function that checks wether the underlying filesystem is case-sensitive or not: https://pkg.go.dev/github.com/golang/dep/internal/fs#IsCaseSensitiveFilesystem. However, this function performs some system calls, which might lead to performance impacts on larger scale.
I propose a function for comparing paths, which should be the new default way of comparing paths:
The text was updated successfully, but these errors were encountered: