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

not discarding "a/" and "b/" prefixes in paths when parsing git patches with no diff #43

Open
necipfazil opened this issue Mar 29, 2021 · 0 comments

Comments

@necipfazil
Copy link

Given a git diff as follows (which only contains header but no diff since it is just renaming):

diff --git a/myfile2.txt b/myfile3.txt                                     
similarity index 100%                                                      
rename from myfile2.txt                                                    
rename to myfile3.txt

a/ and b/ prefixes are kept in old_path and new_path:

diff(
  header=header(index_path=None, old_path='a/myfile2.txt', old_version=None, new_path='b/myfile3.txt', new_version=None),
  changes=None,
  text='diff --git a/myfile2.txt b/myfile3.txt\nsimilarity index 100%\nrename from myfile2.txt\nrename to myfile3.txt\n'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant