bugfix: offline repo pull /data/

This commit is contained in:
larshp 2025-04-18 07:34:59 +00:00
parent 96a010614b
commit e38309f82f

View File

@ -133,7 +133,7 @@ ENDCLASS.
CLASS zcl_abapgit_repo IMPLEMENTATION. CLASS ZCL_ABAPGIT_REPO IMPLEMENTATION.
METHOD zif_abapgit_repo~bind_listener. METHOD zif_abapgit_repo~bind_listener.
@ -312,9 +312,7 @@ CLASS zcl_abapgit_repo IMPLEMENTATION.
ENDIF. ENDIF.
CREATE OBJECT ri_config TYPE zcl_abapgit_data_config. CREATE OBJECT ri_config TYPE zcl_abapgit_data_config.
mi_data_config = ri_config.
" Assume remote data has been loaded already
READ TABLE mt_remote ASSIGNING <ls_remote> READ TABLE mt_remote ASSIGNING <ls_remote>
WITH KEY file_path WITH KEY file_path
COMPONENTS path = zif_abapgit_data_config=>c_default_path. COMPONENTS path = zif_abapgit_data_config=>c_default_path.
@ -322,6 +320,12 @@ CLASS zcl_abapgit_repo IMPLEMENTATION.
ri_config->from_json( mt_remote ). ri_config->from_json( mt_remote ).
ENDIF. ENDIF.
* offline repos does not have the remote files before the zip is choosen
* so make sure the json is read after zip file is loaded
IF lines( mt_remote ) > 0.
mi_data_config = ri_config.
ENDIF.
ENDMETHOD. ENDMETHOD.