mirror of
https://github.com/sasjs/core.git
synced 2026-01-07 09:30:06 +00:00
feat: adding nobs limit to mp_gitlog
This commit is contained in:
7
all.sas
7
all.sas
@@ -8352,6 +8352,8 @@ https://documentation.sas.com/doc/ko/pgmsascdc/v_033/lefunctionsref/n1qo5miyvry1
|
|||||||
@li commit_time_str the commit_time_num variable cast as string
|
@li commit_time_str the commit_time_num variable cast as string
|
||||||
|
|
||||||
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
||||||
|
@param [in] nobs= (0) Set to an integer greater than 0 to restrict the number
|
||||||
|
of rows returned
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mf_getgitbranch.sas
|
@li mf_getgitbranch.sas
|
||||||
@@ -8363,7 +8365,7 @@ https://documentation.sas.com/doc/ko/pgmsascdc/v_033/lefunctionsref/n1qo5miyvry1
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
%macro mp_gitlog(gitdir,outds=work.mp_gitlog,mdebug=0,filter=BRANCHONLY);
|
%macro mp_gitlog(gitdir,outds=work.mp_gitlog,mdebug=0,filter=BRANCHONLY,nobs=0);
|
||||||
|
|
||||||
%local varlist i var;
|
%local varlist i var;
|
||||||
%let varlist=author children_ids committer committer_email email id
|
%let varlist=author children_ids committer committer_email email id
|
||||||
@@ -8405,6 +8407,9 @@ data &outds;
|
|||||||
if cats(in_current_branch)='TRUE' then output;
|
if cats(in_current_branch)='TRUE' then output;
|
||||||
end;
|
end;
|
||||||
else output;
|
else output;
|
||||||
|
%if &nobs>0 %then %do;
|
||||||
|
if n ge &nobs then stop;
|
||||||
|
%end;
|
||||||
end;
|
end;
|
||||||
rc=git_commit_free(trim(gitdir));
|
rc=git_commit_free(trim(gitdir));
|
||||||
keep gitdir branch &varlist message time commit_time_num commit_time_str;
|
keep gitdir branch &varlist message time commit_time_num commit_time_str;
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ https://documentation.sas.com/doc/ko/pgmsascdc/v_033/lefunctionsref/n1qo5miyvry1
|
|||||||
@li commit_time_str the commit_time_num variable cast as string
|
@li commit_time_str the commit_time_num variable cast as string
|
||||||
|
|
||||||
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
||||||
|
@param [in] nobs= (0) Set to an integer greater than 0 to restrict the number
|
||||||
|
of rows returned
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
<h4> SAS Macros </h4>
|
||||||
@li mf_getgitbranch.sas
|
@li mf_getgitbranch.sas
|
||||||
@@ -49,7 +51,7 @@ https://documentation.sas.com/doc/ko/pgmsascdc/v_033/lefunctionsref/n1qo5miyvry1
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
%macro mp_gitlog(gitdir,outds=work.mp_gitlog,mdebug=0,filter=BRANCHONLY);
|
%macro mp_gitlog(gitdir,outds=work.mp_gitlog,mdebug=0,filter=BRANCHONLY,nobs=0);
|
||||||
|
|
||||||
%local varlist i var;
|
%local varlist i var;
|
||||||
%let varlist=author children_ids committer committer_email email id
|
%let varlist=author children_ids committer committer_email email id
|
||||||
@@ -91,6 +93,9 @@ data &outds;
|
|||||||
if cats(in_current_branch)='TRUE' then output;
|
if cats(in_current_branch)='TRUE' then output;
|
||||||
end;
|
end;
|
||||||
else output;
|
else output;
|
||||||
|
%if &nobs>0 %then %do;
|
||||||
|
if n ge &nobs then stop;
|
||||||
|
%end;
|
||||||
end;
|
end;
|
||||||
rc=git_commit_free(trim(gitdir));
|
rc=git_commit_free(trim(gitdir));
|
||||||
keep gitdir branch &varlist message time commit_time_num commit_time_str;
|
keep gitdir branch &varlist message time commit_time_num commit_time_str;
|
||||||
|
|||||||
Reference in New Issue
Block a user