@@ -10,54 +10,56 @@ namespace LibGit2Sharp.Tests
10
10
{
11
11
public class FileHistoryFixture : BaseFixture
12
12
{
13
- [ Theory ]
14
- [ InlineData ( "https://github.com/nulltoken/follow-test.git" ) ]
15
- public void CanDealWithFollowTest ( string url )
16
- {
17
- var scd = BuildSelfCleaningDirectory ( ) ;
18
- var clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath ) ;
19
-
20
- using ( var repo = new Repository ( clonedRepoPath ) )
21
- {
22
- // $ git log --follow --format=oneline so-renamed.txt
23
- // 88f91835062161febb46fb270ef4188f54c09767 Update not-yet-renamed.txt AND rename into so-renamed.txt
24
- // ef7cb6a63e32595fffb092cb1ae9a32310e58850 Add not-yet-renamed.txt
25
- var fileHistoryEntries = repo . Commits . QueryBy ( "so-renamed.txt" ) . ToList ( ) ;
26
- Assert . Equal ( 2 , fileHistoryEntries . Count ( ) ) ;
27
- Assert . Equal ( "88f91835062161febb46fb270ef4188f54c09767" , fileHistoryEntries [ 0 ] . Commit . Sha ) ;
28
- Assert . Equal ( "ef7cb6a63e32595fffb092cb1ae9a32310e58850" , fileHistoryEntries [ 1 ] . Commit . Sha ) ;
29
-
30
- // $ git log --follow --format=oneline untouched.txt
31
- // c10c1d5f74b76f20386d18674bf63fbee6995061 Initial commit
32
- fileHistoryEntries = repo . Commits . QueryBy ( "untouched.txt" ) . ToList ( ) ;
33
- Assert . Single ( fileHistoryEntries ) ;
34
- Assert . Equal ( "c10c1d5f74b76f20386d18674bf63fbee6995061" , fileHistoryEntries [ 0 ] . Commit . Sha ) ;
35
-
36
- // $ git log --follow --format=oneline under-test.txt
37
- // 0b5b18f2feb917dee98df1210315b2b2b23c5bec Rename file renamed.txt into under-test.txt
38
- // 49921d463420a892c9547a326632ef6a9ba3b225 Update file renamed.txt
39
- // 70f636e8c64bbc2dfef3735a562bb7e195d8019f Rename file under-test.txt into renamed.txt
40
- // d3868d57a6aaf2ae6ed4887d805ae4bc91d8ce4d Updated file under test
41
- // 9da10ef7e139c49604a12caa866aae141f38b861 Updated file under test
42
- // 599a5d821fb2c0a25855b4233e26d475c2fbeb34 Updated file under test
43
- // 678b086b44753000567aa64344aa0d8034fa0083 Updated file under test
44
- // 8f7d9520f306771340a7c79faea019ad18e4fa1f Updated file under test
45
- // bd5f8ee279924d33be8ccbde82e7f10b9d9ff237 Updated file under test
46
- // c10c1d5f74b76f20386d18674bf63fbee6995061 Initial commit
47
- fileHistoryEntries = repo . Commits . QueryBy ( "under-test.txt" ) . ToList ( ) ;
48
- Assert . Equal ( 10 , fileHistoryEntries . Count ( ) ) ;
49
- Assert . Equal ( "0b5b18f2feb917dee98df1210315b2b2b23c5bec" , fileHistoryEntries [ 0 ] . Commit . Sha ) ;
50
- Assert . Equal ( "49921d463420a892c9547a326632ef6a9ba3b225" , fileHistoryEntries [ 1 ] . Commit . Sha ) ;
51
- Assert . Equal ( "70f636e8c64bbc2dfef3735a562bb7e195d8019f" , fileHistoryEntries [ 2 ] . Commit . Sha ) ;
52
- Assert . Equal ( "d3868d57a6aaf2ae6ed4887d805ae4bc91d8ce4d" , fileHistoryEntries [ 3 ] . Commit . Sha ) ;
53
- Assert . Equal ( "9da10ef7e139c49604a12caa866aae141f38b861" , fileHistoryEntries [ 4 ] . Commit . Sha ) ;
54
- Assert . Equal ( "599a5d821fb2c0a25855b4233e26d475c2fbeb34" , fileHistoryEntries [ 5 ] . Commit . Sha ) ;
55
- Assert . Equal ( "678b086b44753000567aa64344aa0d8034fa0083" , fileHistoryEntries [ 6 ] . Commit . Sha ) ;
56
- Assert . Equal ( "8f7d9520f306771340a7c79faea019ad18e4fa1f" , fileHistoryEntries [ 7 ] . Commit . Sha ) ;
57
- Assert . Equal ( "bd5f8ee279924d33be8ccbde82e7f10b9d9ff237" , fileHistoryEntries [ 8 ] . Commit . Sha ) ;
58
- Assert . Equal ( "c10c1d5f74b76f20386d18674bf63fbee6995061" , fileHistoryEntries [ 9 ] . Commit . Sha ) ;
59
- }
60
- }
13
+ //Looks like nulltoken deleted the repo this test was using
14
+
15
+ //[Theory]
16
+ //[InlineData("https://github.com/nulltoken/follow-test.git")]
17
+ //public void CanDealWithFollowTest(string url)
18
+ //{
19
+ // var scd = BuildSelfCleaningDirectory();
20
+ // var clonedRepoPath = Repository.Clone(url, scd.DirectoryPath);
21
+
22
+ // using (var repo = new Repository(clonedRepoPath))
23
+ // {
24
+ // // $ git log --follow --format=oneline so-renamed.txt
25
+ // // 88f91835062161febb46fb270ef4188f54c09767 Update not-yet-renamed.txt AND rename into so-renamed.txt
26
+ // // ef7cb6a63e32595fffb092cb1ae9a32310e58850 Add not-yet-renamed.txt
27
+ // var fileHistoryEntries = repo.Commits.QueryBy("so-renamed.txt").ToList();
28
+ // Assert.Equal(2, fileHistoryEntries.Count());
29
+ // Assert.Equal("88f91835062161febb46fb270ef4188f54c09767", fileHistoryEntries[0].Commit.Sha);
30
+ // Assert.Equal("ef7cb6a63e32595fffb092cb1ae9a32310e58850", fileHistoryEntries[1].Commit.Sha);
31
+
32
+ // // $ git log --follow --format=oneline untouched.txt
33
+ // // c10c1d5f74b76f20386d18674bf63fbee6995061 Initial commit
34
+ // fileHistoryEntries = repo.Commits.QueryBy("untouched.txt").ToList();
35
+ // Assert.Single(fileHistoryEntries);
36
+ // Assert.Equal("c10c1d5f74b76f20386d18674bf63fbee6995061", fileHistoryEntries[0].Commit.Sha);
37
+
38
+ // // $ git log --follow --format=oneline under-test.txt
39
+ // // 0b5b18f2feb917dee98df1210315b2b2b23c5bec Rename file renamed.txt into under-test.txt
40
+ // // 49921d463420a892c9547a326632ef6a9ba3b225 Update file renamed.txt
41
+ // // 70f636e8c64bbc2dfef3735a562bb7e195d8019f Rename file under-test.txt into renamed.txt
42
+ // // d3868d57a6aaf2ae6ed4887d805ae4bc91d8ce4d Updated file under test
43
+ // // 9da10ef7e139c49604a12caa866aae141f38b861 Updated file under test
44
+ // // 599a5d821fb2c0a25855b4233e26d475c2fbeb34 Updated file under test
45
+ // // 678b086b44753000567aa64344aa0d8034fa0083 Updated file under test
46
+ // // 8f7d9520f306771340a7c79faea019ad18e4fa1f Updated file under test
47
+ // // bd5f8ee279924d33be8ccbde82e7f10b9d9ff237 Updated file under test
48
+ // // c10c1d5f74b76f20386d18674bf63fbee6995061 Initial commit
49
+ // fileHistoryEntries = repo.Commits.QueryBy("under-test.txt").ToList();
50
+ // Assert.Equal(10, fileHistoryEntries.Count());
51
+ // Assert.Equal("0b5b18f2feb917dee98df1210315b2b2b23c5bec", fileHistoryEntries[0].Commit.Sha);
52
+ // Assert.Equal("49921d463420a892c9547a326632ef6a9ba3b225", fileHistoryEntries[1].Commit.Sha);
53
+ // Assert.Equal("70f636e8c64bbc2dfef3735a562bb7e195d8019f", fileHistoryEntries[2].Commit.Sha);
54
+ // Assert.Equal("d3868d57a6aaf2ae6ed4887d805ae4bc91d8ce4d", fileHistoryEntries[3].Commit.Sha);
55
+ // Assert.Equal("9da10ef7e139c49604a12caa866aae141f38b861", fileHistoryEntries[4].Commit.Sha);
56
+ // Assert.Equal("599a5d821fb2c0a25855b4233e26d475c2fbeb34", fileHistoryEntries[5].Commit.Sha);
57
+ // Assert.Equal("678b086b44753000567aa64344aa0d8034fa0083", fileHistoryEntries[6].Commit.Sha);
58
+ // Assert.Equal("8f7d9520f306771340a7c79faea019ad18e4fa1f", fileHistoryEntries[7].Commit.Sha);
59
+ // Assert.Equal("bd5f8ee279924d33be8ccbde82e7f10b9d9ff237", fileHistoryEntries[8].Commit.Sha);
60
+ // Assert.Equal("c10c1d5f74b76f20386d18674bf63fbee6995061", fileHistoryEntries[9].Commit.Sha);
61
+ // }
62
+ //}
61
63
62
64
[ Theory ]
63
65
[ InlineData ( null ) ]
0 commit comments