File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1212#include "parse-options.h"
1313#include "dir.h"
1414#include "progress.h"
15+ #include "streaming.h"
1516
1617#define REACHABLE 0x0001
1718#define SEEN 0x0002
@@ -238,13 +239,8 @@ static void check_unreachable_object(struct object *obj)
238239 if (!(f = fopen (filename , "w" )))
239240 die_errno ("Could not open '%s'" , filename );
240241 if (obj -> type == OBJ_BLOB ) {
241- enum object_type type ;
242- unsigned long size ;
243- char * buf = read_sha1_file (obj -> sha1 ,
244- & type , & size );
245- if (buf && fwrite (buf , 1 , size , f ) != size )
242+ if (stream_blob_to_fd (fileno (f ), obj -> sha1 , NULL , 1 ))
246243 die_errno ("Could not write '%s'" , filename );
247- free (buf );
248244 } else
249245 fprintf (f , "%s\n" , sha1_to_hex (obj -> sha1 ));
250246 if (fclose (f ))
You can’t perform that action at this time.
0 commit comments