@@ -72,9 +72,12 @@ impl GitSync {
72
72
"previous upstream base: {:?}" ,
73
73
self . config. config. last_upstream_sha
74
74
) ;
75
- println ! ( "current upstream base: {upstream_sha}" ) ;
75
+ println ! ( "new upstream base: {upstream_sha}" ) ;
76
76
println ! ( "original local HEAD: {orig_head}" ) ;
77
77
78
+ /// If the upstream SHA hasn't changed from the latest sync, there is nothing to pull
79
+ /// We distinguish this situation for tools that might not want to consider this to
80
+ /// be an error.
78
81
if let Some ( previous_base_commit) = self . config . config . last_upstream_sha . as_ref ( ) {
79
82
if * previous_base_commit == upstream_sha {
80
83
return Err ( RustcPullError :: NothingToPull ) ;
@@ -91,8 +94,8 @@ impl GitSync {
91
94
config. write ( & self . config . path ) ?;
92
95
93
96
let prep_message = format ! (
94
- r#"Update the upstream Rust SHA to {upstream_sha}
95
- To prepare for merging from {UPSTREAM_REPO}"# ,
97
+ r#"Update the upstream Rust SHA to {upstream_sha}.
98
+ To prepare for merging from {UPSTREAM_REPO}. "# ,
96
99
) ;
97
100
98
101
let config_path = self . config . path . to_string_lossy ( ) . to_string ( ) ;
@@ -166,7 +169,7 @@ Filtered ref: {incoming_ref}
166
169
167
170
git_reset. disarm ( ) ;
168
171
169
- // Check that the number of roots did not increase .
172
+ // Check that the number of roots did not change .
170
173
if num_roots ( ) ? != num_roots_before {
171
174
return Err ( anyhow:: anyhow!(
172
175
"Josh created a new root commit. This is probably not the history you want."
0 commit comments