@@ -59,7 +59,7 @@ pub fn package(ws: &Workspace, opts: &PackageOpts) -> CargoResult<Option<FileLoc
5959    } 
6060
6161    if  !opts. allow_dirty  { 
62-         check_not_dirty ( pkg,  & src) ?; 
62+         check_not_dirty ( pkg,  & src,   & config ) ?; 
6363    } 
6464
6565    let  filename = format ! ( "{}-{}.crate" ,  pkg. name( ) ,  pkg. version( ) ) ; 
@@ -152,26 +152,33 @@ fn verify_dependencies(pkg: &Package) -> CargoResult<()> {
152152    Ok ( ( ) ) 
153153} 
154154
155- fn  check_not_dirty ( p :  & Package ,  src :  & PathSource )  -> CargoResult < ( ) >  { 
155+ fn  check_not_dirty ( p :  & Package ,  src :  & PathSource ,   config :   & Config )  -> CargoResult < ( ) >  { 
156156    if  let  Ok ( repo)  = git2:: Repository :: discover ( p. root ( ) )  { 
157157        if  let  Some ( workdir)  = repo. workdir ( )  { 
158-             debug ! ( 
159-                 "found a git repo at {:?}, checking if index present" , 
160-                 workdir
161-             ) ; 
158+             debug ! ( "found a git repo at {:?}" ,  workdir) ; 
162159            let  path = p. manifest_path ( ) ; 
163160            let  path = path. strip_prefix ( workdir) . unwrap_or ( path) ; 
164161            if  let  Ok ( status)  = repo. status_file ( path)  { 
165162                if  ( status &  git2:: Status :: IGNORED ) . is_empty ( )  { 
166-                     debug ! ( "Cargo.toml found in repo, checking if dirty"  ) ; 
163+                     debug ! ( "found (git)  Cargo.toml at {:?}"  ,  path ) ; 
167164                    return  git ( p,  src,  & repo) ; 
168165                } 
169166            } 
167+             config. shell ( ) . verbose ( |shell| { 
168+                 shell. warn ( format ! ( 
169+                     "No (git) Cargo.toml found at ({})" , 
170+                     path. display( ) 
171+                 ) ) 
172+             } ) ?; 
170173        } 
174+     }  else  { 
175+         config. shell ( ) . verbose ( |shell| { 
176+             shell. warn ( format ! ( "No (git) VCS found for ({})" ,  p. root( ) . display( ) ) ) 
177+         } ) ?; 
171178    } 
172179
173-     // No VCS recognized,  we don't know if the directory is dirty or not, so we  
174-     // have to assume that it's clean. 
180+     // No VCS with a checked in Cargo.toml found. so  we don't know if the 
181+     // directory is dirty or not, so we  have to assume that it's clean. 
175182    return  Ok ( ( ) ) ; 
176183
177184    fn  git ( p :  & Package ,  src :  & PathSource ,  repo :  & git2:: Repository )  -> CargoResult < ( ) >  { 
0 commit comments