private boolean isValidRef(GitReference ref) {
        return ref != null && ref.object() != null
                && !TextUtils.isEmpty(ref.object().sha());
    }
Create task to refresh repo's tree

@param repository
@param reference
app/src/main/java/com/github/pockethub/android/core/code/RefreshTreeTask.java