@@ -185,7 +185,6 @@ public override IRepository InitVBAProject(string directory)
185
185
var status = repo . RetrieveStatus ( new StatusOptions { DetectRenamesInWorkDir = true } ) ;
186
186
foreach ( var stat in status . Untracked )
187
187
{
188
- // repo.Stage(stat.FilePath); //deprecated from LibGit2Sharp v0.24
189
188
LibGit2Sharp . Commands . Stage ( repo , stat . FilePath ) ;
190
189
}
191
190
@@ -247,13 +246,7 @@ public override void Fetch([Optional] string remoteName)
247
246
248
247
if ( remote != null )
249
248
{
250
- //_repo.Network.Fetch(remote); // deprecated on LibGit2Sharp from v0.24.0
251
- /*
252
- * The new functionality requires a refSpec.
253
- * As I suppose we're just tracking by default the whole remote,
254
- * then I choose to hardcode the refSpec here:
255
- */
256
- // NOTE: hardcoded string
249
+ // FIXME: hardcoded string
257
250
IEnumerable < string > refSpec = new List < string > ( ) { "+refs/heads/*:refs/remotes/origin/*" } ;
258
251
LibGit2Sharp . Commands . Fetch ( _repo , remoteName , refSpec , null , "" ) ;
259
252
}
@@ -279,7 +272,6 @@ public override void Pull()
279
272
} ;
280
273
281
274
var signature = GetSignature ( ) ;
282
- //_repo.Network.Pull(signature, options); // deprecated on LibGit2Sharp from v0.24.0
283
275
LibGit2Sharp . Commands . Pull ( _repo , signature , options ) ;
284
276
285
277
base . Pull ( ) ;
@@ -311,7 +303,6 @@ public override void Stage(string filePath)
311
303
{
312
304
try
313
305
{
314
- // _repo.Stage(filePath); // deprecated on LibGit2Sharp from v0.24.0
315
306
LibGit2Sharp . Commands . Stage ( _repo , filePath ) ;
316
307
}
317
308
catch ( LibGit2SharpException ex )
@@ -324,7 +315,6 @@ public override void Stage(IEnumerable<string> filePaths)
324
315
{
325
316
try
326
317
{
327
- //_repo.Stage(filePaths); // deprecated on LibGit2Sharp from v0.24.0
328
318
LibGit2Sharp . Commands . Stage ( _repo , filePaths ) ;
329
319
}
330
320
catch ( LibGit2SharpException ex )
@@ -360,7 +350,6 @@ public override void Checkout(string branch)
360
350
{
361
351
try
362
352
{
363
- //_repo.Checkout(_repo.Branches[branch]); // deprecated on LibGit2Sharp from v0.24.0
364
353
LibGit2Sharp . Commands . Checkout ( _repo , branch ) ;
365
354
base . Checkout ( branch ) ;
366
355
@@ -377,7 +366,6 @@ public override void CreateBranch(string branch)
377
366
try
378
367
{
379
368
_repo . CreateBranch ( branch ) ;
380
- //_repo.Checkout(branch); // deprecated on LibGit2Sharp from v0.24.0
381
369
LibGit2Sharp . Commands . Checkout ( _repo , branch ) ;
382
370
383
371
RequeryUnsyncedCommits ( ) ;
@@ -393,7 +381,6 @@ public override void CreateBranch(string sourceBranch, string branch)
393
381
try
394
382
{
395
383
_repo . CreateBranch ( branch , _repo . Branches [ sourceBranch ] . Commits . Last ( ) ) ;
396
- //_repo.Checkout(branch); // deprecated on LibGit2Sharp from v0.24.0
397
384
LibGit2Sharp . Commands . Checkout ( _repo , branch ) ;
398
385
399
386
RequeryUnsyncedCommits ( ) ;
@@ -432,7 +419,6 @@ public override void Unpublish(string branch)
432
419
{
433
420
try
434
421
{
435
- //var remote = _repo.Branches[branch].Remote; // deprecated on LibGit2Sharp from v0.24.0
436
422
var remote = _repo . Network . Remotes [ branch ] ;
437
423
438
424
_repo . Branches . Update ( _repo . Branches [ branch ] , b => b . Remote = remote . Name ,
@@ -498,7 +484,6 @@ public override void RemoveFile(string filePath, bool removeFromWorkingDirectory
498
484
try
499
485
{
500
486
NotifyExternalFileChanges = false ;
501
- //_repo.Remove(filePath, removeFromWorkingDirectory); // deprecated on LibGit2Sharp from v0.24.0
502
487
LibGit2Sharp . Commands . Remove ( _repo , filePath , removeFromWorkingDirectory ) ;
503
488
NotifyExternalFileChanges = true ;
504
489
}
@@ -572,7 +557,6 @@ public override void DeleteBranch(string branchName)
572
557
} ;
573
558
}
574
559
575
- //_repo.Network.Push(branch.Remote, ":" + _repo.Branches[branchName].UpstreamBranchCanonicalName, options); // deprecated on LibGit2Sharp from v0.24.0
576
560
_repo . Network . Push ( _repo . Network . Remotes [ branchName ] , ":" + _repo . Branches [ branchName ] . UpstreamBranchCanonicalName , options ) ;
577
561
}
578
562
0 commit comments