parameters: (input_lines, mode)
docstring: Create a tree object from the given input.
  
      If mode is '--stdin', it must be a list of filenames.  If mode is
      '--index-info' is must be a list of values suitable for "git update-index
      --index-info", such as "<mode> <SP> <sha1> <TAB> <filename>".  Any other mode
      is invalid.
docstring_summary: Create a tree object from the given input.
docstring_tokens: Create a tree object from the given input .
function: def create_tree(input_lines, mode):
      """Create a tree object from the given input.
  
      If mode is '--stdin', it must be a list of filenames.  If mode is
      '--index-info' is must be a list of values suitable for "git update-index
      --index-info", such as "<mode> <SP> <sha1> <TAB> <filename>".  Any other mode
      is invalid."""
      assert mode in ('--stdin', '--index-info')
      cmd = ['git', 'update-index', '--add', '-z', mode]
      with temporary_index_file():
          p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
          for line in input_lines:
              p.stdin.write(to_bytes('%s\0' % line))
          p.stdin.close()
          if p.wait() != 0:
              die('`%s` failed' % ' '.join(cmd))
          tree_id = run('git', 'write-tree')
          return tree_id
function_tokens: def create_tree ( input_lines , mode ) : assert mode in ( '--stdin' , '--index-info' ) cmd = [ 'git' , 'update-index' , '--add' , '-z' , mode ] with temporary_index_file ( ) : p = subprocess . Popen ( cmd , stdin = subprocess . PIPE ) for line in input_lines : p . stdin . write ( to_bytes ( '%s\0' % line ) ) p . stdin . close ( ) if p . wait ( ) != 0 : die ( '`%s` failed' % ' ' . join ( cmd ) ) tree_id = run ( 'git' , 'write-tree' ) return tree_id