def write_pack(filename, objects, deltify=None, delta_window_size=None):
 with GitFile((filename + '.pack'), 'wb') as f:
  (entries, data_sum) = write_pack_objects(f, objects, delta_window_size=delta_window_size, deltify=deltify)
 entries = [(k, v[0], v[1]) for (k, v) in entries.items()]
 entries.sort()
 with GitFile((filename + '.idx'), 'wb') as f:
  return (data_sum, write_pack_index_v2(f, entries, data_sum))

def write_pack ( filename , objects , deltify = None , delta_window_size = None ) : with GitFile ( ( filename + '.pack' ) , 'wb' ) as f : ( entries , data_sum ) = write_pack_objects ( f , objects , delta_window_size = delta_window_size , deltify = deltify ) entries = [ ( k , v [ 0 ] , v [ 1 ] ) for ( k , v ) in entries . items ( ) ] entries . sort ( ) with GitFile ( ( filename + '.idx' ) , 'wb' ) as f : return ( data_sum , write_pack_index_v2 ( f , entries , data_sum ) )
write a new pack data file .