-
Notifications
You must be signed in to change notification settings - Fork 411
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
🚀 Transform file paths to be relative to current directory #552
Comments
Ah, of course, git has an option for this: I need to start adding |
|
It looks like git's pager process runs with cwd set to the repo root, but that the path that git was invoked from, relative to repo root, is available in the env var |
Git's `--relative` excludes changes outside the current directory. Delta solves this. References - 250f6c9, 96ab172 - dandavison/delta#552 (comment) - https://stackoverflow.com/questions/23000086/git-diff-output-relative-path/47460545#comment110436866_47460545
Git outputs file paths in various contexts (e.g. hunk headers,
--stat
output) but if you are not in the root directory of your repository these paths will not be valid as relative paths from your location. This can be annoying, for example the following workflows fail:vim
,open
,bat
,code
,emacsclient
, etcSince every line of git output is passing through delta, delta could relativize these paths thus making those workflows succeed.
The text was updated successfully, but these errors were encountered: