Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
//! is automatic as well as adding strong types to all interfaces (including
//! `Result`).
//!
//! ## Creating a `Repository`
//! ## Creating a [`Repository`]
//!
//! The `Repository` is the source from which almost all other objects in git-rs
//! The [`Repository`] is the source from which almost all other objects in git-rs
//! are spawned. A repository can be created through opening, initializing, or
//! cloning.
//!
//! ### Initializing a new repository
//!
//! The `init` method will create a new repository, assuming one does not
//! The [`Repository::init`] method will create a new repository, assuming one does not
//! already exist.
//!
//! ```no_run
Expand Down Expand Up @@ -59,10 +59,10 @@
//!
//! To clone using SSH, refer to [RepoBuilder](./build/struct.RepoBuilder.html).
//!
//! ## Working with a `Repository`
//! ## Working with a [`Repository`]
//!
//! All derivative objects, references, etc are attached to the lifetime of the
//! source `Repository`, to ensure that they do not outlive the repository
//! source [`Repository`], to ensure that they do not outlive the repository
//! itself.

#![doc(html_root_url = "https://docs.rs/git2/0.21")]
Expand Down
12 changes: 6 additions & 6 deletions src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl Repository {
///
/// This by default will create any necessary directories to create the
/// repository, and it will read any user-specified templates when creating
/// the repository. This behavior can be configured through `init_opts`.
/// the repository. This behavior can be configured through [`Repository::init_opts`].
pub fn init<P: AsRef<Path>>(path: P) -> Result<Repository, Error> {
Repository::init_opts(path, &RepositoryInitOptions::new())
}
Expand All @@ -309,7 +309,7 @@ impl Repository {

/// Creates a new repository in the specified folder with the given options.
///
/// See `RepositoryInitOptions` struct for more information.
/// See [`RepositoryInitOptions`] struct for more information.
pub fn init_opts<P: AsRef<Path>>(
path: P,
opts: &RepositoryInitOptions,
Expand All @@ -327,8 +327,8 @@ impl Repository {

/// Clone a remote repository.
///
/// See the `RepoBuilder` struct for more information. This function will
/// delegate to a fresh `RepoBuilder`
/// See the [`RepoBuilder`] struct for more information. This function will
/// delegate to a fresh [`RepoBuilder`]
pub fn clone<P: AsRef<Path>>(url: &str, into: P) -> Result<Repository, Error> {
crate::init();
RepoBuilder::new().clone(url, into.as_ref())
Expand Down Expand Up @@ -1150,7 +1150,7 @@ impl Repository {

/// Write an in-memory buffer to the ODB as a blob.
///
/// The Oid returned can in turn be passed to `find_blob` to get a handle to
/// The Oid returned can in turn be passed to [`Repository::find_blob`] to get a handle to
/// the blob.
pub fn blob(&self, data: &[u8]) -> Result<Oid, Error> {
let mut raw = crate::util::zeroed_raw_oid();
Expand All @@ -1170,7 +1170,7 @@ impl Repository {
/// Read a file from the filesystem and write its content to the Object
/// Database as a loose blob
///
/// The Oid returned can in turn be passed to `find_blob` to get a handle to
/// The Oid returned can in turn be passed to [`Repository::find_blob`] to get a handle to
/// the blob.
pub fn blob_path(&self, path: &Path) -> Result<Oid, Error> {
// Normal file path OK (does not need Windows conversion).
Expand Down
Loading