Skip to content

Commit ae02afd

Browse files
authored
Harmonize commitish and committish in docstrings (#799)
The git glossary mentions both verions. However in-code, only the first variant is used. This commit harmonizes the usages: https://git-scm.com/docs/gitglossary#Documentation/ gitglossary.txt-aiddefcommit-ishacommit-ishalsocommittish Co-authored-by: Simon Gasse <[email protected]>
1 parent 74fd960 commit ae02afd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/repo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl Repository {
811811

812812
/// Make the repository HEAD directly point to the commit.
813813
///
814-
/// If the provided committish cannot be found in the repository, the HEAD
814+
/// If the provided commitish cannot be found in the repository, the HEAD
815815
/// is unaltered and an error is returned.
816816
///
817817
/// If the provided commitish cannot be peeled into a commit, the HEAD is
@@ -831,7 +831,7 @@ impl Repository {
831831

832832
/// Make the repository HEAD directly point to the commit.
833833
///
834-
/// If the provided committish cannot be found in the repository, the HEAD
834+
/// If the provided commitish cannot be found in the repository, the HEAD
835835
/// is unaltered and an error is returned.
836836
/// If the provided commitish cannot be peeled into a commit, the HEAD is
837837
/// unaltered and an error is returned.

src/revwalk.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl<'repo> Revwalk<'repo> {
8181

8282
/// Mark a commit to start traversal from.
8383
///
84-
/// The given OID must belong to a committish on the walked repository.
84+
/// The given OID must belong to a commitish on the walked repository.
8585
///
8686
/// The given commit will be used as one of the roots when starting the
8787
/// revision walk. At least one commit must be pushed onto the walker before
@@ -111,7 +111,7 @@ impl<'repo> Revwalk<'repo> {
111111
/// A leading 'refs/' is implied if not present as well as a trailing `/ \
112112
/// *` if the glob lacks '?', ' \ *' or '['.
113113
///
114-
/// Any references matching this glob which do not point to a committish
114+
/// Any references matching this glob which do not point to a commitish
115115
/// will be ignored.
116116
pub fn push_glob(&mut self, glob: &str) -> Result<(), Error> {
117117
let glob = CString::new(glob)?;
@@ -136,7 +136,7 @@ impl<'repo> Revwalk<'repo> {
136136

137137
/// Push the OID pointed to by a reference
138138
///
139-
/// The reference must point to a committish.
139+
/// The reference must point to a commitish.
140140
pub fn push_ref(&mut self, reference: &str) -> Result<(), Error> {
141141
let reference = CString::new(reference)?;
142142
unsafe {
@@ -194,7 +194,7 @@ impl<'repo> Revwalk<'repo> {
194194
/// A leading 'refs/' is implied if not present as well as a trailing `/ \
195195
/// *` if the glob lacks '?', ' \ *' or '['.
196196
///
197-
/// Any references matching this glob which do not point to a committish
197+
/// Any references matching this glob which do not point to a commitish
198198
/// will be ignored.
199199
pub fn hide_glob(&mut self, glob: &str) -> Result<(), Error> {
200200
let glob = CString::new(glob)?;
@@ -206,7 +206,7 @@ impl<'repo> Revwalk<'repo> {
206206

207207
/// Hide the OID pointed to by a reference.
208208
///
209-
/// The reference must point to a committish.
209+
/// The reference must point to a commitish.
210210
pub fn hide_ref(&mut self, reference: &str) -> Result<(), Error> {
211211
let reference = CString::new(reference)?;
212212
unsafe {

0 commit comments

Comments
 (0)