Open sirnacnud opened 1 year ago
Hi.
~/Library/Logs/Fork.log
Seems like a different error. This is what is in the log file:
❌[PatchTokenizer.swift:260] > Can not find src prefix start in:
diff --git "forkSrcPrefix/MapDownloads/Internal/Persistence/\020DatabaseMigrationStep.swift" "forkDstPrefix/MapDownloads/Internal/Persistence/\020DatabaseMigrationStep.swift"
Seems like the \020
on the file name was causing the issue. I removed this off the file name and it is working now. Strange that Xcode put this on the file name.
\020
You have a weirdly named name which has \020
at the beginning. How is that file named on disk? Do you know how that file was created as I could reproduce that problem?
It must of been some weird bug in Xcode, as I created this file there. In Xcode this special character was not shown at the start of the file name, it just looked normal.
Anyways, thanks for the help.
When I create a file with a leading space (touch " test.txt"
), git doesn't encode it with \020
:
my:
diff --git forkSrcPrefix/ file.txt forkDstPrefix/ file.txt ^ ^
yours:
diff --git "forkSrcPrefix/MapDownloads/Internal/Persistence/\020DatabaseMigrationStep.swift" "forkDstPrefix/MapDownloads/Internal/Persistence/\020DatabaseMigrationStep.swift" ^^^^ ^^^^
I will make Fork handle such paths, however, I would really want to know how to reproduce such a case.
Please let me keep this case open until I investigate it. Thank you for reporting that problem 👍
It's not the same as a normal space. ls
shows it as a ?
and in Finder it looks normal. od
shows the 020
character.
duncan@Duncans-MBP:~/Source/native-iphone-client/MapDownloads/Internal/Persistence$ ls *DatabaseMigrationStep.swift
?DatabaseMigrationStep.swift
duncan@Duncans-MBP:~/Source/native-iphone-client/MapDownloads/Internal/Persistence$ ls *DatabaseMigrationStep.swift | od -c
0000000 020 D a t a b a s e M i g r a t i
0000020 o n S t e p . s w i f t \n
0000035
I've noticed this, too. If I scroll a little bit I can kick it to start rendering again. I don't see any logs like this, though.
I have run into this "Parse error" issue as well. It is caused by filenames that contain some Unicode characters. For example, I have some text files that have the Unicode bullet character ("∙") in them, and those consistently cause Fork to report a "Parse error".
I needed to do a diff across two branches and ran into this issue yesterday. I tried Sourcetree and found that—while I don’t its UI that much—it worked flawlessly (i.e. didn’t get hung up on Unicode chars).
Perhaps this will help hunting for / resolving this "Parse" issue.
I am running into an error where the Commit/Changes/File Tree view doesn't render and shows
parseError(error: Cannot parse patch for <commitHash>)
.The error doesn't happen on all branches, but seems to be local branches and maybe only ones that I recently rebased. I'm not for sure when the error started happening, but only recently.
I am on macOS 13.4.1 and have tried both Fork 2.28.1, 2.29.2, and 2.30.