Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support analysis of tracked files #1033

Closed
spenserblack opened this issue May 1, 2023 · 4 comments
Closed

Support analysis of tracked files #1033

spenserblack opened this issue May 1, 2023 · 4 comments
Labels

Comments

@spenserblack
Copy link
Collaborator

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.

@spenserblack
Copy link
Collaborator Author

cc @dsully

@spenserblack
Copy link
Collaborator Author

spenserblack commented May 1, 2023

IMO onefetch should do one or the other -- analyze filesystem or git rev. Supporting both would be too complex IMO. So, besides thinking of how this could be done, I think we should ask if this should be done. This would be a significant change and most likely mark a v3 release.

@dsully
Copy link

dsully commented May 1, 2023

Thanks, I got busy over the weekend.

Agreed on not changing the contents of the repository.

FWIW, my expectation was for onefetch to analyze the tracked files at HEAD.

@o2sh
Copy link
Owner

o2sh commented Jul 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@o2sh o2sh added the stale label Jul 2, 2023
@o2sh o2sh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2023
@spenserblack spenserblack mentioned this issue Sep 2, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants