if (!parse_commit(commit))
pp_commit_easy(CMIT_FMT_ONELINE, commit, &sb);
fprintf(stderr, "%s %s... %s\n", msg,
- find_unique_abbrev(get_object_hash(commit->object), DEFAULT_ABBREV), sb.buf);
+ find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV), sb.buf);
strbuf_release(&sb);
}
setup_standard_excludes(topts.dir);
}
tree = parse_tree_indirect(old->commit ?
- get_object_hash(old->commit->object) :
+ old->commit->object.oid.hash :
EMPTY_TREE_SHA1_BIN);
init_tree_desc(&trees[0], tree->buffer, tree->size);
tree = parse_tree_indirect(new->commit->object.oid.hash);
if (!strcmp(new->name, "HEAD") && !new->path && !opts->force_detach) {
/* Nothing to do. */
} else if (opts->force_detach || !new->path) { /* No longer on any branch. */
- update_ref(msg.buf, "HEAD", get_object_hash(new->commit->object), NULL,
+ update_ref(msg.buf, "HEAD", new->commit->object.oid.hash, NULL,
REF_NODEREF, UPDATE_REFS_DIE_ON_ERR);
if (!opts->quiet) {
if (old->path && advice_detached_head)
{
strbuf_addstr(sb, " ");
strbuf_addstr(sb,
- find_unique_abbrev(get_object_hash(commit->object), DEFAULT_ABBREV));
+ find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV));
strbuf_addch(sb, ' ');
if (!parse_commit(commit))
pp_commit_easy(CMIT_FMT_ONELINE, commit, sb);
" git branch <new-branch-name> %s\n\n",
/* Give ngettext() the count */
lost),
- find_unique_abbrev(get_object_hash(commit->object), DEFAULT_ABBREV));
+ find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV));
}
/*