@@ -1550,18 +1550,16 @@ Repository.prototype.stageLines =
1550
1550
} ;
1551
1551
1552
1552
/**
1553
- * Discard line selection of a specified file
1553
+ * Discard line selection of a specified file.
1554
+ * Assumes selected lines are unstaged.
1554
1555
*
1555
1556
* @async
1556
1557
* @param {String } filePath The relative path of this file in the repo
1557
1558
* @param {Array } selectedLines The array of DiffLine objects
1558
1559
* selected for discarding
1559
- * @param {Boolean } isStaged Are the selected lines currently staged
1560
1560
* @return {Number } 0 or an error code
1561
1561
*/
1562
- Repository . prototype . discardLines =
1563
- function ( filePath , selectedLines , isSelectionStaged ) {
1564
-
1562
+ Repository . prototype . discardLines = function ( filePath , selectedLines ) {
1565
1563
var repo = this ;
1566
1564
var fullFilePath = path . join ( repo . workdir ( ) , filePath ) ;
1567
1565
var index ;
@@ -1576,11 +1574,11 @@ Repository.prototype.discardLines =
1576
1574
. then ( function ( content ) {
1577
1575
originalContent = content ;
1578
1576
1579
- return getPathHunks ( repo , index , filePath , isSelectionStaged ) ;
1577
+ return getPathHunks ( repo , index , filePath , false ) ;
1580
1578
} )
1581
1579
. then ( function ( hunks ) {
1582
1580
return applySelectedLinesToTarget (
1583
- originalContent , selectedLines , hunks , isSelectionStaged , true
1581
+ originalContent , selectedLines , hunks , false , true
1584
1582
) ;
1585
1583
} )
1586
1584
. then ( function ( newContent ) {
0 commit comments