AlDanial / cloc

cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.
GNU General Public License v2.0
19.78k stars 1.02k forks source link

Error in git bash terminal(tar failed) #740

Closed simahao closed 1 year ago

simahao commented 1 year ago

Describe the bug Run cloc in git bash terminal, command like cloc --git --diff commit1 commit2 -v It looks like path with ":" lead tar command to failed. But I run same command in cmd terminal, it is ok.

error message: git ls-tree --name-only -r HEAD git ls-tree --name-only -r be6dd18 git archive -o C:\Users\xxx\AppData\Local\Temp\0pFsfzhh4N.tar be6dd18 "a.txt" git archive -o C:\Users\xxx\AppData\Local\Temp\KmV7o4ieoF.tar HEAD "b.txt" "d.txt" "test/c.txt" mkdir C:\Users\xxx\AppData\Local\Temp\0Kwe_O7SYd cd C:\Users\xxx\AppData\Local\Temp\0Kwe_O7SYd tar -xf "C:\Users\xxx\AppData\Local\Temp\0pFsfzhh4N.tar" tar: Cannot connect to C: resolve failed ...... Using temp file list [C:\Users\xxx\AppData\Local\Temp\ysQUS7WOX4] 0 text files. Using temp file list [C:\Users\xxx\AppData\Local\Temp\G27eOEuorp] 0 text files. 0 files ignored. Nothing to count.

cloc; OS; OS version

To Reproduce

Expected result

Additional context

AlDanial commented 1 year ago

I have no difficulty running cloc in a git bash terminal. Can you point me to a public repo I can clone to reproduce? Tell me the exact commit entries also.

AlDanial commented 1 year ago

Reopen if you have details on reproducing the problem