File tree Expand file tree Collapse file tree
generate/templates/manual/revwalk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ class FileHistoryEvent {
4444 Nan::Set (historyEntry, Nan::New (" status" ).ToLocalChecked (), Nan::New<Number>(type));
4545 Nan::Set (historyEntry, Nan::New (" isMergeCommit" ).ToLocalChecked (), Nan::New (isMergeCommit));
4646 if (type == GIT_DELTA_RENAMED) {
47- if (existsInCurrentTree ) {
47+ if (from != NULL ) {
4848 Nan::Set (historyEntry, Nan::New (" oldName" ).ToLocalChecked (), Nan::New (from).ToLocalChecked ());
49- } else {
49+ }
50+ if (to != NULL ) {
5051 Nan::Set (historyEntry, Nan::New (" newName" ).ToLocalChecked (), Nan::New (to).ToLocalChecked ());
5152 }
5253 }
@@ -100,7 +101,7 @@ class FileHistoryEvent {
100101 false ,
101102 currentCommit,
102103 delta->old_file .path ,
103- NULL
104+ delta-> new_file . path
104105 );
105106 git_diff_free (diff);
106107 git_tree_entry_free (currentEntry);
@@ -139,7 +140,7 @@ class FileHistoryEvent {
139140 false ,
140141 false ,
141142 currentCommit,
142- NULL ,
143+ delta-> old_file . path ,
143144 delta->new_file .path
144145 );
145146 git_diff_free (diff);
You can’t perform that action at this time.
0 commit comments