Skip to content

Commit c1482b1

Browse files
authored
Merge pull request #388 from Kobzol/merge-base-doc
Clarify documentation around usage of merge-base
2 parents bd2811b + 5569781 commit c1482b1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/github.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ fn headers() -> Result<HeaderMap, InvalidHeaderValue> {
8282
Ok(headers)
8383
}
8484

85+
/// Lookup information about the given commit reference from GitHub.
86+
/// If it is a commit forked from the "mainline" git history (e.g. a stable tag
87+
/// like `1.88.0`), returns the merge base of the given commit reference.
8588
pub(crate) fn get_commit(sha: &str) -> anyhow::Result<Commit> {
8689
let url = CommitDetailsUrl { sha }.url();
8790
let client = Client::builder().default_headers(headers()?).build()?;

src/repo_access.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pub(crate) trait RustRepositoryAccessor {
1313

1414
/// Looks up commit associated with `commit_ref`, which can be either a sha
1515
/// or a more general reference like "origin/master".
16+
/// If `commit_ref` is a commit forked from the "mainline" git history
17+
/// (e.g. a stable tag like `1.88.0`), returns the merge base of the given commit reference.
1618
fn commit(&self, commit_ref: &str) -> anyhow::Result<Commit>;
1719

1820
/// Looks up a series of commits ending with `end_sha`; the resulting series

0 commit comments

Comments
 (0)