def index_entry_from_stat(stat_val, hex_sha, flags, mode=None):
 if (mode is None):
  mode = cleanup_mode(stat_val.st_mode)
 return (stat_val.st_ctime, stat_val.st_mtime, stat_val.st_dev, stat_val.st_ino, mode, stat_val.st_uid, stat_val.st_gid, stat_val.st_size, hex_sha, flags)

def index_entry_from_stat ( stat_val , hex_sha , flags , mode = None ) : if ( mode is None ) : mode = cleanup_mode ( stat_val . st_mode ) return ( stat_val . st_ctime , stat_val . st_mtime , stat_val . st_dev , stat_val . st_ino , mode , stat_val . st_uid , stat_val . st_gid , stat_val . st_size , hex_sha , flags )
create a new index entry from a stat value .