This repository was archived by the owner on Jul 13, 2024. It is now read-only.
File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 673
673
this . template . commit . color ||
674
674
this . template . colors [ columnIndex ] ;
675
675
options . parent = this . parent ;
676
- options . parentCommit = options . parentCommit || _getParentCommitFromBranch ( this ) ;
676
+
677
+ // Set parentCommit
678
+ // If there is commit in this branch, set parentCommit to last commit of this branch
679
+ // otherwise, set parentCommit to this.parentCommit, the start point of this branch
680
+ if ( ! options . parentCommit ) {
681
+ if ( _getLast ( this . commits ) ) {
682
+ options . parentCommit = _getLast ( this . commits ) ;
683
+ } else {
684
+ options . parentCommit = this . parentCommit ;
685
+ }
686
+ }
677
687
678
688
// Special compact mode
679
689
if ( this . parent . mode === "compact" &&
729
739
options . y = this . offsetY - this . parent . commitOffsetY ;
730
740
}
731
741
732
- // Fork case: Parent commit from parent branch
733
- if ( options . parentCommit instanceof Commit === false && this . parentBranch instanceof Branch ) {
734
- options . parentCommit = this . parentCommit ;
735
- }
736
-
737
742
// First commit
738
743
var isFirstBranch = ! ( options . parentCommit instanceof Commit ) ;
739
744
var isPathBeginning = this . path . length === 0 ;
You can’t perform that action at this time.
0 commit comments