@@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
15
15
use std:: process:: { self , Command , Stdio } ;
16
16
use std:: str:: FromStr ;
17
17
18
- use chrono:: { Date , Duration , naive, Utc } ;
18
+ use chrono:: { Date , DateTime , Duration , naive, Utc } ;
19
19
use dialoguer:: Select ;
20
20
use failure:: { bail, format_err, Fail , Error } ;
21
21
use flate2:: read:: GzDecoder ;
@@ -36,6 +36,13 @@ mod least_satisfying;
36
36
37
37
use crate :: least_satisfying:: { least_satisfying, Satisfies } ;
38
38
39
+ #[ derive( Debug , Clone , PartialEq ) ]
40
+ pub struct Commit {
41
+ pub sha : String ,
42
+ pub date : DateTime < Utc > ,
43
+ pub summary : String ,
44
+ }
45
+
39
46
/// The first commit which build artifacts are made available through the CI for
40
47
/// bisection.
41
48
///
@@ -47,7 +54,7 @@ const EPOCH_COMMIT: &str = "927c55d86b0be44337f37cf5b0a76fb8ba86e06c";
47
54
const NIGHTLY_SERVER : & str = "https://static.rust-lang.org/dist" ;
48
55
const CI_SERVER : & str = "https://s3-us-west-1.amazonaws.com/rust-lang-ci2" ;
49
56
50
- fn get_commits ( start : & str , end : & str ) -> Result < Vec < git :: Commit > , Error > {
57
+ fn get_commits ( start : & str , end : & str ) -> Result < Vec < Commit > , Error > {
51
58
eprintln ! ( "fetching commits from {} to {}" , start, end) ;
52
59
let commits = git:: get_commits_between ( start, end) ?;
53
60
assert_eq ! ( commits. first( ) . expect( "at least one commit" ) . sha, git:: expand_commit( start) ?) ;
0 commit comments