@@ -77,28 +77,28 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
77
77
78
78
if (graph_size < GRAPH_MIN_SIZE ) {
79
79
close (fd );
80
- die ("graph file %s is too small" , graph_file );
80
+ die (_ ( "graph file %s is too small" ) , graph_file );
81
81
}
82
82
graph_map = xmmap (NULL , graph_size , PROT_READ , MAP_PRIVATE , fd , 0 );
83
83
data = (const unsigned char * )graph_map ;
84
84
85
85
graph_signature = get_be32 (data );
86
86
if (graph_signature != GRAPH_SIGNATURE ) {
87
- error ("graph signature %X does not match signature %X" ,
87
+ error (_ ( "graph signature %X does not match signature %X" ) ,
88
88
graph_signature , GRAPH_SIGNATURE );
89
89
goto cleanup_fail ;
90
90
}
91
91
92
92
graph_version = * (unsigned char * )(data + 4 );
93
93
if (graph_version != GRAPH_VERSION ) {
94
- error ("graph version %X does not match version %X" ,
94
+ error (_ ( "graph version %X does not match version %X" ) ,
95
95
graph_version , GRAPH_VERSION );
96
96
goto cleanup_fail ;
97
97
}
98
98
99
99
hash_version = * (unsigned char * )(data + 5 );
100
100
if (hash_version != GRAPH_OID_VERSION ) {
101
- error ("hash version %X does not match version %X" ,
101
+ error (_ ( "hash version %X does not match version %X" ) ,
102
102
hash_version , GRAPH_OID_VERSION );
103
103
goto cleanup_fail ;
104
104
}
@@ -122,7 +122,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
122
122
chunk_lookup += GRAPH_CHUNKLOOKUP_WIDTH ;
123
123
124
124
if (chunk_offset > graph_size - GIT_MAX_RAWSZ ) {
125
- error ("improper chunk offset %08x%08x" , (uint32_t )(chunk_offset >> 32 ),
125
+ error (_ ( "improper chunk offset %08x%08x" ) , (uint32_t )(chunk_offset >> 32 ),
126
126
(uint32_t )chunk_offset );
127
127
goto cleanup_fail ;
128
128
}
@@ -158,7 +158,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
158
158
}
159
159
160
160
if (chunk_repeated ) {
161
- error ("chunk id %08x appears multiple times" , chunk_id );
161
+ error (_ ( "chunk id %08x appears multiple times" ) , chunk_id );
162
162
goto cleanup_fail ;
163
163
}
164
164
@@ -244,7 +244,7 @@ static struct commit_list **insert_parent_or_die(struct commit_graph *g,
244
244
hashcpy (oid .hash , g -> chunk_oid_lookup + g -> hash_len * pos );
245
245
c = lookup_commit (& oid );
246
246
if (!c )
247
- die ("could not find commit %s" , oid_to_hex (& oid ));
247
+ die (_ ( "could not find commit %s" ) , oid_to_hex (& oid ));
248
248
c -> graph_pos = pos ;
249
249
return & commit_list_insert (c , pptr )-> next ;
250
250
}
@@ -537,7 +537,7 @@ static int add_packed_commits(const struct object_id *oid,
537
537
538
538
oi .typep = & type ;
539
539
if (packed_object_info (the_repository , pack , offset , & oi ) < 0 )
540
- die ("unable to get type of object %s" , oid_to_hex (oid ));
540
+ die (_ ( "unable to get type of object %s" ) , oid_to_hex (oid ));
541
541
542
542
if (type != OBJ_COMMIT )
543
543
return 0 ;
@@ -683,9 +683,9 @@ void write_commit_graph(const char *obj_dir,
683
683
strbuf_addstr (& packname , pack_indexes [i ]);
684
684
p = add_packed_git (packname .buf , packname .len , 1 );
685
685
if (!p )
686
- die ("error adding pack %s" , packname .buf );
686
+ die (_ ( "error adding pack %s" ) , packname .buf );
687
687
if (open_pack_index (p ))
688
- die ("error opening index for %s" , packname .buf );
688
+ die (_ ( "error opening index for %s" ) , packname .buf );
689
689
for_each_object_in_pack (p , add_packed_commits , & oids );
690
690
close_pack (p );
691
691
}
0 commit comments