anchor.diff:          measure TYPE string,
           local   TYPE i,
           remote  TYPE i,
  -      END OF ty_stats.
  +      END OF ty_stats .
  +    TYPES:
  +      BEGIN OF ty_infos,
  +        size TYPE p LENGTH 16 DECIMALS 0,
  +        line TYPE p LENGTH 16 DECIMALS 0,
  +        sloc TYPE p LENGTH 16 DECIMALS 0,
  +      END OF ty_infos .
   
       CONSTANTS:
         BEGIN OF c_id,
  
positive.code:   METHOD format_size.
  
      DATA:
        lv_size TYPE p LENGTH 16 DECIMALS 2,
        lv_unit TYPE string.
  
      IF iv_size > 1024 * 1024 * 1024.
        lv_size = iv_size / 1024 / 1024 / 1024.
        lv_unit = 'GB'.
      ELSEIF iv_size > 1024 * 1024.
        lv_size = iv_size / 1024 / 1024.
        lv_unit = 'MB'.
      ELSEIF iv_size > 1024.
        lv_size = iv_size / 1024.
        lv_unit = 'KB'.
      ELSE.
        lv_size = iv_size.
        lv_unit = 'Bytes'.
      ENDIF.
  
      rv_size = |{ lv_size } { lv_unit }|.
  
    ENDMETHOD.
  
  
negative.code:       ls_stats-remote = 0.
        APPEND ls_stats TO mt_stats.
      ENDIF.
  
    ENDMETHOD.
  
  
    METHOD read_stats_objects.
  
      DATA:
        ls_stats           TYPE ty_stats,
        ls_item            TYPE zif_abapgit_definitions=>ty_item,
        lt_supported_types TYPE zcl_abapgit_objects=>ty_types_tt.
  
      ls_stats-measure = 'Number of Objects'.
  
      DELETE ct_local_items WHERE obj_type IS INITIAL OR obj_name IS INITIAL.
      ls_stats-local = lines( ct_local_items ).
  
      DELETE ct_remote_items WHERE obj_type IS INITIAL OR obj_name IS INITIAL.
      ls_stats-remote = lines( ct_remote_items ).
  
      APPEND ls_stats TO mt_stats.
  
      CLEAR ls_stats.
      ls_stats-measure = 'Number of Unsupported Objects'.
      ls_stats-local   = lines( mo_repo->get_unsupported_objects_local( ) ).
  
      lt_supported_types = zcl_abapgit_objects=>supported_list( ).
  
      LOOP AT ct_remote_items INTO ls_item.
        READ TABLE lt_supported_types WITH KEY table_line = ls_item-obj_type TRANSPORTING NO FIELDS.
        IF sy-subrc <> 0.
          ls_stats-remote = ls_stats-remote + 1.
        ENDIF.
      ENDLOOP.
  
      APPEND ls_stats TO mt_stats.
  
    ENDMETHOD.
  
  
    METHOD read_stats_size_lines_sloc.
  
      DATA:
        ls_stats       TYPE ty_stats,
        lv_ignored     TYPE abap_bool,
        ls_info_file   TYPE ty_infos,
        ls_info_local  TYPE ty_infos,
        ls_info_remote TYPE ty_infos,
        ls_item        TYPE zif_abapgit_definitions=>ty_item.
  
      FIELD-SYMBOLS:
        <ls_local>  LIKE LINE OF it_local,
        <ls_remote> LIKE LINE OF it_remote.
  
      LOOP AT it_local ASSIGNING <ls_local>.
        ls_info_file = read_stats_file( <ls_local>-file ).
  
        ls_info_local-size = ls_info_local-size + ls_info_file-size.
        ls_info_local-line = ls_info_local-line + ls_info_file-line.
        ls_info_local-sloc = ls_info_local-sloc + ls_info_file-sloc.
  
        COLLECT <ls_local>-item INTO et_local_items.
      ENDLOOP.
  
      IF mo_repo->has_remote_source( ) = abap_true.
        LOOP AT it_remote ASSIGNING <ls_remote>.
          ls_info_file = read_stats_file( <ls_remote> ).
  
          ls_info_remote-size = ls_info_remote-size + ls_info_file-size.
          ls_info_remote-line = ls_info_remote-line + ls_info_file-line.
          ls_info_remote-sloc = ls_info_remote-sloc + ls_info_file-sloc.
  
          lv_ignored = mo_repo->get_dot_abapgit( )->is_ignored(
                         iv_filename = <ls_remote>-filename
                         iv_path     = <ls_remote>-path ).
  
          IF <ls_remote>-filename IS NOT INITIAL AND lv_ignored = abap_false.
            TRY.
                zcl_abapgit_file_status=>identify_object(
                  EXPORTING
                    iv_filename = <ls_remote>-filename
                    iv_path     = <ls_remote>-path
                    iv_devclass = mo_repo->get_package( )
                    io_dot      = mo_repo->get_dot_abapgit( )
                  IMPORTING
                    es_item     = ls_item ).
                COLLECT ls_item INTO et_remote_items.
              CATCH zcx_abapgit_exception ##NO_HANDLER.
            ENDTRY.
          ENDIF.
  
        ENDLOOP.
      ENDIF.
  
      ls_stats-measure = 'Size of Files'.
      ls_stats-local   = ls_info_local-size.
      ls_stats-remote  = ls_info_remote-size.
      APPEND ls_stats TO mt_stats.
      ls_stats-measure = 'Lines in ABAP Files'.
      ls_stats-local   = ls_info_local-line.
      ls_stats-remote  = ls_info_remote-line.
      APPEND ls_stats TO mt_stats.
      ls_stats-measure = 'Lines of Code in ABAP Files'.
      ls_stats-local   = ls_info_local-sloc.
      ls_stats-remote  = ls_info_remote-sloc.
      APPEND ls_stats TO mt_stats.
  
    ENDMETHOD.
  
  
    METHOD read_stats_state.
  
      DATA:
        lt_results TYPE zif_abapgit_definitions=>ty_results_tt,
        lv_state   TYPE c LENGTH 1,
        ls_stats   TYPE ty_stats.
  
      FIELD-SYMBOLS:
        <ls_result> LIKE LINE OF lt_results.
  
      lt_results = zcl_abapgit_file_status=>status( mo_repo ).
  
  