Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4.19k stars 113 forks source link

"File name too long" during git clone #10

Closed oconnor663 closed 5 years ago

oconnor663 commented 5 years ago
Cloning into 'dua-cli'...                                                                                                                                                                      
remote: Enumerating objects: 510, done.                                                                                                                                                        
remote: Counting objects: 100% (510/510), done.                                                                                                                                                
remote: Compressing objects: 100% (230/230), done.                                                                                                                                             
remote: Total 1906 (delta 339), reused 440 (delta 279), pack-reused 1396                                                                                                                       
Receiving objects: 100% (1906/1906), 392.91 KiB | 8.73 MiB/s, done.                                                                                                                            
Resolving deltas: 100% (1250/1250), done.                                                                                                                                                      
error: unable to create file tests/fixtures/right-to-left/ثم نفس سقطت وبالتحديد،, جزيرتي باستخدام أن دنو. إذ هنا؟ الستار وتنصيب كان. أهّل ايطاليا، بريطانيا-فرنسا قد أخذ. سليمان، إتفاقية بين ما
, يذكر الحدود أي بعد, معاملة بولندا، الإطلاق عل إيو.: File name too long                                                                                                                       
fatal: unable to checkout working tree                                                                                                                                                         
warning: Clone succeeded, but checkout failed.                                                                                                                                                 
You can inspect what was checked out with 'git status'                                                                                                                                         
and retry the checkout with 'git checkout -f HEAD'

This is on a Linux system with an EXT4 filesystem.

ghost commented 5 years ago

Thanks for letting me know. Maybe a partial checkout could do the job. Various files have been added to the filesystem to stress DUAs capabilities and verify it gets unicode filenames right. It turns out that this largely depends even on the used terminal, and indeed some filenames won't be displayed correctly or their size is computed incorrectly.

However, the clone works fine for me on APFS, and I wonder what I should do except for remove the file in question.

SolitudeSF commented 5 years ago

this also makes tarballs unusable since tar cant extract them

tar: dua-cli-2.1.2/tests/fixtures/right-to-left/ثم نفس سقطت وبالتحديد،, جزيرتي باستخدام أن دنو. إذ هنا؟ الستار وتنصيب كان. أهّل ايطاليا، بريطانيا-فرنسا قد أخذ. سليمان، إتفاقية بين ما, يذكر الحدود أي بعد, معاملة بولندا، الإطلاق عل إيو.: Cannot open: File name too long
ghost commented 5 years ago

@SolitudeSF @oconnor663 I just made the filename shorter. A translation revealed that it's half a paragraph of some historical text, which probably is beyond the purpose of why I added the file in the first place.

Can you see if it now works for you?

SolitudeSF commented 5 years ago

it works

mexus commented 5 years ago

Hi @Byron-TW and thanks for the crate! I'm maintaining a pkgbuild for Archlinux User Repository and would like to migrate from using crates.io's source to github releases, but unfortunately it is impossible because of that long names issue :(

ghost commented 5 years ago

Hi @denis, does it still not work for you? @Solitude reported it worked for them after the file was 'shortened'.

On Sun, Jun 16, 2019 at 5:42 PM Denis notifications@github.com wrote:

Hi @Byron-TW https://github.com/Byron-TW and thanks for the crate! I'm maintaining a pkgbuild https://aur.archlinux.org/packages/dua-cli for Archlinux User Repository and would like to migrate from using crates.io's source to github releases, but unfortunately it is impossible because of that long names issue :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Byron/dua-cli/issues/10?email_source=notifications&email_token=ADTXPGW2TVBJIKLYEJHZW33P2YDJHA5CNFSM4HYPDFRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXZJIYI#issuecomment-502436961, or mute the thread https://github.com/notifications/unsubscribe-auth/ADTXPGXOGYZ7MOMY4CSIMYLP2YDJHANCNFSM4HYPDFRA .

-- Sebastian Thiel 李乐乐 Rust and TWU Advocate Email sthiel@thoughtworks.com Telephone +49 (0) 40 300 95 880 <+49+(0)+40+300+95+880> [image: ThoughtWorks] http://www.thoughtworks.com/?utm_campaign=sebastian-thiel-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator

ThoughtWorks Deutschland GmbH Großer Burstah 46-48D-20457 Hamburg Sitz der Gesellschaft: Hamburg Geschäftsführer: Dr. Peter Buhrmann - AG Hamburg - HRB 115336

mexus commented 5 years ago

Yes it works, but I need a new "release" to put it into a pkgbuild :)

ghost commented 5 years ago

@mexus v2.1.3 was just published to crates and to this repository. This should conclude the entire issue. Thanks for bringing it to arch-linux!

mexus commented 5 years ago

Great, thanks! I confirm that everything works as expected with the newest github release

oconnor663 commented 5 years ago

Yep, works for me. I'd suggest that if you want to test some really weird filenames, you might want to create those files inside of the test itself, rather than checking them into the repo. That also makes it less likely that some quirky git normalization behavior could influence your test in a weird way.