File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -1611,18 +1611,6 @@ impl DetailedTomlDependency {
1611
1611
}
1612
1612
}
1613
1613
1614
- if let Some ( git) = self . git . clone ( ) {
1615
- if let Ok ( url) = git. into_url ( ) {
1616
- if url. fragment ( ) . is_some ( ) {
1617
- let msg = format ! (
1618
- "hash in git url is ignored for dependency ({}). \
1619
- If you were trying to specify a specific git revision, use rev = \" revision\" .",
1620
- name_in_toml) ;
1621
- cx. warnings . push ( msg)
1622
- }
1623
- }
1624
- }
1625
-
1626
1614
let new_source_id = match (
1627
1615
self . git . as_ref ( ) ,
1628
1616
self . path . as_ref ( ) ,
@@ -1673,6 +1661,17 @@ impl DetailedTomlDependency {
1673
1661
. or_else ( || self . rev . clone ( ) . map ( GitReference :: Rev ) )
1674
1662
. unwrap_or_else ( || GitReference :: Branch ( "master" . to_string ( ) ) ) ;
1675
1663
let loc = git. into_url ( ) ?;
1664
+
1665
+ if let Some ( fragment) = loc. fragment ( ) {
1666
+ let msg = format ! (
1667
+ "URL fragment `#{}` in git URL is ignored for dependency ({}). \
1668
+ If you were trying to specify a specific git revision, \
1669
+ use `rev = \" {}\" ` in the dependency declaration.",
1670
+ fragment, name_in_toml, fragment
1671
+ ) ;
1672
+ cx. warnings . push ( msg)
1673
+ }
1674
+
1676
1675
SourceId :: for_git ( & loc, reference) ?
1677
1676
}
1678
1677
( None , Some ( path) , _, _) => {
You can’t perform that action at this time.
0 commit comments