mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 04:36:49 +08:00
refactor commit author regex fixes #410
This commit is contained in:
parent
371ce55e3f
commit
8447e0cc2d
|
@ -156,7 +156,8 @@ CONSTANTS: gc_newline TYPE abap_char1 VALUE cl_abap_char_utilities=>newline.
|
|||
CONSTANTS: gc_english TYPE spras VALUE 'E'.
|
||||
|
||||
CONSTANTS: gc_root_dir TYPE string VALUE '/',
|
||||
gc_dot_abapgit TYPE string VALUE '.abapgit.xml' ##NO_TEXT.
|
||||
gc_dot_abapgit TYPE string VALUE '.abapgit.xml' ##NO_TEXT,
|
||||
gc_author_regex TYPE string VALUE '^([\w\s\.@\-_1-9]+) <(.*)> (\d{10}) .\d{4}$' ##NO_TEXT.
|
||||
|
||||
CONSTANTS: BEGIN OF gc_action,
|
||||
repo_clone TYPE string VALUE 'repo_clone',
|
||||
|
|
|
@ -193,7 +193,7 @@ CLASS lcl_branch_overview IMPLEMENTATION.
|
|||
SPLIT ls_raw-body AT gc_newline INTO ls_commit-message lv_trash.
|
||||
|
||||
* unix time stamps are in same time zone, so ignore the zone,
|
||||
FIND REGEX '^([\w\s\.@]+) <(.*)> (\d{10}) .\d{4}$' IN ls_raw-author
|
||||
FIND REGEX gc_author_regex IN ls_raw-author
|
||||
SUBMATCHES
|
||||
ls_commit-author
|
||||
ls_commit-email
|
||||
|
|
|
@ -283,7 +283,7 @@ CLASS lcl_merge IMPLEMENTATION.
|
|||
<ls_ancestor>-commit = lv_commit.
|
||||
<ls_ancestor>-tree = ls_commit-tree.
|
||||
<ls_ancestor>-body = ls_commit-body.
|
||||
FIND REGEX '^[\w\s]+ <.*> (\d{10}) .\d{4}$' IN ls_commit-author
|
||||
FIND REGEX gc_author_regex IN ls_commit-author
|
||||
SUBMATCHES <ls_ancestor>-time ##NO_TEXT.
|
||||
ASSERT sy-subrc = 0.
|
||||
ENDLOOP.
|
||||
|
|
Loading…
Reference in New Issue
Block a user