hallewhittaker / git2csv

Config files for my GitHub profile.
https://github.com/hallewhittaker
1 stars 1 forks source link

Handling whitespaces in filenames #5

Open Manouchehri opened 3 years ago

Manouchehri commented 3 years ago

I think there might be an issue when handling whitespaces in folder names?

fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/General'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Architecture/Refactoring'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'
fatal: bad revision 'cpp/ql/src/Best'

Steps to reproduce:

git clone https://github.com/github/codeql.git
git clone https://github.com/hallewhittaker/git2csv.git
cd git2csv
./git2csv.py ../codeql ../codeql.json
Manouchehri commented 3 years ago
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/RuleOfTwo.ql
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/SloppyGlobal.qhelp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/SloppyGlobal.ql
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/SwitchLongCase.cpp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/SwitchLongCase.qhelp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/SwitchLongCase.ql
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/Unused Entities/UnusedIncludes.ql
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.cpp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.qhelp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
DEBUG:We're currently analyzing the file: cpp/ql/src/Best Practices/Unused Entities/UnusedStaticFunctions.cpp
fatal: bad revision 'cpp/ql/src/Best'
DEBUG:Current length of dictionary: 182914
Manouchehri commented 3 years ago

I think we need to find a Python function that encodes the path with escape characters. Maybe os.fsencode?