OId Commit::amend(const Tree& tree, const QString& ref, const QString& message, const Signature& author, const Signature& committer) { OId oid; qGitThrow(git_commit_amend(oid.data(), constData(), ref.isEmpty() ? NULL : PathCodec::toLibGit2(ref).constData(), author.data(), committer.data(), NULL, message.isNull() ? NULL : message.toUtf8().constData(), tree.constData())); return oid; }
QString QGitConfig::findSystem() { char buffer[GIT_PATH_MAX]; qGitThrow( git_config_find_system(buffer, GIT_PATH_MAX) ); return QFile::decodeName(buffer); }
QGitCommit QGitCommit::parent(unsigned n) const { git_commit *parent; qGitThrow(git_commit_parent(&parent, data(), n)); return QGitCommit(parent); }
QGitTree QGitCommit::tree() const { git_tree *tree; qGitThrow(git_commit_tree(&tree, data())); return QGitTree(tree); }
void QGitConfig::setValue(const QString &key, const QVariant &value) { qGitThrow( git_config_set_string(d, key.toUtf8(), value.toString().toUtf8().constData()) ); }
void Reference::setTarget(const OId& oid, const Signature &signature, const QString &message) { git_reference* rp; qGitThrow(git_reference_set_target(&rp, data(), oid.constData(), signature.data(), message.toUtf8())); d = ptr_type(rp, git_reference_free); }
void Reference::setSymbolicTarget(const QString& target, const Signature &signature, const QString &message) { git_reference* rp; qGitThrow(git_reference_symbolic_set_target(&rp, data(), PathCodec::toLibGit2(target), signature.data(), message.toUtf8())); d = ptr_type(rp, git_reference_free); }
Reference Reference::resolve() const { git_reference *ref; qGitThrow(git_reference_resolve(&ref, d.data())); return Reference(ref); }