fix bugs. origname combine error when merge another repo. do not save idx if idx is empty