@@ -17,7 +17,7 @@ public void CannotAddStashAgainstBareRepository()
17
17
{
18
18
var stasher = DummySignature ;
19
19
20
- Assert . Throws < BareRepositoryException > ( ( ) => repo . Stashes . Add ( stasher , "My very first stash" ) ) ;
20
+ Assert . Throws < BareRepositoryException > ( ( ) => repo . Stashes . Add ( stasher , "My very first stash" , StashModifiers . Default ) ) ;
21
21
}
22
22
}
23
23
@@ -31,7 +31,7 @@ public void CanAddAndRemoveStash()
31
31
32
32
Assert . True ( repo . Index . RetrieveStatus ( ) . IsDirty ) ;
33
33
34
- Stash stash = repo . Stashes . Add ( stasher , "My very first stash" , StashOptions . IncludeUntracked ) ;
34
+ Stash stash = repo . Stashes . Add ( stasher , "My very first stash" , StashModifiers . IncludeUntracked ) ;
35
35
36
36
// Check that untracked files are deleted from working directory
37
37
Assert . False ( File . Exists ( Path . Combine ( repo . Info . WorkingDirectory , "new_untracked_file.txt" ) ) ) ;
@@ -48,7 +48,7 @@ public void CanAddAndRemoveStash()
48
48
// Create extra file
49
49
Touch ( repo . Info . WorkingDirectory , "stash_candidate.txt" , "Oh, I'm going to be stashed!\n " ) ;
50
50
51
- Stash secondStash = repo . Stashes . Add ( stasher , "My second stash" , StashOptions . IncludeUntracked ) ;
51
+ Stash secondStash = repo . Stashes . Add ( stasher , "My second stash" , StashModifiers . IncludeUntracked ) ;
52
52
53
53
Assert . NotNull ( stash ) ;
54
54
Assert . Equal ( "stash@{0}" , stash . CanonicalName ) ;
@@ -83,7 +83,7 @@ public void AddingAStashWithNoMessageGeneratesADefaultOne()
83
83
{
84
84
var stasher = DummySignature ;
85
85
86
- Stash stash = repo . Stashes . Add ( stasher ) ;
86
+ Stash stash = repo . Stashes . Add ( stasher , options : StashModifiers . Default ) ;
87
87
88
88
Assert . NotNull ( stash ) ;
89
89
Assert . Equal ( "stash@{0}" , stash . CanonicalName ) ;
@@ -100,7 +100,7 @@ public void AddStashWithBadParamsShouldThrows()
100
100
string path = CloneStandardTestRepo ( ) ;
101
101
using ( var repo = new Repository ( path ) )
102
102
{
103
- Assert . Throws < ArgumentNullException > ( ( ) => repo . Stashes . Add ( null ) ) ;
103
+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Stashes . Add ( default ( Signature ) , options : StashModifiers . Default ) ) ;
104
104
}
105
105
}
106
106
@@ -112,12 +112,12 @@ public void StashingAgainstCleanWorkDirShouldReturnANullStash()
112
112
{
113
113
var stasher = DummySignature ;
114
114
115
- Stash stash = repo . Stashes . Add ( stasher , "My very first stash" , StashOptions . IncludeUntracked ) ;
115
+ Stash stash = repo . Stashes . Add ( stasher , "My very first stash" , StashModifiers . IncludeUntracked ) ;
116
116
117
117
Assert . NotNull ( stash ) ;
118
118
119
119
//Stash against clean working directory
120
- Assert . Null ( repo . Stashes . Add ( stasher ) ) ;
120
+ Assert . Null ( repo . Stashes . Add ( stasher , options : StashModifiers . Default ) ) ;
121
121
}
122
122
}
123
123
@@ -136,7 +136,7 @@ public void CanStashWithoutOptions()
136
136
Touch ( repo . Info . WorkingDirectory , staged , "I'm staged\n " ) ;
137
137
repo . Index . Stage ( staged ) ;
138
138
139
- Stash stash = repo . Stashes . Add ( stasher , "Stash with default options" ) ;
139
+ Stash stash = repo . Stashes . Add ( stasher , "Stash with default options" , StashModifiers . Default ) ;
140
140
141
141
Assert . NotNull ( stash ) ;
142
142
@@ -160,7 +160,7 @@ public void CanStashAndKeepIndex()
160
160
Touch ( repo . Info . WorkingDirectory , filename , "I'm staged\n " ) ;
161
161
repo . Index . Stage ( filename ) ;
162
162
163
- Stash stash = repo . Stashes . Add ( stasher , "This stash wil keep index" , StashOptions . KeepIndex ) ;
163
+ Stash stash = repo . Stashes . Add ( stasher , "This stash wil keep index" , StashModifiers . KeepIndex ) ;
164
164
165
165
Assert . NotNull ( stash ) ;
166
166
Assert . Equal ( FileStatus . Added , repo . Index . RetrieveStatus ( filename ) ) ;
@@ -185,7 +185,7 @@ public void CanStashIgnoredFiles()
185
185
Assert . True ( repo . Ignore . IsPathIgnored ( ignoredFilename ) ) ;
186
186
187
187
var stasher = DummySignature ;
188
- repo . Stashes . Add ( stasher , "This stash includes ignore files" , StashOptions . IncludeIgnored ) ;
188
+ repo . Stashes . Add ( stasher , "This stash includes ignore files" , StashModifiers . IncludeIgnored ) ;
189
189
190
190
//TODO : below assertion doesn't pass. Bug?
191
191
//Assert.False(File.Exists(ignoredFilePath));
@@ -219,20 +219,20 @@ public void CanGetStashByIndexer()
219
219
const string thirdStashMessage = "My third stash" ;
220
220
221
221
// Create first stash
222
- Stash firstStash = repo . Stashes . Add ( stasher , firstStashMessage , StashOptions . IncludeUntracked ) ;
222
+ Stash firstStash = repo . Stashes . Add ( stasher , firstStashMessage , StashModifiers . IncludeUntracked ) ;
223
223
Assert . NotNull ( firstStash ) ;
224
224
225
225
// Create second stash
226
226
Touch ( repo . Info . WorkingDirectory , "stash_candidate.txt" , "Oh, I'm going to be stashed!\n " ) ;
227
227
228
- Stash secondStash = repo . Stashes . Add ( stasher , secondStashMessage , StashOptions . IncludeUntracked ) ;
228
+ Stash secondStash = repo . Stashes . Add ( stasher , secondStashMessage , StashModifiers . IncludeUntracked ) ;
229
229
Assert . NotNull ( secondStash ) ;
230
230
231
231
// Create third stash
232
232
Touch ( repo . Info . WorkingDirectory , "stash_candidate_again.txt" , "Oh, I'm going to be stashed!\n " ) ;
233
233
234
234
235
- Stash thirdStash = repo . Stashes . Add ( stasher , thirdStashMessage , StashOptions . IncludeUntracked ) ;
235
+ Stash thirdStash = repo . Stashes . Add ( stasher , thirdStashMessage , StashModifiers . IncludeUntracked ) ;
236
236
Assert . NotNull ( thirdStash ) ;
237
237
238
238
// Get by indexer
0 commit comments