Skip to content

Non-ASCII paths report as 'opaque'/'unanalyzed' due to git's escaped path output, not missing or unreadable data #84

Description

@arishajohri

What happened:
A mined commit touches six files inside a non-ASCII (Chinese-named) folder. The analysis scripts determine which files a commit touched by reading git's per-file plan/diff output and splitting each line on a tab character, then checking whether the resulting path string ends in .csv.

Git does not print non-ASCII bytes in a path as-is by default (core.quotePath=true): it wraps the path in double quotes and backslash-escapes every non-ASCII byte. So the string the scripts actually parse is a quoted, escaped stand-in for the real path, not the real path.

Reproduced locally, no network fetch involved: built a repository with the same real folder name and a genuine column-rename commit, then ran it through the tool's own code.

  • Requesting the file from git using the garbled/escaped path fails outright — git reports the path does not exist.
  • Requesting the exact same file using its real, correct UTF-8 name succeeds and returns the actual contents.
  • Run through the tool, this mismatch caused one script to report the file as "not analyzed, wrong format" and the other to report the commit had nothing to compare — both because the .csv-suffix check is applied to the garbled string, which ends in a stray quote mark instead of .csv.

Why none of the existing dispositions fit:

  • Absent — false. The file was uploaded; it was read successfully once queried by its real name.
  • Inaccessible — false. The repository isn't gone or locked; it answers normally to a correctly-formed request.
  • Opaque — false. It's an ordinary spreadsheet the tool proved it can read, given the correct path.

All three would be false statements about the dataset. The part that is not working is in path handling, not in the data.

Consequence if this isn't distinguished:
Without a separate label, this case gets folded into "opaque," and a later reader concludes the dataset simply isn't usable — when the data was fine and only the tool's path handling broke

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions