You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file is added, I think that a_path should be None and b_path should be equal to the name of the added file. This is the case when we create a diff setting create_patch=True. However, since by default this is False, diff returns a_path and b_path equals to the name of the added file. If you want to test it:
@vidartf Thanks for letting me know! Maybe you can find the time to provide a PR adjusting the docs so that it becomes what you would have wanted to see. Generally, the diff implementation is confusing to many, and I am not quite sure if it's the API itself, the docs, or an incorrect implementation
When a file is added, I think that
a_path
should be None andb_path
should be equal to the name of the added file. This is the case when we create a diff settingcreate_patch=True
. However, since by default this isFalse
, diff returnsa_path
andb_path
equals to the name of the added file. If you want to test it:this will return the following output:
how is it possible that, if the file is added,
a_path
is not None?PS: this works also if the previous commit is not
NULL_TREE
, already tried.The text was updated successfully, but these errors were encountered: