From 11a175d467ec374bf8b515001845eddc75c3df51 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Wed, 19 Dec 2018 17:31:51 +0000 Subject: [PATCH] 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. --- src/zcl_abapgit_stage_logic.clas.abap | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/zcl_abapgit_stage_logic.clas.abap b/src/zcl_abapgit_stage_logic.clas.abap index 80aabd2a4..70de645d6 100644 --- a/src/zcl_abapgit_stage_logic.clas.abap +++ b/src/zcl_abapgit_stage_logic.clas.abap @@ -52,7 +52,8 @@ CLASS ZCL_ABAPGIT_STAGE_LOGIC IMPLEMENTATION. DATA: lv_index TYPE i. - FIELD-SYMBOLS: LIKE LINE OF cs_files-remote. + FIELD-SYMBOLS: LIKE LINE OF cs_files-remote, + LIKE LINE OF cs_files-local. LOOP AT cs_files-remote ASSIGNING . @@ -70,6 +71,17 @@ CLASS ZCL_ABAPGIT_STAGE_LOGIC IMPLEMENTATION. ENDLOOP. + LOOP AT cs_files-local ASSIGNING . + lv_index = sy-tabix. + + IF io_repo->get_dot_abapgit( )->is_ignored( + iv_path = -file-path + iv_filename = -file-filename ) = abap_true. + DELETE cs_files-local INDEX lv_index. + ENDIF. + + ENDLOOP. + ENDMETHOD.