@@ -63,12 +63,12 @@ public void RequestingAnEntryWithBadParamsThrows()
63
63
}
64
64
65
65
[ Theory ]
66
- [ InlineData ( "1/branch_file.txt" , "100755" , GitObjectType . Blob , "45b983be36b73c0788dc9cbcb76cbb80fc7bb057" ) ]
67
- [ InlineData ( "README" , "100644" , GitObjectType . Blob , "a8233120f6ad708f843d861ce2b7228ec4e3dec6" ) ]
68
- [ InlineData ( "branch_file.txt" , "100644" , GitObjectType . Blob , "45b983be36b73c0788dc9cbcb76cbb80fc7bb057" ) ]
69
- [ InlineData ( "new.txt" , "100644" , GitObjectType . Blob , "a71586c1dfe8a71c6cbf6c129f404c5642ff31bd" ) ]
70
- [ InlineData ( "1" , "040000" , GitObjectType . Tree , "7f76480d939dc401415927ea7ef25c676b8ddb8f" ) ]
71
- public void CanRetrieveEntries ( string path , string expectedAttributes , GitObjectType expectedType , string expectedSha )
66
+ [ InlineData ( "1/branch_file.txt" , "100755" , TreeEntryTargetType . Blob , "45b983be36b73c0788dc9cbcb76cbb80fc7bb057" ) ]
67
+ [ InlineData ( "README" , "100644" , TreeEntryTargetType . Blob , "a8233120f6ad708f843d861ce2b7228ec4e3dec6" ) ]
68
+ [ InlineData ( "branch_file.txt" , "100644" , TreeEntryTargetType . Blob , "45b983be36b73c0788dc9cbcb76cbb80fc7bb057" ) ]
69
+ [ InlineData ( "new.txt" , "100644" , TreeEntryTargetType . Blob , "a71586c1dfe8a71c6cbf6c129f404c5642ff31bd" ) ]
70
+ [ InlineData ( "1" , "040000" , TreeEntryTargetType . Tree , "7f76480d939dc401415927ea7ef25c676b8ddb8f" ) ]
71
+ public void CanRetrieveEntries ( string path , string expectedAttributes , TreeEntryTargetType expectedType , string expectedSha )
72
72
{
73
73
using ( var repo = new Repository ( BareTestRepoPath ) )
74
74
{
@@ -77,7 +77,7 @@ public void CanRetrieveEntries(string path, string expectedAttributes, GitObject
77
77
TreeEntryDefinition ted = td [ path ] ;
78
78
79
79
Assert . Equal ( ToMode ( expectedAttributes ) , ted . Mode ) ;
80
- Assert . Equal ( expectedType , ted . Type ) ;
80
+ Assert . Equal ( expectedType , ted . TargetType ) ;
81
81
Assert . Equal ( new ObjectId ( expectedSha ) , ted . TargetId ) ;
82
82
}
83
83
}
@@ -179,7 +179,7 @@ public void CanAddAnExistingSubmodule()
179
179
Assert . NotNull ( fetched ) ;
180
180
181
181
Assert . Equal ( submodule . HeadCommitId , fetched . TargetId ) ;
182
- Assert . Equal ( GitObjectType . Commit , fetched . Type ) ;
182
+ Assert . Equal ( TreeEntryTargetType . GitLink , fetched . TargetType ) ;
183
183
Assert . Equal ( Mode . GitLink , fetched . Mode ) ;
184
184
}
185
185
}
@@ -218,7 +218,7 @@ public void CanReplaceAnExistingTreeWithABlob()
218
218
using ( var repo = new Repository ( BareTestRepoPath ) )
219
219
{
220
220
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
221
- Assert . Equal ( GitObjectType . Tree , td [ targetPath ] . Type ) ;
221
+ Assert . Equal ( TreeEntryTargetType . Tree , td [ targetPath ] . TargetType ) ;
222
222
223
223
var objectId = new ObjectId ( blobSha ) ;
224
224
var blob = repo . Lookup < Blob > ( objectId ) ;
@@ -230,7 +230,7 @@ public void CanReplaceAnExistingTreeWithABlob()
230
230
TreeEntryDefinition fetched = td [ targetPath ] ;
231
231
Assert . NotNull ( fetched ) ;
232
232
233
- Assert . Equal ( GitObjectType . Blob , td [ targetPath ] . Type ) ;
233
+ Assert . Equal ( TreeEntryTargetType . Blob , td [ targetPath ] . TargetType ) ;
234
234
Assert . Equal ( objectId , fetched . TargetId ) ;
235
235
Assert . Equal ( Mode . NonExecutableFile , fetched . Mode ) ;
236
236
@@ -249,7 +249,7 @@ public void CanReplaceAnExistingBlobWithATree(string targetPath)
249
249
{
250
250
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
251
251
Assert . NotNull ( td [ targetPath ] ) ;
252
- Assert . Equal ( GitObjectType . Blob , td [ targetPath ] . Type ) ;
252
+ Assert . Equal ( TreeEntryTargetType . Blob , td [ targetPath ] . TargetType ) ;
253
253
254
254
var objectId = new ObjectId ( treeSha ) ;
255
255
var tree = repo . Lookup < Tree > ( objectId ) ;
@@ -259,7 +259,7 @@ public void CanReplaceAnExistingBlobWithATree(string targetPath)
259
259
TreeEntryDefinition fetched = td [ targetPath ] ;
260
260
Assert . NotNull ( fetched ) ;
261
261
262
- Assert . Equal ( GitObjectType . Tree , td [ targetPath ] . Type ) ;
262
+ Assert . Equal ( TreeEntryTargetType . Tree , td [ targetPath ] . TargetType ) ;
263
263
Assert . Equal ( objectId , fetched . TargetId ) ;
264
264
Assert . Equal ( Mode . Directory , fetched . Mode ) ;
265
265
}
@@ -274,7 +274,7 @@ public void CanReplaceAnExistingTreeWithAGitLink()
274
274
using ( var repo = new Repository ( SubmoduleTestRepoWorkingDirPath ) )
275
275
{
276
276
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
277
- Assert . Equal ( GitObjectType . Tree , td [ targetPath ] . Type ) ;
277
+ Assert . Equal ( TreeEntryTargetType . Tree , td [ targetPath ] . TargetType ) ;
278
278
279
279
Assert . NotNull ( td [ "just_a_dir/contents" ] ) ;
280
280
@@ -284,7 +284,7 @@ public void CanReplaceAnExistingTreeWithAGitLink()
284
284
Assert . NotNull ( fetched ) ;
285
285
286
286
Assert . Equal ( commitId , fetched . TargetId ) ;
287
- Assert . Equal ( GitObjectType . Commit , fetched . Type ) ;
287
+ Assert . Equal ( TreeEntryTargetType . GitLink , fetched . TargetType ) ;
288
288
Assert . Equal ( Mode . GitLink , fetched . Mode ) ;
289
289
290
290
Assert . Null ( td [ "just_a_dir/contents" ] ) ;
@@ -301,7 +301,7 @@ public void CanReplaceAnExistingGitLinkWithATree()
301
301
{
302
302
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
303
303
Assert . NotNull ( td [ targetPath ] ) ;
304
- Assert . Equal ( GitObjectType . Commit , td [ targetPath ] . Type ) ;
304
+ Assert . Equal ( TreeEntryTargetType . GitLink , td [ targetPath ] . TargetType ) ;
305
305
Assert . Equal ( Mode . GitLink , td [ targetPath ] . Mode ) ;
306
306
307
307
var objectId = new ObjectId ( treeSha ) ;
@@ -313,7 +313,7 @@ public void CanReplaceAnExistingGitLinkWithATree()
313
313
Assert . NotNull ( fetched ) ;
314
314
315
315
Assert . Equal ( objectId , fetched . TargetId ) ;
316
- Assert . Equal ( GitObjectType . Tree , fetched . Type ) ;
316
+ Assert . Equal ( TreeEntryTargetType . Tree , fetched . TargetType ) ;
317
317
Assert . Equal ( Mode . Directory , fetched . Mode ) ;
318
318
}
319
319
}
@@ -328,14 +328,14 @@ public void CanReplaceAnExistingBlobWithAGitLink()
328
328
{
329
329
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
330
330
Assert . NotNull ( td [ targetPath ] ) ;
331
- Assert . Equal ( GitObjectType . Blob , td [ targetPath ] . Type ) ;
331
+ Assert . Equal ( TreeEntryTargetType . Blob , td [ targetPath ] . TargetType ) ;
332
332
333
333
td . AddGitLink ( targetPath , commitId ) ;
334
334
335
335
TreeEntryDefinition fetched = td [ targetPath ] ;
336
336
Assert . NotNull ( fetched ) ;
337
337
338
- Assert . Equal ( GitObjectType . Commit , td [ targetPath ] . Type ) ;
338
+ Assert . Equal ( TreeEntryTargetType . GitLink , td [ targetPath ] . TargetType ) ;
339
339
Assert . Equal ( commitId , fetched . TargetId ) ;
340
340
Assert . Equal ( Mode . GitLink , fetched . Mode ) ;
341
341
}
@@ -351,7 +351,7 @@ public void CanReplaceAnExistingGitLinkWithABlob()
351
351
{
352
352
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
353
353
Assert . NotNull ( td [ targetPath ] ) ;
354
- Assert . Equal ( GitObjectType . Commit , td [ targetPath ] . Type ) ;
354
+ Assert . Equal ( TreeEntryTargetType . GitLink , td [ targetPath ] . TargetType ) ;
355
355
Assert . Equal ( Mode . GitLink , td [ targetPath ] . Mode ) ;
356
356
357
357
var objectId = new ObjectId ( blobSha ) ;
@@ -363,7 +363,7 @@ public void CanReplaceAnExistingGitLinkWithABlob()
363
363
Assert . NotNull ( fetched ) ;
364
364
365
365
Assert . Equal ( objectId , fetched . TargetId ) ;
366
- Assert . Equal ( GitObjectType . Blob , fetched . Type ) ;
366
+ Assert . Equal ( TreeEntryTargetType . Blob , fetched . TargetType ) ;
367
367
Assert . Equal ( Mode . NonExecutableFile , fetched . Mode ) ;
368
368
}
369
369
}
@@ -374,7 +374,7 @@ public void CanNotReplaceAnExistingTreeWithATreeBeingAssembled()
374
374
using ( var repo = new Repository ( BareTestRepoPath ) )
375
375
{
376
376
TreeDefinition td = TreeDefinition . From ( repo . Head . Tip . Tree ) ;
377
- Assert . Equal ( GitObjectType . Tree , td [ "1" ] . Type ) ;
377
+ Assert . Equal ( TreeEntryTargetType . Tree , td [ "1" ] . TargetType ) ;
378
378
379
379
td . Add ( "new/one" , repo . Lookup < Blob > ( "a823312" ) , Mode . NonExecutableFile )
380
380
. Add ( "new/two" , repo . Lookup < Blob > ( "a71586c" ) , Mode . NonExecutableFile )
0 commit comments