-
-
Notifications
You must be signed in to change notification settings - Fork 683
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needednostaleimmune to stale-botimmune to stale-botwindows
Description
Hello! Love this tool, thanks for your work π
I encountered and reproduced an issue with the Windows binary on repositories containing long filenames.
Bug description
On Windows, when running gitui.exe from the command line in repositories with filenames exceeding MAX_PATH (260 characters), it fails with the following error:
panic: Any
trace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: BaseThreadInitThunk
10: RtlUserThreadStart
Running from Git Bash yields an additional bit of information about the crash origin:
5β£―: <unknown>>n>load: Any, message: Some(failed to fetch status: Git(Error { code: -1, klass: 30, message: "invalid path \'\\\\?\\C:\\U
6: <unknown>\Workspace\\Git\\toto\\very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faucibus-d
7: <unknown>orbi-dolor-ligula-tempus-dir\\very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faupanic: Anynown>uctor-morbi-dolor-ligula-tempus\' (path too long)" })), location: Location { file: "asyncgit\\src\\status.rs", line: 122trace:<unknown>
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>dInitThunk
6: <unknown>readStart
7: <unknown>
8: <unknown>
9: BaseThreadInitThunk
10: RtlUserThreadStart
To reproduce
On Windows, from command line:
git init toto
cd toto
:: 136 characters long file name
echo . > very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faucibus-diam-ut-auctor-morbi-dolor-ligula-tempus
:: 140 characters long directory name
mkdir very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faucibus-diam-ut-auctor-morbi-dolor-ligula-tempus-dir
:: At this point, gitui works
gitui
:: Move file inside directory, which will exceed MAX_PATH length
mv very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faucibus-diam-ut-auctor-morbi-dolor-ligula-tempus very-long-path-lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-quisque-pharetra-faucibus-diam-ut-auctor-morbi-dolor-ligula-tempus-dir\
:: At this point, gitui crashes
gituiExpected behavior
gitui does not crash. Since Git allows working with long paths on Windows thanks to git config core.longpaths (usually set at the --system or --global level), this scenario is not an oddity.
Context
- OS/Distro + Version: Windows 10
- GitUI Version: 0.8
- Rust version: unknown (bundled in
.exeI guess?)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needednostaleimmune to stale-botimmune to stale-botwindows