File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,7 @@ pub(crate) fn git_cmd(path: &PathBuf, args: &[&str]) -> Result<String> {
8888 Ok ( String :: from_utf8 ( out. stdout ) ?. trim ( ) . to_string ( ) )
8989}
9090
91- // --- New shared types ---
92-
91+ #[ derive( Debug ) ]
9392pub ( crate ) struct GitContext {
9493 pub ( crate ) commit : String ,
9594 pub ( crate ) tree : String ,
@@ -98,8 +97,8 @@ pub(crate) struct GitContext {
9897
9998impl GitContext {
10099 pub ( crate ) fn from_dir ( path : & PathBuf ) -> Result < Self > {
101- let commit = git_cmd ( path, & [ "rev-parse" , "HEAD" , "--" ] ) ?;
102- let tree = git_cmd ( path, & [ "rev-parse" , "HEAD^{tree}" , "--" ] ) ?;
100+ let commit = git_cmd ( path, & [ "rev-parse" , "HEAD" ] ) ?;
101+ let tree = git_cmd ( path, & [ "rev-parse" , "HEAD^{tree}" ] ) ?;
103102 let source_uri = git_cmd ( path, & [ "remote" , "get-url" , "origin" ] ) . unwrap_or_default ( ) ;
104103 Ok ( Self {
105104 commit,
You can’t perform that action at this time.
0 commit comments