@@ -77,28 +77,28 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
7777
7878 if (graph_size < GRAPH_MIN_SIZE ) {
7979 close (fd );
80- die ("graph file %s is too small" , graph_file );
80+ die (_ ( "graph file %s is too small" ) , graph_file );
8181 }
8282 graph_map = xmmap (NULL , graph_size , PROT_READ , MAP_PRIVATE , fd , 0 );
8383 data = (const unsigned char * )graph_map ;
8484
8585 graph_signature = get_be32 (data );
8686 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" ) ,
8888 graph_signature , GRAPH_SIGNATURE );
8989 goto cleanup_fail ;
9090 }
9191
9292 graph_version = * (unsigned char * )(data + 4 );
9393 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" ) ,
9595 graph_version , GRAPH_VERSION );
9696 goto cleanup_fail ;
9797 }
9898
9999 hash_version = * (unsigned char * )(data + 5 );
100100 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" ) ,
102102 hash_version , GRAPH_OID_VERSION );
103103 goto cleanup_fail ;
104104 }
@@ -122,7 +122,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
122122 chunk_lookup += GRAPH_CHUNKLOOKUP_WIDTH ;
123123
124124 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 ),
126126 (uint32_t )chunk_offset );
127127 goto cleanup_fail ;
128128 }
@@ -158,7 +158,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
158158 }
159159
160160 if (chunk_repeated ) {
161- error ("chunk id %08x appears multiple times" , chunk_id );
161+ error (_ ( "chunk id %08x appears multiple times" ) , chunk_id );
162162 goto cleanup_fail ;
163163 }
164164
@@ -244,7 +244,7 @@ static struct commit_list **insert_parent_or_die(struct commit_graph *g,
244244 hashcpy (oid .hash , g -> chunk_oid_lookup + g -> hash_len * pos );
245245 c = lookup_commit (& oid );
246246 if (!c )
247- die ("could not find commit %s" , oid_to_hex (& oid ));
247+ die (_ ( "could not find commit %s" ) , oid_to_hex (& oid ));
248248 c -> graph_pos = pos ;
249249 return & commit_list_insert (c , pptr )-> next ;
250250}
@@ -537,7 +537,7 @@ static int add_packed_commits(const struct object_id *oid,
537537
538538 oi .typep = & type ;
539539 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 ));
541541
542542 if (type != OBJ_COMMIT )
543543 return 0 ;
@@ -683,9 +683,9 @@ void write_commit_graph(const char *obj_dir,
683683 strbuf_addstr (& packname , pack_indexes [i ]);
684684 p = add_packed_git (packname .buf , packname .len , 1 );
685685 if (!p )
686- die ("error adding pack %s" , packname .buf );
686+ die (_ ( "error adding pack %s" ) , packname .buf );
687687 if (open_pack_index (p ))
688- die ("error opening index for %s" , packname .buf );
688+ die (_ ( "error opening index for %s" ) , packname .buf );
689689 for_each_object_in_pack (p , add_packed_commits , & oids );
690690 close_pack (p );
691691 }
0 commit comments