ref: 485586299c3f6bb71a58ab5348210ca40ee9e8d2
parent: 254e6855efd805fda2826f324169009c8b0a4105
author: sirjofri <sirjofri@sirjofri.de>
date: Sun Jun 16 10:10:58 EDT 2024
adds ...l versions to man page
--- a/README
+++ b/README
@@ -12,10 +12,10 @@
typedef struct Gitlog
{
- char*hash;
- char*author;
- char*date;
- char*message;
+ char *hash;
+ char *author;
+ char *date;
+ char *message;
} Gitlog;
int initgit(char *dir)
@@ -22,9 +22,13 @@
int freegitlogs(Gitlog *logs)
int gitcommit(char *msg, char *file, ...)
+ int gitcommitl(char *msg, char **files)
int gitadd(char *file, ...)
+ int gitaddl(char **files)
int gitrm(char *file, ...)
+ int gitrml(char **files)
int gitlog(Gitlog **logs, int n, char *commit, ...)
+ int gitlogl(Gitlog **logs, int n, char *commit, char **files)
DESCRIPTION
Libgit is a wrapper around git9. It does not provide its own
@@ -34,6 +38,10 @@
element to be nil. All the file names are expected to be
relative to the repository root directory.
+ Most calls have an l-version which receives an array of
+ files instead of a va_list. The last element in those
+ arrays must be nil.
+
Initgit initializes libgit with an existing repository at
location dir. This will use git(1) to start the backend
filesystem.
@@ -85,13 +93,10 @@
git(1)
DIAGNOSTICS
- All commands return 1 or 0 and set errstr.
+ All commands return 0 on failure and set errstr.
BUGS
Sure.
-
- There should be a collection of functions that receive an
- array of files instead of a va_list.
Libgit is incomplete.
--- a/git.2
+++ b/git.2
@@ -11,7 +11,7 @@
.PP
.ft L
.nf
-.ta \w'\fLFile 'u
+.ta \w'\fLFile 'u +\w'\fLchar 'u
typedef struct Gitlog
{
char *hash;
@@ -32,9 +32,13 @@
.nf
.ta \w'\fLint 'u +4n +4n
int gitcommit(char *msg, char *file, ...)
+int gitcommitl(char *msg, char **files)
int gitadd(char *file, ...)
+int gitaddl(char **files)
int gitrm(char *file, ...)
+int gitrml(char **files)
int gitlog(Gitlog **logs, int n, char *commit, ...)
+int gitlogl(Gitlog **logs, int n, char *commit, char **files)
.fi
.SH DESCRIPTION
.I Libgit
@@ -46,6 +50,13 @@
.BR nil .
All the file names are expected to be relative to the repository root directory.
.PP
+Most calls have an
+.BR l -version
+which receives an array of files instead of a
+.BR va_list .
+The last element in those arrays must be
+.BR nil .
+.PP
.B Initgit
initializes libgit with an existing repository at location
.BR dir .
@@ -126,12 +137,11 @@
.SH SEE ALSO
.IR git (1)
.SH DIAGNOSTICS
-All commands return 1 or 0 and set errstr.
+All commands return
+.B 0
+on failure and set errstr.
.SH BUGS
Sure.
-.PP
-There should be a collection of functions that receive an array of files instead of a
-.BR va_list .
.PP
.I Libgit
is incomplete.