Skip to content

Commit ec76d54

Browse files
authored
Merge pull request #1811 from ehuss/commits_in_range-debug
Log more information about why commits_in_range isn't working.
2 parents 84583ad + ce4c134 commit ec76d54

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/github.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,19 @@ impl Repository {
13311331
.json(client.get(&url))
13321332
.await
13331333
.with_context(|| format!("failed to fetch commits for {url}"))?;
1334+
// This is a temporary debugging measure to investigate why the
1335+
// `/commits` endpoint is not returning the expected values in
1336+
// production.
1337+
let v: String = this_page
1338+
.iter()
1339+
.map(|commit| {
1340+
format!(
1341+
"({}, {}, {:?}) ",
1342+
commit.sha, commit.commit.author.date, commit.parents
1343+
)
1344+
})
1345+
.collect();
1346+
log::info!("page {page}: {v}");
13341347
if let Some(idx) = this_page.iter().position(|commit| commit.sha == start) {
13351348
this_page.truncate(idx);
13361349
commits.extend(this_page);

0 commit comments

Comments
 (0)