File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,10 @@ fn sync(
207207 let dst = canonical_destination. join ( & dst_name) ;
208208 to_remove. remove ( & dst) ;
209209 let cksum = dst. join ( ".cargo-checksum.json" ) ;
210- if dir_has_version_suffix && cksum. exists ( ) {
211- // Always re-copy directory without version suffix in case the version changed
210+ // Registries are the only immutable sources,
211+ // path and git dependencies' versions cannot be trusted to mean "no change"
212+ if dir_has_version_suffix && id. source_id ( ) . is_registry ( ) && cksum. exists ( ) {
213+ // Don't re-copy directory with version suffix in case it comes from a registry
212214 continue ;
213215 }
214216
Original file line number Diff line number Diff line change @@ -1626,7 +1626,7 @@ fn git_update_rev() {
16261626 . run ( ) ;
16271627
16281628 let lib = p. read_file ( "vendor/a-0.1.0/src/lib.rs" ) ;
1629- assert_e2e ( ) . eq ( lib, "" ) ;
1629+ assert_e2e ( ) . eq ( lib, "pub fn f() {} " ) ;
16301630}
16311631
16321632#[ cargo_test]
You can’t perform that action at this time.
0 commit comments