microsoft / microsoft/VFSForGit
Could not find any recognizable digits
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 474
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
Recently we have this issue while using gvfs clone. The stacktrace is:
at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
at System.Convert.ToByte(String value, Int32 fromBase)
at GVFS.Common.Git.GitPathConverter.ConvertPathOctetsToUtf8(String filePath) in E:\A\_work\45\s\GVFS\GVFS.Common\Git\GitPathConverter.cs:line 34
at GVFS.Common.Git.DiffTreeResult.ConvertPathToAbsoluteUtf8Path(String repoRoot, String relativePath) in E:\A\_work\45\s\GVFS\GVFS.Common\Git\DiffTreeResult.cs:line 110
at GVFS.Common.Git.DiffTreeResult.ParseFromLsTreeLine(String line, String repoRoot) in E:\A\_work\45\s\GVFS\GVFS.Common\Git\DiffTreeResult.cs:line 72
at GVFS.CommandLine.GVFSVerb.<>c__DisplayClass44_0.<TryDownloadRootGitAttributes>b__0(String line) in E:\A\_work\45\s\GVFS\GVFS\CommandLine\GVFSVerb.cs:line 396
at System.Diagnostics.Process.OutputReadNotifyUser(String data)
at System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
at System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
at System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
Looking at the code:
and this code:
Seems like if there's any "\" in the path we would have this issue. Any reason?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with GVFS.Common/Git/GitPathConverter.cs at ConvertPathOctetsToUtf8 and GVFS.Common/Git/DiffTreeResult.cs at ParseFromLsTreeLine and ConvertPathToAbsoluteUtf8Path. Reproduce the failure during a gvfs clone using a path containing a backslash, then trace how the path reaches Convert.ToByte. Done means the clone no longer raises the parsing exception and the path is handled correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100