File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -335,15 +335,14 @@ define(['d3'], function () {
335
335
while ( modifier ) {
336
336
var nextToken = modifier [ 0 ]
337
337
modifier = modifier . substr ( 1 )
338
+ var amountMatch = modifier . match ( / ^ ( \d + ) ( .* ) $ / ) ,
339
+ amount = 1 ;
338
340
339
- if ( nextToken === '^' ) {
340
- var amountMatch = modifier . match ( / ^ ( \d + ) ( .* ) $ / ) ,
341
- amount = 1 ;
342
-
343
- if ( amountMatch ) {
344
- var amount = ~ ~ amountMatch [ 1 ]
345
- }
341
+ if ( amountMatch ) {
342
+ var amount = ~ ~ amountMatch [ 1 ]
343
+ }
346
344
345
+ if ( nextToken === '^' ) {
347
346
if ( amount === 0 ) {
348
347
/* do nothing, refers to this commit */
349
348
} else if ( amount === 1 ) {
@@ -353,6 +352,12 @@ define(['d3'], function () {
353
352
} else {
354
353
matchedCommit = null
355
354
}
355
+ } else if ( nextToken === '~' ) {
356
+ for ( var i = 0 ; i < amount ; i ++ ) {
357
+ if ( matchedCommit && matchedCommit . parent ) {
358
+ matchedCommit = this . getCommit ( matchedCommit . parent )
359
+ }
360
+ }
356
361
}
357
362
}
358
363
}
You can’t perform that action at this time.
0 commit comments