-
-
Couldn't load subscription status.
- Fork 328
Open
Description
In a Wiki.js installation using Git for storage via git-js, if a binary is renamed in the underlying repository, the change isn't noticed because DiffSummary isn't populating the files attribute.
For example, when a binary is added:
$ git diff --stat -M HEAD^ HEAD
uploads/image.png | Bin 0 -> 119296 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
the files attribute is populated:
diff: {"files":[{"file":"uploads/image.png","before":0,"after":119296,"binary":true}],"insertions":0,"deletions":0,"changed":1}
But when the binary is renamed:
$ git diff --stat -M HEAD^ HEAD
uploads/{image.png => image-test.png} | Bin
1 file changed, 0 insertions(+), 0 deletions(-)
the files attribute is empty:
diff: {"files":[],"insertions":0,"deletions":0,"changed":1}
Looking at parse-diff-summary.ts, it appears to only handle the first type of change.
Metadata
Metadata
Assignees
Labels
No labels