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

Renamed files with git diff --name-status #991

Closed
adamsol opened this issue Apr 14, 2024 · 1 comment · Fixed by #1023
Closed

Renamed files with git diff --name-status #991

adamsol opened this issue Apr 14, 2024 · 1 comment · Fixed by #1023

Comments

@adamsol
Copy link

adamsol commented Apr 14, 2024

With this call:

simpleGit().diffSummary([hash1, hash2, '--name-status']);

I'm getting only the new file path for renamed files. Is there a way to get also the previous path?

With --stat or --numstat, I can get file renames in a format like this: src/{foo.txt => bar.txt}, but it's not easy to parse, and I'd like to have file statuses as well.

@steveukx
Copy link
Owner

Thank you for the issue report - in the next version you will be able to check the from property of the file in the DiffResult.files array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants