@@ -194,11 +194,11 @@ define(['d3'], function () {
194194 } ) ;
195195 } ;
196196
197- fixIdPosition = function ( selection , view ) {
197+ fixIdPosition = function ( selection , view , delta ) {
198198 selection . attr ( 'x' , function ( d ) {
199199 return d . cx ;
200200 } ) . attr ( 'y' , function ( d ) {
201- return d . cy + view . commitRadius + 14 ;
201+ return d . cy + view . commitRadius + delta ;
202202 } ) ;
203203 } ;
204204
@@ -215,7 +215,7 @@ define(['d3'], function () {
215215 if ( commitCY < ( view . baseLine ) ) {
216216 return commitCY - 45 - ( tagIndex * 25 ) ;
217217 } else {
218- return commitCY + 40 + ( tagIndex * 25 ) ;
218+ return commitCY + 50 + ( tagIndex * 25 ) ;
219219 }
220220 } ;
221221
@@ -578,21 +578,26 @@ define(['d3'], function () {
578578 } ,
579579
580580 _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 ) {
581586 var view = this ,
582- existingLabels ,
583- newLabels ;
587+ existingTexts ,
588+ newtexts ;
584589
585- existingLabels = this . commitBox . selectAll ( 'text.id-label' )
590+ existingTexts = this . commitBox . selectAll ( 'text.' + className )
586591 . data ( this . commitData , function ( d ) { return d . id ; } )
587- . text ( function ( d ) { return d . id + '..' ; } ) ;
592+ . text ( getText ) ;
588593
589- existingLabels . transition ( ) . call ( fixIdPosition , view ) ;
594+ existingTexts . transition ( ) . call ( fixIdPosition , view , delta ) ;
590595
591- newLabels = existingLabels . enter ( )
596+ newtexts = existingTexts . enter ( )
592597 . 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 ) ;
596601 } ,
597602
598603 _parseTagData : function ( ) {
@@ -802,12 +807,13 @@ define(['d3'], function () {
802807 return inTree ;
803808 } ,
804809
805- commit : function ( commit ) {
810+ commit : function ( commit , message ) {
806811 commit = commit || { } ;
807812
808813 ! commit . id && ( commit . id = HistoryView . generateId ( ) ) ;
809814 ! commit . tags && ( commit . tags = [ ] ) ;
810815
816+ commit . message = message ;
811817 if ( ! commit . parent ) {
812818 if ( ! this . currentBranch ) {
813819 throw new Error ( 'Not a good idea to make commits while in a detached HEAD state.' ) ;
@@ -980,6 +986,7 @@ define(['d3'], function () {
980986 currentCommit = this . getCommit ( 'HEAD' ) ,
981987 isCommonAncestor ,
982988 rebaseTreeLoc ,
989+ rebaseMessage ,
983990 toRebase = [ ] , rebasedCommit ,
984991 remainingHusk ;
985992
@@ -1000,7 +1007,7 @@ define(['d3'], function () {
10001007 return 'Fast-Forward' ;
10011008 }
10021009
1003- rebaseTreeLoc = rebaseTarget . id
1010+ rebaseTreeLoc = rebaseTarget . id ;
10041011
10051012 while ( ! isCommonAncestor ) {
10061013 toRebase . unshift ( currentCommit ) ;
@@ -1010,10 +1017,12 @@ define(['d3'], function () {
10101017
10111018 for ( var i = 0 ; i < toRebase . length ; i ++ ) {
10121019 rebasedCommit = toRebase [ i ] ;
1020+ rebaseMessage = rebasedCommit . message ;
10131021
10141022 remainingHusk = {
10151023 id : rebasedCommit . id ,
10161024 parent : rebasedCommit . parent ,
1025+ message : rebasedCommit . message ,
10171026 tags : [ ]
10181027 } ;
10191028
@@ -1029,6 +1038,7 @@ define(['d3'], function () {
10291038 rebasedCommit . parent = rebaseTreeLoc ;
10301039 rebaseTreeLoc = HistoryView . generateId ( )
10311040 rebasedCommit . id = rebaseTreeLoc ;
1041+ rebasedCommit . message = rebaseMessage ;
10321042 rebasedCommit . tags . length = 0 ;
10331043 rebasedCommit . rebased = true ;
10341044 }
0 commit comments