badoo / codeisok

Git code browsing and code review tool
GNU General Public License v3.0
85 stars 16 forks source link

don't return list with empty record from diff-tree API #47

Closed DenKoren closed 5 years ago

DenKoren commented 5 years ago

When you provide two branches and they have no diff, API method returns 'diff' array with a single element within, which has all fields empty or null.

'diff': [ 'file': null, 'old_mode': "", 'new_mode': null, 'status': null, 'old_blob': null, 'new_blob': null, ]

It is better to return just empty array to iterate through array naturally on the client side without negative side-effects.