Skip to content

Error in git bash terminal(tar failed) #740

@simahao

Description

@simahao

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

  • cloc version:1.96
  • If running the cloc source, Perl version:
  • OS (eg Linux, Windows, macOS, etc):windows
  • OS version:10

To Reproduce

Expected result

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions