File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
git-ref/tests/fixtures/generated-archives Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,12 @@ by humans.
168
168
Utilities to aid in keeping the project fresh and in sync can be found in the ` Maintenance ` section of the ` makefile ` . Run ` make ` to
169
169
get an overview.
170
170
171
+ ## Reviewing PRs
172
+
173
+ - be sure to clone locally and run tests with ` GITOXIDE_TEST_IGNORE_ARCHIVES=1 ` to assure new fixture scripts (if there are any) are validated
174
+ on _ MacOS_ and _ Windows_ . Note that linux doesn't need to be tested that way as CI on linux ignores them by merit of not checking them out
175
+ via ` git-lfs ` .
176
+
171
177
## Creating a release
172
178
173
179
Run ` make publish-all ` to publish all crates in leaf-first order using ` cargo release ` based on the currently set version.
Original file line number Diff line number Diff line change 1
1
version https://git-lfs.github.com/spec/v1
2
- oid sha256:e7fe369e2c7a87e2688c6d0bf3bcdbe3e31754266f39f53a390f85551ba8258e
2
+ oid sha256:75458d7d4cc29c1cab7a97e47578339dff84baf164fc3a9bcddc6f844482bab2
3
3
size 10848
Original file line number Diff line number Diff line change @@ -237,9 +237,22 @@ fn extract_archive(
237
237
destination_dir : & Path ,
238
238
required_script_identity : u32 ,
239
239
) -> std:: io:: Result < ( u32 , Option < String > ) > {
240
- let mut archive_buf = Vec :: < u8 > :: new ( ) ;
241
- let mut decoder = xz2:: bufread:: XzDecoder :: new ( std:: io:: BufReader :: new ( std:: fs:: File :: open ( archive) ?) ) ;
242
- std:: io:: copy ( & mut decoder, & mut archive_buf) ?;
240
+ let archive_buf: Vec < u8 > = {
241
+ let mut buf = Vec :: new ( ) ;
242
+ let input_archive = std:: fs:: File :: open ( archive) ?;
243
+ if std:: env:: var_os ( "GITOXIDE_TEST_IGNORE_ARCHIVES" ) . is_some ( ) {
244
+ return Err ( std:: io:: Error :: new (
245
+ std:: io:: ErrorKind :: Other ,
246
+ format ! (
247
+ "Ignoring archive at '{}' as GITOXIDE_TEST_IGNORE_ARCHIVES is set." ,
248
+ archive. display( )
249
+ ) ,
250
+ ) ) ;
251
+ }
252
+ let mut decoder = xz2:: bufread:: XzDecoder :: new ( std:: io:: BufReader :: new ( input_archive) ) ;
253
+ std:: io:: copy ( & mut decoder, & mut buf) ?;
254
+ buf
255
+ } ;
243
256
244
257
let mut entry_buf = Vec :: < u8 > :: new ( ) ;
245
258
let ( archive_identity, platform) : ( u32 , _ ) = tar:: Archive :: new ( std:: io:: Cursor :: new ( & mut & * archive_buf) )
You can’t perform that action at this time.
0 commit comments