File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -120,13 +120,16 @@ fn main() -> Result<(), Box<Error>> {
120120 } ;
121121 let verbose = opt. verbose ;
122122 let repo = Repository :: open ( & path) ?;
123- let mut revwalk = repo. revwalk ( ) ?;
124- let mut commits: Vec < Commit > = Vec :: new ( ) ;
125- revwalk. push_head ( ) ?;
126- for commit in revwalk {
127- let commit = repo. find_commit ( commit?) ?;
128- commits. push ( commit) ;
129- }
123+ let commits = {
124+ let mut revwalk = repo. revwalk ( ) ?;
125+ let mut commits: Vec < Commit > = Vec :: new ( ) ;
126+ revwalk. push_head ( ) ?;
127+ for commit_id in revwalk {
128+ let commit = repo. find_commit ( commit_id?) ?;
129+ commits. push ( commit) ;
130+ }
131+ commits
132+ } ;
130133 let mut repo = Repo :: new ( path. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ) ;
131134 for commit in & commits {
132135 let commit_message = commit
You can’t perform that action at this time.
0 commit comments