diff options
author | Jameson Miller <jamill@microsoft.com> | 2018-07-02 19:49:30 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 10:58:15 -0700 |
commit | 825ed4d9a044380ac093563e6bd74311ea4488ef (patch) | |
tree | fcfb270dee1a6d626b4f2d37cbc45ee3534b4b64 /builtin | |
parent | read-cache: teach refresh_cache_entry to take istate (diff) | |
download | tgif-825ed4d9a044380ac093563e6bd74311ea4488ef.tar.xz |
read-cache: teach make_cache_entry to take object_id
Teach make_cache_entry function to take object_id instead of a SHA-1.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/checkout.c | 2 | ||||
-rw-r--r-- | builtin/difftool.c | 4 | ||||
-rw-r--r-- | builtin/reset.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 2e1d2376d2..548bf40f25 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -230,7 +230,7 @@ static int checkout_merged(int pos, const struct checkout *state) if (write_object_file(result_buf.ptr, result_buf.size, blob_type, &oid)) die(_("Unable to add merge result for '%s'"), path); free(result_buf.ptr); - ce = make_cache_entry(mode, oid.hash, path, 2, 0); + ce = make_cache_entry(mode, &oid, path, 2, 0); if (!ce) die(_("make_cache_entry failed for path '%s'"), path); status = checkout_entry(ce, state, NULL); diff --git a/builtin/difftool.c b/builtin/difftool.c index bc97d4aef2..873a06f0d9 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -321,7 +321,7 @@ static int checkout_path(unsigned mode, struct object_id *oid, struct cache_entry *ce; int ret; - ce = make_cache_entry(mode, oid->hash, path, 0, 0); + ce = make_cache_entry(mode, oid, path, 0, 0); ret = checkout_entry(ce, state, NULL); free(ce); @@ -488,7 +488,7 @@ static int run_dir_diff(const char *extcmd, int symlinks, const char *prefix, * index. */ struct cache_entry *ce2 = - make_cache_entry(rmode, roid.hash, + make_cache_entry(rmode, &roid, dst_path, 0, 0); add_index_entry(&wtindex, ce2, diff --git a/builtin/reset.c b/builtin/reset.c index a862c70fab..00109b041f 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -134,7 +134,7 @@ static void update_index_from_diff(struct diff_queue_struct *q, continue; } - ce = make_cache_entry(one->mode, one->oid.hash, one->path, + ce = make_cache_entry(one->mode, &one->oid, one->path, 0, 0); if (!ce) die(_("make_cache_entry failed for path '%s'"), |