Fixed check if empty repository when setting parents for commit