use git2::Oid;
error_chain! {
foreign_links {
GitError(::git2::Error);
}
errors {
CannotCreateMessage {
description("Cannot create message")
display("Cannot create a message")
}
CannotConstructRevwalk {
description("Cannot construct revwalk")
display("Cannot construct a revwalk for iterating over commits")
}
CannotGetCommit {
description("Cannot get a commit from the repository")
display("Cannot get a specific commit from repository")
}
CannotGetCommitForRev(rev: String) {
description("Cannot get commit from rev")
display("Cannot get commit from rev '{}'", rev)
}
ReferenceNameError {
description("Error getting reference name")
display("Error getting reference name")
}
CannotGetReferences(glob: String) {
description("Cannot get references from repository")
display("Cannot get references '{}' from repository", glob)
}
CannotGetReference {
description("Cannot get a reference from repository")
display("Cannot get a specific reference from repository")
}
CannotDeleteReference(reference: String) {
description("Cannot delete a specific reference")
display("Cannot delete the reference '{}'", reference)
}
CannotBuildTree {
description("Cannot build Tree")
display("Cannot build Tree")
}
CannotFindIssueHead(id: Oid) {
description("Cannot find issue HEAD")
display("Cannot find issue HEAD for {}", id)
}
CannotSetReference(refname: String) {
description("Cannot set some reference")
display("Cannot update or create reference '{}'", refname)
}
NoTreeInitFound(id: Oid) {
description("Cannot find any tree init")
display("Cannot find any tree init for {}", id)
}
OidFormatError(name: String) {
description("Malformed HEAD OID")
display("Malformed OID: {}", name)
}
MalFormedHeadReference(name: String) {
description("Found malformed HEAD reference")
display("Malformed head refernece: {}", name)
}
TrailerFormatError(trailer: String) {
description("Found malformed trailer")
display("Malformed trailer: {}", trailer)
}
EmptyMessage {
description("An empty message was supplied")
display("The message is empty")
}
EmptySubject {
description("The subject line of the message is empty")
display("Empty subject line")
}
MalformedMessage {
description("The message supplied is malformed")
display("The message supplied is malformed")
}
}
}