Macros for SAS Application Developers
No Matches File Reference

Creates a dataset with the output from GIT_STATUS() More...

Go to the source code of this file.

Detailed Description

Uses git_status() to fetch the number of changed files, then iterates with git_status_get(), inserting all attributes into an output dataset.


%let dir=%sysfunc(pathname(work))/core;
%let repo=;
%put source clone rc=%sysfunc(GITFN_CLONE(&repo,&dir));
%mf_writefile(&dir/somefile.txt,l1=some content)


More info on these functions is in this [helpful paper] ( by Danny Zimmerman.

[in]gitdirThe directory containing the GIT repository
[out]outds=(work.git_status) The output dataset to create. Vars:
  • gitdir $1024 - directory of repo
  • path $1024 - relative path to the file in the repo
  • staged $32 - whether the file is staged (TRUE or FALSE)
  • status $64 - either new, deleted, or modified
  • cnt - number of files
  • n - the "nth" file in the list from git_status()
[in]mdebug=(0) Set to 1 to enable DEBUG messages

Related Files

Definition in file