diff --git a/src/ui/core/zcl_abapgit_html.clas.abap b/src/ui/core/zcl_abapgit_html.clas.abap
index f6f200b36..8719b35ba 100644
--- a/src/ui/core/zcl_abapgit_html.clas.abap
+++ b/src/ui/core/zcl_abapgit_html.clas.abap
@@ -71,7 +71,7 @@ ENDCLASS.
-CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
+CLASS zcl_abapgit_html IMPLEMENTATION.
METHOD add_icon.
@@ -237,7 +237,8 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
ENDIF.
lv_href = ' href="#"'. " Default, dummy
- IF iv_act IS NOT INITIAL OR iv_typ = zif_abapgit_html=>c_action_type-dummy.
+ IF ( iv_act IS NOT INITIAL OR iv_typ = zif_abapgit_html=>c_action_type-dummy )
+ AND iv_opt NA zif_abapgit_html=>c_html_opt-crossout.
CASE iv_typ.
WHEN zif_abapgit_html=>c_action_type-url.
lv_href = | href="{ iv_act }"|.
@@ -323,12 +324,12 @@ CLASS ZCL_ABAPGIT_HTML IMPLEMENTATION.
METHOD icon.
- DATA: lv_hint TYPE string,
- lv_name TYPE string,
- lv_color TYPE string,
- lv_class TYPE string,
- lv_large_icon TYPE string,
- lv_xpixel TYPE i.
+ DATA: lv_hint TYPE string,
+ lv_name TYPE string,
+ lv_color TYPE string,
+ lv_class TYPE string,
+ lv_large_icon TYPE string,
+ lv_xpixel TYPE i.
SPLIT iv_name AT '/' INTO lv_name lv_color.
diff --git a/src/ui/zcl_abapgit_services_git.clas.abap b/src/ui/zcl_abapgit_services_git.clas.abap
index 9b6fc390e..d20e7dfe0 100644
--- a/src/ui/zcl_abapgit_services_git.clas.abap
+++ b/src/ui/zcl_abapgit_services_git.clas.abap
@@ -69,7 +69,7 @@ ENDCLASS.
-CLASS ZCL_ABAPGIT_SERVICES_GIT IMPLEMENTATION.
+CLASS zcl_abapgit_services_git IMPLEMENTATION.
METHOD commit.
@@ -326,6 +326,10 @@ CLASS ZCL_ABAPGIT_SERVICES_GIT IMPLEMENTATION.
lo_repo ?= zcl_abapgit_repo_srv=>get_instance( )->get( iv_key ).
+ IF lo_repo->get_local_settings( )-write_protected = abap_true.
+ zcx_abapgit_exception=>raise( 'Cannot switch branch. Local code is write-protected by repo config' ).
+ ENDIF.
+
ls_branch = zcl_abapgit_ui_factory=>get_popups( )->branch_list_popup(
iv_url = lo_repo->get_url( )
iv_default_branch = lo_repo->get_branch_name( )