Merge branch 'bc/object-id'
Conversion from uchar[20] to struct object_id continues. * bc/object-id: (36 commits) convert: convert to struct object_id sha1_file: introduce a constant for max header length Convert lookup_replace_object to struct object_id sha1_file: convert read_sha1_file to struct object_id sha1_file: convert read_object_with_reference to object_id tree-walk: convert tree entry functions to object_id streaming: convert istream internals to struct object_id tree-walk: convert get_tree_entry_follow_symlinks internals to object_id builtin/notes: convert static functions to object_id builtin/fmt-merge-msg: convert remaining code to object_id sha1_file: convert sha1_object_info* to object_id Convert remaining callers of sha1_object_info_extended to object_id packfile: convert unpack_entry to struct object_id sha1_file: convert retry_bad_packed_offset to struct object_id sha1_file: convert assert_sha1_type to object_id builtin/mktree: convert to struct object_id streaming: convert open_istream to use struct object_id sha1_file: convert check_sha1_signature to struct object_id sha1_file: convert read_loose_object to use struct object_id builtin/index-pack: convert struct ref_delta_entry to object_id ...
This commit is contained in:
@ -66,7 +66,7 @@ static int post_checkout_hook(struct commit *old_commit, struct commit *new_comm
|
||||
|
||||
}
|
||||
|
||||
static int update_some(const unsigned char *sha1, struct strbuf *base,
|
||||
static int update_some(const struct object_id *oid, struct strbuf *base,
|
||||
const char *pathname, unsigned mode, int stage, void *context)
|
||||
{
|
||||
int len;
|
||||
@ -78,7 +78,7 @@ static int update_some(const unsigned char *sha1, struct strbuf *base,
|
||||
|
||||
len = base->len + strlen(pathname);
|
||||
ce = xcalloc(1, cache_entry_size(len));
|
||||
hashcpy(ce->oid.hash, sha1);
|
||||
oidcpy(&ce->oid, oid);
|
||||
memcpy(ce->name, base->buf, base->len);
|
||||
memcpy(ce->name + base->len, pathname, len - base->len);
|
||||
ce->ce_flags = create_ce_flags(0) | CE_UPDATE;
|
||||
@ -405,10 +405,10 @@ static void describe_detached_head(const char *msg, struct commit *commit)
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &sb);
|
||||
if (print_sha1_ellipsis()) {
|
||||
fprintf(stderr, "%s %s... %s\n", msg,
|
||||
find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV), sb.buf);
|
||||
find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV), sb.buf);
|
||||
} else {
|
||||
fprintf(stderr, "%s %s %s\n", msg,
|
||||
find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV), sb.buf);
|
||||
find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV), sb.buf);
|
||||
}
|
||||
strbuf_release(&sb);
|
||||
}
|
||||
@ -720,7 +720,7 @@ static int add_pending_uninteresting_ref(const char *refname,
|
||||
static void describe_one_orphan(struct strbuf *sb, struct commit *commit)
|
||||
{
|
||||
strbuf_addstr(sb, " ");
|
||||
strbuf_add_unique_abbrev(sb, commit->object.oid.hash, DEFAULT_ABBREV);
|
||||
strbuf_add_unique_abbrev(sb, &commit->object.oid, DEFAULT_ABBREV);
|
||||
strbuf_addch(sb, ' ');
|
||||
if (!parse_commit(commit))
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, sb);
|
||||
@ -778,7 +778,7 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)
|
||||
" git branch <new-branch-name> %s\n\n",
|
||||
/* Give ngettext() the count */
|
||||
lost),
|
||||
find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV));
|
||||
find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user