diff options
Diffstat (limited to 'builtin/reset.c')
-rw-r--r-- | builtin/reset.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/reset.c b/builtin/reset.c index 5da0f75de9..ffe41c924b 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -39,7 +39,7 @@ static const char *reset_type_names[] = { static inline int is_merge(void) { - return !access(git_path_merge_head(), F_OK); + return !access(git_path_merge_head(the_repository), F_OK); } static int reset_index(const struct object_id *oid, int reset_type, int quiet) @@ -109,7 +109,7 @@ static void print_new_head_line(struct commit *commit) struct strbuf buf = STRBUF_INIT; printf(_("HEAD is now at %s"), - find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV)); + find_unique_abbrev(&commit->object.oid, DEFAULT_ABBREV)); pp_commit_easy(CMIT_FMT_ONELINE, commit, &buf); if (buf.len > 0) @@ -314,7 +314,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) unborn = !strcmp(rev, "HEAD") && get_oid("HEAD", &oid); if (unborn) { /* reset on unborn branch: treat as reset to empty tree */ - hashcpy(oid.hash, EMPTY_TREE_SHA1_BIN); + oidcpy(&oid, the_hash_algo->empty_tree); } else if (!pathspec.nr) { struct commit *commit; if (get_oid_committish(rev, &oid)) |