shithub: libgit

ref: 3334f29a9e020b0447d81ac4afc8e1b31452276f
dir: /git.h/

View raw version
#pragma lib "libgit.a"
#pragma src "/sys/src/libgit"

typedef struct Gitlog Gitlog;
struct Gitlog {
	char *hash; /* if nil, end of array */
	char *author;
	char *date;
	char *message;
};

/* initialize git system */
int initgit(char* dir);
int freegitlogs(Gitlog *logs);

/* git commands. files must be relative within repository. The last
   name must be nil. */
int gitcommit(char *msg, char *file, ...);
int gitadd(char *file, ...);
int gitrm(char *file, ...);
int gitlog(Gitlog **logs, int n, char *commit, ...);