#NEWLINE# def cat_file( blob , pathname = None ) : #NEWLINE# #INDENT# "\n    If `pathname` is `None`, return an open file handle to the blob in\n    Git's object store, otherwise stream the blob to `pathname`, all via\n    the git-cat-file(1) command.\n    " #NEWLINE# args = ( git_args ( ) + [ 'cat-file' , 'blob' , blob ] ) #NEWLINE# if ( pathname is None ) : #NEWLINE# #INDENT# return subprocess . Popen ( args , close_fds = True , preexec_fn = unroot , stdout = subprocess . PIPE ) . stdout #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# subprocess . Popen ( args , close_fds = True , preexec_fn = unroot , stdout = open ( pathname , 'w' ) ) . communicate ( )