diff --git a/src/lib.rs b/src/lib.rs index 17212133cf..4004ab1840 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 @@ -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")] diff --git a/src/repo.rs b/src/repo.rs index ae79afe97c..5b9201cc18 100644 --- a/src/repo.rs +++ b/src/repo.rs @@ -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>(path: P) -> Result { Repository::init_opts(path, &RepositoryInitOptions::new()) } @@ -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>( path: P, opts: &RepositoryInitOptions, @@ -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>(url: &str, into: P) -> Result { crate::init(); RepoBuilder::new().clone(url, into.as_ref()) @@ -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 { let mut raw = crate::util::zeroed_raw_oid(); @@ -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 { // Normal file path OK (does not need Windows conversion).