File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1151,9 +1151,10 @@ impl LineHandler for GitPushLineHandler {
11511151 if exit_code != 0 {
11521152 return None ;
11531153 }
1154- let summary = if self . up_to_date {
1155- "ok (up-to-date)" . to_string ( )
1156- } else if let Some ( dest) = & self . pushed_ref {
1154+ if self . up_to_date {
1155+ return None ;
1156+ }
1157+ let summary = if let Some ( dest) = & self . pushed_ref {
11571158 format ! ( "ok {}" , dest)
11581159 } else {
11591160 "ok" . to_string ( )
@@ -2892,11 +2893,10 @@ To https://github.com/foo/bar.git
28922893 }
28932894
28942895 #[ test]
2895- fn test_push_filter_up_to_date_summary ( ) {
2896+ fn test_push_filter_up_to_date_preserves_git_message ( ) {
28962897 let input = "Everything up-to-date\n " ;
28972898 let result = run_push_filter ( input, 0 ) ;
2898- assert ! ( result. contains( "Everything up-to-date" ) ) ;
2899- assert ! ( result. ends_with( "ok (up-to-date)\n " ) , "got: {}" , result) ;
2899+ assert_eq ! ( result, input) ;
29002900 }
29012901
29022902 #[ test]
You can’t perform that action at this time.
0 commit comments