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
{{ message }}
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
refs\heads\master and refs\heads\some_features are branch but IsBranch() return false
Cause of problems
Cause of the path separators are mixed
If reference is retrieved from refs/heads, refs/remotes and refs/tags, path separator is determined by DotGit.fs.Join when read reference path.
So path separator will be "\" on windows.
But if reference is retrieved from packed-refs, the path written in the file has "/" as path separator even if it on windows and the path is used as reference path direct.
To Reproduce the problem
Expected behavior
IsBranch()
should return true if reference name is "master" or "some_features".Actual behavior
There are two problems.
refs\heads\master
andrefs\heads\some_features
are branch but IsBranch() return falseCause of problems
Cause of the path separators are mixed
If reference is retrieved from
refs/heads
,refs/remotes
andrefs/tags
, path separator is determined byDotGit.fs.Join
when read reference path.So path separator will be "\" on windows.
dotgit.go 468
But if reference is retrieved from
packed-refs
, the path written in the file has "/" as path separator even if it on windows and the path is used as reference path direct.packed-refs example:
Cause why IsBranch() return false even if it is branch
Windows path separator will be "\" but
IsBranch()
expect "/"Possible Fix
I think there are two ways to fix these problems.
The text was updated successfully, but these errors were encountered: