Keep only relative paths in snapshots to avoid huge git diff while working with other people
See original GitHub issueWe noticed that we’ve got a lot of noise in our .betterer.results
file due to the fact that it has absolute paths:
Is there a way to make those paths relative to the repo only?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Commits are snapshots, not diffs
I'll be using the git/git repository checked out at v2.29.2 as an ... a diff is relative to the number of paths with...
Read more >(git) diff output relative path?
git diff prints paths (of changed files) from the root of the repo - no matter where you are when executing the command....
Read more >Navigating the filesystem with relative paths at ...
Learn the difference between absolute and relative paths and how to use them, and save yourself a lot of time and potential trouble....
Read more >Basics — Introduction to version control with Git documentation
Git is a version control system: can record/save snapshots and track the content ... we remove the repository and history (but keep the...
Read more >Version Control (Git)
Version control systems (VCSs) are tools used to track changes to source code (or other collections of files and folders). As the name...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm, so the interesting thing is that this should work: https://github.com/phenomnomnominal/betterer/blob/master/packages/typescript/src/typescript.ts#L65
^^ this attempts to replace the
cwd
in all error paths.Ugh, it seems to only replace the first instance 😂
Ahhh, it’s inside a generic and TypeScript is importing it and using the full path in the error message… okay, hmm I’ll have to think about this one.