Git-Raw
view release on metacpan or search on metacpan
git_hv_to_checkout_opts(hopt, &update_opts -> checkout_opts);
if ((opt = git_hv_int_entry(opts, "allow_fetch")))
update_opts -> allow_fetch = SvIV(opt);
}
MODULE = Git::Raw PACKAGE = Git::Raw
BOOT:
git_libgit2_init();
SV *
message_prettify(class, msg, ...)
SV *class
SV *msg
PROTOTYPE: $;$$
PREINIT:
int rc, strip_comments = 1;
char comment_char = '#';
git_buf buf = GIT_BUF_INIT_CONST(NULL, 0);
const char *message;
CODE:
message = git_ensure_pv(msg, "msg");
if (items >= 3)
strip_comments = (int) git_ensure_iv(ST(2), "strip_comments");
if (items >= 4) {
STRLEN len;
const char *comment = git_ensure_pv_with_len(ST(3), "comment_char", &len);
if (len != 1)
croak_usage("Expected a single character for 'comment_char'");
comment_char = comment[0];
}
rc = git_message_prettify(
&buf, message, strip_comments, comment_char
);
RETVAL = &PL_sv_undef;
if (rc == GIT_OK) {
RETVAL = newSVpv(buf.ptr, buf.size);
git_buf_dispose(&buf);
}
git_check_error(rc);
OUTPUT: RETVAL
void
features(class)
SV *class
PREINIT:
int ctx = GIMME_V;
PPCODE:
if (ctx != G_VOID) {
if (ctx == G_ARRAY) {
int features = git_libgit2_features();
mXPUSHs(newSVpv("threads", 0));
mXPUSHs(newSViv((features & GIT_FEATURE_THREADS) ? 1 : 0));
mXPUSHs(newSVpv("https", 0));
mXPUSHs(newSViv((features & GIT_FEATURE_HTTPS) ? 1 : 0));
mXPUSHs(newSVpv("ssh", 0));
mXPUSHs(newSViv((features & GIT_FEATURE_SSH) ? 1 : 0));
XSRETURN(6);
} else {
mXPUSHs(newSViv(3));
XSRETURN(1);
}
} else
XSRETURN_EMPTY;
INCLUDE: xs/AnnotatedCommit.xs
INCLUDE: xs/Blame.xs
INCLUDE: xs/Blame/Hunk.xs
INCLUDE: xs/Blob.xs
INCLUDE: xs/Branch.xs
INCLUDE: xs/Cert.xs
INCLUDE: xs/Cert/HostKey.xs
INCLUDE: xs/Cert/X509.xs
INCLUDE: xs/Commit.xs
INCLUDE: xs/Config.xs
INCLUDE: xs/Cred.xs
INCLUDE: xs/Diff.xs
INCLUDE: xs/Diff/Delta.xs
INCLUDE: xs/Diff/File.xs
INCLUDE: xs/Diff/Hunk.xs
INCLUDE: xs/Diff/Stats.xs
INCLUDE: xs/Error.xs
INCLUDE: xs/Error/Category.xs
INCLUDE: xs/Filter.xs
INCLUDE: xs/Filter/List.xs
INCLUDE: xs/Filter/Source.xs
INCLUDE: xs/Graph.xs
INCLUDE: xs/Index.xs
INCLUDE: xs/Index/Conflict.xs
INCLUDE: xs/Index/Entry.xs
INCLUDE: xs/Indexer.xs
INCLUDE: xs/Mempack.xs
INCLUDE: xs/Merge/File/Result.xs
INCLUDE: xs/Note.xs
INCLUDE: xs/Object.xs
INCLUDE: xs/Odb.xs
INCLUDE: xs/Odb/Backend.xs
INCLUDE: xs/Odb/Object.xs
INCLUDE: xs/Odb/Backend/Loose.xs
INCLUDE: xs/Odb/Backend/OnePack.xs
INCLUDE: xs/Odb/Backend/Pack.xs
INCLUDE: xs/Packbuilder.xs
INCLUDE: xs/Patch.xs
INCLUDE: xs/PathSpec.xs
INCLUDE: xs/PathSpec/MatchList.xs
INCLUDE: xs/Rebase.xs
( run in 0.826 second using v1.01-cache-2.11-cpan-5511b514fd6 )