@@ -3014,10 +3014,10 @@ static int do_write_index(struct index_state *istate, struct tempfile *tempfile,
3014
3014
if (ce_flush (& c , newfd , istate -> oid .hash ))
3015
3015
return -1 ;
3016
3016
if (close_tempfile_gently (tempfile )) {
3017
- error (_ ("could not close '%s'" ), tempfile -> filename . buf );
3017
+ error (_ ("could not close '%s'" ), get_tempfile_path ( tempfile ) );
3018
3018
return -1 ;
3019
3019
}
3020
- if (stat (tempfile -> filename . buf , & st ))
3020
+ if (stat (get_tempfile_path ( tempfile ) , & st ))
3021
3021
return -1 ;
3022
3022
istate -> timestamp .sec = (unsigned int )st .st_mtime ;
3023
3023
istate -> timestamp .nsec = ST_MTIME_NSEC (st );
@@ -3058,10 +3058,10 @@ static int do_write_locked_index(struct index_state *istate, struct lock_file *l
3058
3058
* that is associated with the given "istate".
3059
3059
*/
3060
3060
trace2_region_enter_printf ("index" , "do_write_index" , the_repository ,
3061
- "%s" , lock -> tempfile -> filename . buf );
3061
+ "%s" , get_lock_file_path ( lock ) );
3062
3062
ret = do_write_index (istate , lock -> tempfile , 0 );
3063
3063
trace2_region_leave_printf ("index" , "do_write_index" , the_repository ,
3064
- "%s" , lock -> tempfile -> filename . buf );
3064
+ "%s" , get_lock_file_path ( lock ) );
3065
3065
3066
3066
if (ret )
3067
3067
return ret ;
@@ -3158,10 +3158,10 @@ static int write_shared_index(struct index_state *istate,
3158
3158
move_cache_to_base_index (istate );
3159
3159
3160
3160
trace2_region_enter_printf ("index" , "shared/do_write_index" ,
3161
- the_repository , "%s" , (* temp )-> filename . buf );
3161
+ the_repository , "%s" , get_tempfile_path (* temp ));
3162
3162
ret = do_write_index (si -> base , * temp , 1 );
3163
3163
trace2_region_leave_printf ("index" , "shared/do_write_index" ,
3164
- the_repository , "%s" , (* temp )-> filename . buf );
3164
+ the_repository , "%s" , get_tempfile_path (* temp ));
3165
3165
3166
3166
if (ret )
3167
3167
return ret ;
0 commit comments