-
-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
117 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use gix_object::bstr::BString; | ||
|
||
/// The error returned by [file()](crate::file()). | ||
#[derive(Debug, thiserror::Error)] | ||
#[allow(missing_docs)] | ||
pub enum Error { | ||
#[error("No commit was given")] | ||
EmptyTraversal, | ||
#[error(transparent)] | ||
BlobDiffSetResource(#[from] gix_diff::blob::platform::set_resource::Error), | ||
#[error(transparent)] | ||
BlobDiffPrepare(#[from] gix_diff::blob::platform::prepare_diff::Error), | ||
#[error("The file to blame at '{file_path}' wasn't found in the first commit at {commit_id}")] | ||
FileMissing { | ||
/// The file-path to the object to blame. | ||
file_path: BString, | ||
/// The commit whose tree didn't contain `file_path`. | ||
commit_id: gix_hash::ObjectId, | ||
}, | ||
#[error("Couldn't find commit or tree in the object database")] | ||
FindObject(#[from] gix_object::find::Error), | ||
#[error("Could not find existing blob or commit")] | ||
FindExistingObject(#[from] gix_object::find::existing_object::Error), | ||
#[error("Could not find existing iterator over a tree")] | ||
FindExistingIter(#[from] gix_object::find::existing_iter::Error), | ||
#[error("Failed to obtain the next commit in the commit-graph traversal")] | ||
Traverse(#[source] Box<dyn std::error::Error + Send + Sync>), | ||
#[error(transparent)] | ||
DiffTree(#[from] gix_diff::tree::Error), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.