Closed
Description
The code throws and ProcessException when trying to execute functions (getContent, isBinary) on a file diff if the diff does not contain an index. This can happen when only the mode changes.
Full error:
Error while running git command:
'git' '--git-dir' '<LOCAL_DIR>' 'cat-file' '-p' ""
fatal: Not a valid object name
Diff file:
diff --git a/a.out b/a.out
old mode 100755
new mode 100644
Parsed diff file object:
[Gitonomy\Git\Diff\File](<LOCAL_DIR>/vendor/gitonomy/gitlib/src/Gitonomy/Git/Diff/File.php#L20) {#5962 ▼
#oldName: "a.out"
#newName: "a.out"
#oldMode: "100755"
#newMode: "100644"
#oldIndex: ""
#newIndex: ""
#isBinary: false
#changes: []
#repository: [Gitonomy\Git\Repository](<LOCAL_DIR>/vendor/gitonomy/gitlib/src/Gitonomy/Git/Repository.php#L29) {#690}
}
Metadata
Metadata
Assignees
Labels
No labels