@@ -484,12 +484,12 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
484484 io .input = fopen (path , "r" );
485485 io .io .wrerror = 0 ;
486486 if (!io .input )
487- return error_errno ("could not open %s " , path );
487+ return error_errno ("could not open '%s' " , path );
488488
489489 if (output ) {
490490 io .io .output = fopen (output , "w" );
491491 if (!io .io .output ) {
492- error_errno ("could not write %s " , output );
492+ error_errno ("could not write '%s' " , output );
493493 fclose (io .input );
494494 return -1 ;
495495 }
@@ -499,15 +499,15 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
499499
500500 fclose (io .input );
501501 if (io .io .wrerror )
502- error ("there were errors while writing %s (%s)" ,
502+ error ("there were errors while writing '%s' (%s)" ,
503503 path , strerror (io .io .wrerror ));
504504 if (io .io .output && fclose (io .io .output ))
505- io .io .wrerror = error_errno ("failed to flush %s " , path );
505+ io .io .wrerror = error_errno ("failed to flush '%s' " , path );
506506
507507 if (hunk_no < 0 ) {
508508 if (output )
509509 unlink_or_warn (output );
510- return error ("could not parse conflict hunks in %s " , path );
510+ return error ("could not parse conflict hunks in '%s' " , path );
511511 }
512512 if (io .io .wrerror )
513513 return -1 ;
@@ -684,17 +684,17 @@ static int merge(const struct rerere_id *id, const char *path)
684684 * Mark that "postimage" was used to help gc.
685685 */
686686 if (utime (rerere_path (id , "postimage" ), NULL ) < 0 )
687- warning_errno ("failed utime() on %s " ,
687+ warning_errno ("failed utime() on '%s' " ,
688688 rerere_path (id , "postimage" ));
689689
690690 /* Update "path" with the resolution */
691691 f = fopen (path , "w" );
692692 if (!f )
693- return error_errno ("could not open %s " , path );
693+ return error_errno ("could not open '%s' " , path );
694694 if (fwrite (result .ptr , result .size , 1 , f ) != 1 )
695- error_errno ("could not write %s " , path );
695+ error_errno ("could not write '%s' " , path );
696696 if (fclose (f ))
697- return error_errno ("writing %s failed" , path );
697+ return error_errno ("writing '%s' failed" , path );
698698
699699out :
700700 free (cur .ptr );
@@ -878,7 +878,7 @@ static int is_rerere_enabled(void)
878878 return rr_cache_exists ;
879879
880880 if (!rr_cache_exists && mkdir_in_gitdir (git_path_rr_cache ()))
881- die ("could not create directory %s " , git_path_rr_cache ());
881+ die ("could not create directory '%s' " , git_path_rr_cache ());
882882 return 1 ;
883883}
884884
@@ -1067,9 +1067,9 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
10671067 filename = rerere_path (id , "postimage" );
10681068 if (unlink (filename )) {
10691069 if (errno == ENOENT )
1070- error ("no remembered resolution for %s " , path );
1070+ error ("no remembered resolution for '%s' " , path );
10711071 else
1072- error_errno ("cannot unlink %s " , filename );
1072+ error_errno ("cannot unlink '%s' " , filename );
10731073 goto fail_exit ;
10741074 }
10751075
@@ -1088,7 +1088,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
10881088 item = string_list_insert (rr , path );
10891089 free_rerere_id (item );
10901090 item -> util = id ;
1091- fprintf (stderr , "Forgot resolution for %s \n" , path );
1091+ fprintf (stderr , "Forgot resolution for '%s' \n" , path );
10921092 return 0 ;
10931093
10941094fail_exit :
0 commit comments