Macros for SAS Application Developers File Reference

Creates a dataset with the commit history of a local repository. More...

Go to the source code of this file.

Detailed Description

Returns the commit history from a local repository. The name of the branch is also returned.

More details here:


%let gitdir=%sysfunc(pathname(work))/core;
%let repo=;
%put source clone rc=%sysfunc(GITFN_CLONE(&repo,&dir));

[in]gitdirThe directory containing the GIT repository
[in]filter=(BRANCHONLY) To return only the commits for the current branch, use BRANCHONLY (the default). Anything else will return the entire commit history.
[out]outds=(work.mp_gitlog) The output dataset to create. All vars are $128 except message which is $4000.
  • author returns the author who submitted the commit.
  • children_ids returns a list of the children commit IDs
  • committer returns the name of the committer.
  • committer_email returns the email of the committer.
  • email returns the email of the commit author.
  • id returns the commit ID of the commit object.
  • in_current_branch returns "TRUE" or "FALSE" to indicate if the commit is in the current branch.
  • message returns the commit message.
  • parent_ids returns a list of the parent commit IDs.
  • stash returns "TRUE" or "FALSE" to indicate if the commit is a stash commit.
  • time returns the time of the commit as numeric string
  • commit_time_num time of the commit as numeric SAS datetime
  • commit_time_str the commit_time_num variable cast as string
[in]mdebug=(0) Set to 1 to enable DEBUG messages
[in]nobs=(0) Set to an integer greater than 0 to restrict the number of rows returned

SAS Macros

Related Files

Definition in file