@@ -50,51 +50,6 @@ private void AssertLocalClone(string path)
50
50
}
51
51
}
52
52
53
- [ Fact ]
54
- public void CanLocallyCloneAndCommitAndPush ( )
55
- {
56
- var scd = BuildSelfCleaningDirectory ( ) ;
57
- using ( var originalRepo = new Repository ( CloneBareTestRepo ( ) ) )
58
- using ( Repository clonedRepo = Repository . Clone ( originalRepo . Info . Path , scd . RootedDirectoryPath ) )
59
- {
60
- Remote remote = clonedRepo . Network . Remotes [ "origin" ] ;
61
-
62
- // Compare before
63
- Assert . Equal ( originalRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ,
64
- clonedRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ) ;
65
- Assert . Equal ( clonedRepo . Network . ListReferences ( remote ) . Single ( r => r . CanonicalName == "refs/heads/master" ) ,
66
- clonedRepo . Refs . Head . ResolveToDirectReference ( ) ) ;
67
-
68
- // Change local state (commit)
69
- const string relativeFilepath = "new_file.txt" ;
70
- string filePath = Path . Combine ( clonedRepo . Info . WorkingDirectory , relativeFilepath ) ;
71
- File . WriteAllText ( filePath , "__content__" ) ;
72
- clonedRepo . Index . Stage ( relativeFilepath ) ;
73
- clonedRepo . Commit ( "__commit_message__" , DummySignature , DummySignature ) ;
74
-
75
- // Assert local state has changed
76
- Assert . NotEqual ( originalRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ,
77
- clonedRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ) ;
78
- Assert . NotEqual ( clonedRepo . Network . ListReferences ( remote ) . Single ( r => r . CanonicalName == "refs/heads/master" ) ,
79
- clonedRepo . Refs . Head . ResolveToDirectReference ( ) ) ;
80
-
81
- // Push the change upstream (remote state is supposed to change)
82
- clonedRepo . Network . Push ( remote , "HEAD" , @"refs/heads/master" , OnPushStatusError ) ;
83
-
84
- // Assert that both local and remote repos are in sync
85
- Assert . Equal ( originalRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ,
86
- clonedRepo . Refs [ "HEAD" ] . ResolveToDirectReference ( ) . TargetIdentifier ) ;
87
- Assert . Equal ( clonedRepo . Network . ListReferences ( remote ) . Single ( r => r . CanonicalName == "refs/heads/master" ) ,
88
- clonedRepo . Refs . Head . ResolveToDirectReference ( ) ) ;
89
- }
90
- }
91
-
92
- private void OnPushStatusError ( PushStatusError pushStatusErrors )
93
- {
94
- Assert . True ( false , string . Format ( "Failed to update reference '{0}': {1}" ,
95
- pushStatusErrors . Reference , pushStatusErrors . Message ) ) ;
96
- }
97
-
98
53
[ Fact ]
99
54
public void CanCloneALocalRepositoryFromALocalUri ( )
100
55
{
0 commit comments