Skip to content

Support analysis of tracked files #1033

Closed as not planned
Closed as not planned
@spenserblack

Description

@spenserblack

Summary 💡

Converting this comment chain into an issue for discussion/triage: #26 (comment)

Onefetch currently analyzes the filesystem via tokei. However, it seems like some users expect behavior more like github-linguist, which analyzes the language stats of tracked changes (AFAIK it analyzes a rev, defaulting to HEAD).

Utilizing git ls-files can be a partial solution, but it will be buggy:

  • Deleted files where the deletion isn't tracked would still show up in git ls-files.
  • We'd analyze tracked files, but not the tracked contents of those files, which can be confusing.

We could potentially hack it by stashing changes and restoring them after analysis. But I'm hesitant to have onefetch change the contents of a repository, even temporarily.

Motivation 🔦

There was some initial confusion brought up in #26 (comment), where a large number of untracked files significantly changed the results compared to what the user was expecting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions