question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keep only relative paths in snapshots to avoid huge git diff while working with other people

See original GitHub issue

We noticed that we’ve got a lot of noise in our .betterer.results file due to the fact that it has absolute paths:

image

Is there a way to make those paths relative to the repo only?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
phenomnomnominalcommented, Aug 19, 2020

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 😂

1reaction
phenomnomnominalcommented, Aug 17, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found