@@ -60,15 +60,13 @@ public ICommit FindMergeBase(ICommit commit, ICommit otherCommit)
60
60
return new Commit ( mergeBase ) ;
61
61
} ) . ExecuteAsync ( ) . Result ;
62
62
}
63
-
64
63
public int GetNumberOfUncommittedChanges ( )
65
64
{
66
65
return new OperationWithExponentialBackoff < LibGit2Sharp . LockedFileException , int > ( new ThreadSleep ( ) , log , ( ) =>
67
66
{
68
67
return GetNumberOfUncommittedChangesInternal ( ) ;
69
68
} ) . ExecuteAsync ( ) . Result ;
70
69
}
71
-
72
70
private int GetNumberOfUncommittedChangesInternal ( )
73
71
{
74
72
// check if we have a branch tip at all to behave properly with empty repos
@@ -87,26 +85,24 @@ private int GetNumberOfUncommittedChangesInternal()
87
85
catch ( Exception )
88
86
{
89
87
return int . MaxValue ; // this should be somewhat puzzling to see,
90
- // so we may have reached our goal to show that
91
- // that repo is really "Dirty"...
88
+ // so we may have reached our goal to show that
89
+ // that repo is really "Dirty"...
92
90
}
93
91
}
94
92
95
93
// gets all changes of the last commit vs Staging area and WT
96
94
var changes = repositoryInstance . Diff . Compare < TreeChanges > ( repositoryInstance . Head . Tip . Tree ,
97
- DiffTargets . Index | DiffTargets . WorkingDirectory ) ;
95
+ DiffTargets . Index | DiffTargets . WorkingDirectory ) ;
98
96
99
97
return changes . Count ;
100
98
}
101
-
102
99
public void CreateBranchForPullRequestBranch ( AuthenticationInfo auth )
103
100
{
104
101
new OperationWithExponentialBackoff < LockedFileException > ( new ThreadSleep ( ) , log , ( ) =>
105
102
{
106
103
CreateBranchForPullRequestBranchInternal ( auth ) ;
107
104
} ) . ExecuteAsync ( ) . Wait ( ) ;
108
105
}
109
-
110
106
private void CreateBranchForPullRequestBranchInternal ( AuthenticationInfo auth )
111
107
{
112
108
var network = repositoryInstance . Network ;
@@ -164,7 +160,6 @@ private void CreateBranchForPullRequestBranchInternal(AuthenticationInfo auth)
164
160
throw new WarningException ( message ) ;
165
161
}
166
162
}
167
-
168
163
public void Clone ( string sourceUrl , string workdirPath , AuthenticationInfo auth )
169
164
{
170
165
try
@@ -198,7 +193,6 @@ public void Checkout(string commitOrBranchSpec)
198
193
{
199
194
new OperationWithExponentialBackoff < LockedFileException > ( new ThreadSleep ( ) , log , ( ) => Commands . Checkout ( repositoryInstance , commitOrBranchSpec ) ) . ExecuteAsync ( ) . Wait ( ) ;
200
195
}
201
-
202
196
public void Fetch ( string remote , IEnumerable < string > refSpecs , AuthenticationInfo auth , string logMessage )
203
197
{
204
198
new OperationWithExponentialBackoff < LockedFileException > ( new ThreadSleep ( ) , log , ( ) => Commands . Fetch ( ( Repository ) repositoryInstance , remote , refSpecs , GetFetchOptions ( auth ) , logMessage ) ) . ExecuteAsync ( ) . Wait ( ) ;
0 commit comments