@@ -96,7 +96,9 @@ private int PerformRCheckin(TfsChangesetInfo parentChangeset)
9696 string target = strs [ 0 ] ;
9797 string [ ] gitParents = strs . AsEnumerable ( ) . Skip ( 1 ) . Where ( hash => hash != currentParent ) . ToArray ( ) ;
9898
99- string commitMessage = repo . GetCommitMessage ( target , currentParent ) . Trim ( ' ' , '\r ' , '\n ' ) ;
99+ string commitMessage = _checkinOptions . NoGenerateCheckinComment
100+ ? repo . GetCommitMessage ( target )
101+ : repo . GetCommitMessage ( target , currentParent ) ;
100102 var commitSpecificCheckinOptions = _checkinOptionsFactory . BuildCommitSpecificCheckinOptions ( _checkinOptions , commitMessage ) ;
101103
102104 _stdout . WriteLine ( "Starting checkin of {0} '{1}'" , target . Substring ( 0 , 8 ) , commitSpecificCheckinOptions . CheckinComment ) ;
@@ -153,7 +155,9 @@ private int PerformRCheckin(TfsChangesetInfo parentChangeset)
153155 string target = strs [ 0 ] ;
154156 string [ ] gitParents = strs . AsEnumerable ( ) . Skip ( 1 ) . Where ( hash => hash != tfsLatest ) . ToArray ( ) ;
155157
156- string commitMessage = repo . GetCommitMessage ( target , tfsLatest ) . Trim ( ' ' , '\r ' , '\n ' ) ;
158+ string commitMessage = _checkinOptions . NoGenerateCheckinComment
159+ ? repo . GetCommitMessage ( target )
160+ : repo . GetCommitMessage ( target , tfsLatest ) ;
157161 var commitSpecificCheckinOptions = _checkinOptionsFactory . BuildCommitSpecificCheckinOptions ( _checkinOptions , commitMessage ) ;
158162 _stdout . WriteLine ( "Starting checkin of {0} '{1}'" , target . Substring ( 0 , 8 ) , commitSpecificCheckinOptions . CheckinComment ) ;
159163 long newChangesetId = tfsRemote . Checkin ( target , parentChangeset , commitSpecificCheckinOptions ) ;
0 commit comments