Merge branch 'bw/c-plus-plus'
Avoid using identifiers that clash with C++ keywords. Even though it is not a goal to compile Git with C++ compilers, changes like this help use of code analysis tools that targets C++ on our codebase. * bw/c-plus-plus: (37 commits) replace: rename 'new' variables trailer: rename 'template' variables tempfile: rename 'template' variables wrapper: rename 'template' variables environment: rename 'namespace' variables diff: rename 'template' variables environment: rename 'template' variables init-db: rename 'template' variables unpack-trees: rename 'new' variables trailer: rename 'new' variables submodule: rename 'new' variables split-index: rename 'new' variables remote: rename 'new' variables ref-filter: rename 'new' variables read-cache: rename 'new' variables line-log: rename 'new' variables imap-send: rename 'new' variables http: rename 'new' variables entry: rename 'new' variables diffcore-delta: rename 'new' variables ...
This commit is contained in:
@ -228,7 +228,7 @@ static unsigned check_object(struct object *obj)
|
||||
if (type != obj->type)
|
||||
die(_("object %s: expected type %s, found %s"),
|
||||
oid_to_hex(&obj->oid),
|
||||
typename(obj->type), typename(type));
|
||||
type_name(obj->type), type_name(type));
|
||||
obj->flags |= FLAG_CHECKED;
|
||||
return 1;
|
||||
}
|
||||
@ -448,7 +448,7 @@ static void *unpack_entry_data(off_t offset, unsigned long size,
|
||||
int hdrlen;
|
||||
|
||||
if (!is_delta_type(type)) {
|
||||
hdrlen = xsnprintf(hdr, sizeof(hdr), "%s %lu", typename(type), size) + 1;
|
||||
hdrlen = xsnprintf(hdr, sizeof(hdr), "%s %lu", type_name(type), size) + 1;
|
||||
the_hash_algo->init_fn(&c);
|
||||
the_hash_algo->update_fn(&c, hdr, hdrlen);
|
||||
} else
|
||||
@ -849,7 +849,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
|
||||
obj = parse_object_buffer(oid, type, size, buf,
|
||||
&eaten);
|
||||
if (!obj)
|
||||
die(_("invalid %s"), typename(type));
|
||||
die(_("invalid %s"), type_name(type));
|
||||
if (do_fsck_object &&
|
||||
fsck_object(obj, buf, size, &fsck_options))
|
||||
die(_("Error in object"));
|
||||
@ -959,7 +959,7 @@ static void resolve_delta(struct object_entry *delta_obj,
|
||||
if (!result->data)
|
||||
bad_object(delta_obj->idx.offset, _("failed to apply delta"));
|
||||
hash_object_file(result->data, result->size,
|
||||
typename(delta_obj->real_type), &delta_obj->idx.oid);
|
||||
type_name(delta_obj->real_type), &delta_obj->idx.oid);
|
||||
sha1_object(result->data, NULL, result->size, delta_obj->real_type,
|
||||
&delta_obj->idx.oid);
|
||||
counter_lock();
|
||||
@ -1378,7 +1378,7 @@ static void fix_unresolved_deltas(struct hashfile *f)
|
||||
continue;
|
||||
|
||||
if (check_sha1_signature(d->sha1, base_obj->data,
|
||||
base_obj->size, typename(type)))
|
||||
base_obj->size, type_name(type)))
|
||||
die(_("local object %s is corrupt"), sha1_to_hex(d->sha1));
|
||||
base_obj->obj = append_obj_to_pack(f, d->sha1,
|
||||
base_obj->data, base_obj->size, type);
|
||||
@ -1615,7 +1615,7 @@ static void show_pack_info(int stat_only)
|
||||
continue;
|
||||
printf("%s %-6s %lu %lu %"PRIuMAX,
|
||||
oid_to_hex(&obj->idx.oid),
|
||||
typename(obj->real_type), obj->size,
|
||||
type_name(obj->real_type), obj->size,
|
||||
(unsigned long)(obj[1].idx.offset - obj->idx.offset),
|
||||
(uintmax_t)obj->idx.offset);
|
||||
if (is_delta_type(obj->type)) {
|
||||
|
Reference in New Issue
Block a user