@@ -194,11 +194,11 @@ define(['d3'], function () {
194
194
} ) ;
195
195
} ;
196
196
197
- fixIdPosition = function ( selection , view ) {
197
+ fixIdPosition = function ( selection , view , delta ) {
198
198
selection . attr ( 'x' , function ( d ) {
199
199
return d . cx ;
200
200
} ) . attr ( 'y' , function ( d ) {
201
- return d . cy + view . commitRadius + 14 ;
201
+ return d . cy + view . commitRadius + delta ;
202
202
} ) ;
203
203
} ;
204
204
@@ -215,7 +215,7 @@ define(['d3'], function () {
215
215
if ( commitCY < ( view . baseLine ) ) {
216
216
return commitCY - 45 - ( tagIndex * 25 ) ;
217
217
} else {
218
- return commitCY + 40 + ( tagIndex * 25 ) ;
218
+ return commitCY + 50 + ( tagIndex * 25 ) ;
219
219
}
220
220
} ;
221
221
@@ -578,21 +578,26 @@ define(['d3'], function () {
578
578
} ,
579
579
580
580
_renderIdLabels : function ( ) {
581
+ this . _renderText ( 'id-label' , function ( d ) { return d . id + '..' ; } , 14 ) ;
582
+ this . _renderText ( 'message-label' , function ( d ) { return d . message ; } , 24 ) ;
583
+ } ,
584
+
585
+ _renderText : function ( className , getText , delta ) {
581
586
var view = this ,
582
- existingLabels ,
583
- newLabels ;
587
+ existingTexts ,
588
+ newtexts ;
584
589
585
- existingLabels = this . commitBox . selectAll ( 'text.id-label' )
590
+ existingTexts = this . commitBox . selectAll ( 'text.' + className )
586
591
. data ( this . commitData , function ( d ) { return d . id ; } )
587
- . text ( function ( d ) { return d . id + '..' ; } ) ;
592
+ . text ( getText ) ;
588
593
589
- existingLabels . transition ( ) . call ( fixIdPosition , view ) ;
594
+ existingTexts . transition ( ) . call ( fixIdPosition , view , delta ) ;
590
595
591
- newLabels = existingLabels . enter ( )
596
+ newtexts = existingTexts . enter ( )
592
597
. insert ( 'svg:text' , ':first-child' )
593
- . classed ( 'id-label' , true )
594
- . text ( function ( d ) { return d . id + '..' ; } )
595
- . call ( fixIdPosition , view ) ;
598
+ . classed ( className , true )
599
+ . text ( getText )
600
+ . call ( fixIdPosition , view , delta ) ;
596
601
} ,
597
602
598
603
_parseTagData : function ( ) {
@@ -802,12 +807,13 @@ define(['d3'], function () {
802
807
return inTree ;
803
808
} ,
804
809
805
- commit : function ( commit ) {
810
+ commit : function ( commit , message ) {
806
811
commit = commit || { } ;
807
812
808
813
! commit . id && ( commit . id = HistoryView . generateId ( ) ) ;
809
814
! commit . tags && ( commit . tags = [ ] ) ;
810
815
816
+ commit . message = message ;
811
817
if ( ! commit . parent ) {
812
818
if ( ! this . currentBranch ) {
813
819
throw new Error ( 'Not a good idea to make commits while in a detached HEAD state.' ) ;
@@ -980,6 +986,7 @@ define(['d3'], function () {
980
986
currentCommit = this . getCommit ( 'HEAD' ) ,
981
987
isCommonAncestor ,
982
988
rebaseTreeLoc ,
989
+ rebaseMessage ,
983
990
toRebase = [ ] , rebasedCommit ,
984
991
remainingHusk ;
985
992
@@ -1000,7 +1007,7 @@ define(['d3'], function () {
1000
1007
return 'Fast-Forward' ;
1001
1008
}
1002
1009
1003
- rebaseTreeLoc = rebaseTarget . id
1010
+ rebaseTreeLoc = rebaseTarget . id ;
1004
1011
1005
1012
while ( ! isCommonAncestor ) {
1006
1013
toRebase . unshift ( currentCommit ) ;
@@ -1010,10 +1017,12 @@ define(['d3'], function () {
1010
1017
1011
1018
for ( var i = 0 ; i < toRebase . length ; i ++ ) {
1012
1019
rebasedCommit = toRebase [ i ] ;
1020
+ rebaseMessage = rebasedCommit . message ;
1013
1021
1014
1022
remainingHusk = {
1015
1023
id : rebasedCommit . id ,
1016
1024
parent : rebasedCommit . parent ,
1025
+ message : rebasedCommit . message ,
1017
1026
tags : [ ]
1018
1027
} ;
1019
1028
@@ -1029,6 +1038,7 @@ define(['d3'], function () {
1029
1038
rebasedCommit . parent = rebaseTreeLoc ;
1030
1039
rebaseTreeLoc = HistoryView . generateId ( )
1031
1040
rebasedCommit . id = rebaseTreeLoc ;
1041
+ rebasedCommit . message = rebaseMessage ;
1032
1042
rebasedCommit . tags . length = 0 ;
1033
1043
rebasedCommit . rebased = true ;
1034
1044
}
0 commit comments