mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-02 13:03:01 +08:00
Merge pull request #499 from Sirius-A/refactor-author-regex
refactor commit author regex fixes #410
This commit is contained in:
commit
fee92b6867
|
@ -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_english TYPE spras VALUE 'E'.
|
||||||
|
|
||||||
CONSTANTS: gc_root_dir TYPE string VALUE '/',
|
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,
|
CONSTANTS: BEGIN OF gc_action,
|
||||||
repo_clone TYPE string VALUE 'repo_clone',
|
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.
|
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,
|
* 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
|
SUBMATCHES
|
||||||
ls_commit-author
|
ls_commit-author
|
||||||
ls_commit-email
|
ls_commit-email
|
||||||
|
|
|
@ -283,7 +283,7 @@ CLASS lcl_merge IMPLEMENTATION.
|
||||||
<ls_ancestor>-commit = lv_commit.
|
<ls_ancestor>-commit = lv_commit.
|
||||||
<ls_ancestor>-tree = ls_commit-tree.
|
<ls_ancestor>-tree = ls_commit-tree.
|
||||||
<ls_ancestor>-body = ls_commit-body.
|
<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.
|
SUBMATCHES <ls_ancestor>-time ##NO_TEXT.
|
||||||
ASSERT sy-subrc = 0.
|
ASSERT sy-subrc = 0.
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user