<commit_before>*&---------------------------------------------------------------------*
*&  Include           ZABAPGIT_REPO_IMPL
*&---------------------------------------------------------------------*

*----------------------------------------------------------------------*
*       CLASS lcl_repo_offline IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_repo_offline IMPLEMENTATION.

  METHOD set_files_remote.

    mt_remote = it_files.

    find_dot_abapgit( ).

  ENDMETHOD.

ENDCLASS.                    "lcl_repo_offline IMPLEMENTATION

*----------------------------------------------------------------------*
*       CLASS lcl_repo_online IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_repo_online IMPLEMENTATION.

  METHOD constructor.

    super->constructor( is_data ).

    mv_initialized = abap_false.

  ENDMETHOD.                    "constructor

  METHOD initialize.
    IF mv_initialized = abap_false.
      refresh( ).
    ENDIF.
  ENDMETHOD.

  METHOD status.

    initialize( ).

    IF lines( mt_status ) = 0.
      mt_status = lcl_file_status=>status( io_repo = me
                                           io_log  = io_log ).
    ENDIF.
    rt_results = mt_status.

  ENDMETHOD.                    "status

  METHOD deserialize.

    IF ms_data-write_protect = abap_true.
      lcx_exception=>raise( 'Cannot deserialize. Local code is write-protected by repo config' ).
    ENDIF.

    initialize( ).

    super->deserialize( ).

    set( iv_sha1 = mv_branch ).

    COMMIT WORK AND WAIT.

  ENDMETHOD.                    "deserialize

  METHOD refresh.

    super->refresh( iv_drop_cache ).
    CLEAR mt_status.
<commit_msg>reset status on deserialize, close #375<commit_after>*&---------------------------------------------------------------------*
*&  Include           ZABAPGIT_REPO_IMPL
*&---------------------------------------------------------------------*

*----------------------------------------------------------------------*
*       CLASS lcl_repo_offline IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_repo_offline IMPLEMENTATION.

  METHOD set_files_remote.

    mt_remote = it_files.

    find_dot_abapgit( ).

  ENDMETHOD.

ENDCLASS.                    "lcl_repo_offline IMPLEMENTATION

*----------------------------------------------------------------------*
*       CLASS lcl_repo_online IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_repo_online IMPLEMENTATION.

  METHOD constructor.

    super->constructor( is_data ).

    mv_initialized = abap_false.

  ENDMETHOD.                    "constructor

  METHOD initialize.
    IF mv_initialized = abap_false.
      refresh( ).
    ENDIF.
  ENDMETHOD.

  METHOD status.

    initialize( ).

    IF lines( mt_status ) = 0.
      mt_status = lcl_file_status=>status( io_repo = me
                                           io_log  = io_log ).
    ENDIF.
    rt_results = mt_status.

  ENDMETHOD.                    "status

  METHOD deserialize.

    IF ms_data-write_protect = abap_true.
      lcx_exception=>raise( 'Cannot deserialize. Local code is write-protected by repo config' ).
    ENDIF.

    initialize( ).

    super->deserialize( ).

    set( iv_sha1 = mv_branch ).

    CLEAR mt_status. " Reset status

    COMMIT WORK AND WAIT.

  ENDMETHOD.                    "deserialize

  METHOD refresh.

    super->refresh( iv_drop_cache ).
    CLEAR mt_status.

{'fraction_non_alphanumeric': 0.32336297493936944, 'fraction_numerical': 0.001886284020479655, 'mean_word_length': 0.9755188930282065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1986599', 'n_tokens_mistral': 962, 'n_tokens_neox': 863, 'n_words': 193}