stage: remove also ignored local files

Ignored files posses the property that they do not exist in remotes but do exist in local
repositories.

Before this patch, local ignored files were displayed in the Stage.
This commit is contained in:
Jakub Filak 2018-12-19 17:31:51 +00:00 committed by Lars Hvam
parent 6385caade6
commit 11a175d467

View File

@ -52,7 +52,8 @@ CLASS ZCL_ABAPGIT_STAGE_LOGIC IMPLEMENTATION.
DATA: lv_index TYPE i.
FIELD-SYMBOLS: <ls_remote> LIKE LINE OF cs_files-remote.
FIELD-SYMBOLS: <ls_remote> LIKE LINE OF cs_files-remote,
<ls_local> LIKE LINE OF cs_files-local.
LOOP AT cs_files-remote ASSIGNING <ls_remote>.
@ -70,6 +71,17 @@ CLASS ZCL_ABAPGIT_STAGE_LOGIC IMPLEMENTATION.
ENDLOOP.
LOOP AT cs_files-local ASSIGNING <ls_local>.
lv_index = sy-tabix.
IF io_repo->get_dot_abapgit( )->is_ignored(
iv_path = <ls_local>-file-path
iv_filename = <ls_local>-file-filename ) = abap_true.
DELETE cs_files-local INDEX lv_index.
ENDIF.
ENDLOOP.
ENDMETHOD.