Skip to content

Commit e9f3e3a

Browse files
committed
Clarify comment
1 parent 3a1dd44 commit e9f3e3a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/build_helper/src/git.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ pub enum PathFreshness {
6363
/// The function behaves differently in CI and outside CI.
6464
///
6565
/// - Outside CI, we want to find out if `target_paths` were modified in some local commit on
66-
/// top of the local master branch.
66+
/// top of the latest upstream commit that is available in local git history.
6767
/// If not, we try to find the most recent upstream commit (which we assume are commits
6868
/// made by bors) that modified `target_paths`.
6969
/// We don't want to simply take the latest master commit to avoid changing the output of
7070
/// this function frequently after rebasing on the latest master branch even if `target_paths`
7171
/// were not modified upstream in the meantime. In that case we would be redownloading CI
7272
/// artifacts unnecessarily.
7373
///
74-
/// - In CI, we always fetch only a single parent merge commit, so we do not have access
74+
/// - In CI, we use a shallow clone of depth 2, i.e., we fetch only a single parent commit
75+
/// (which will be the most recent bors merge commit) and do not have access
7576
/// to the full git history. Luckily, we only need to distinguish between two situations:
7677
/// 1) The current PR made modifications to `target_paths`.
7778
/// In that case, a build is typically necessary.

0 commit comments

Comments
 (0)