diff options
author | Jameson Miller <jamill@microsoft.com> | 2018-07-02 21:49:30 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 19:58:15 +0200 |
commit | 825ed4d9a044380ac093563e6bd74311ea4488ef (patch) | |
tree | fcfb270dee1a6d626b4f2d37cbc45ee3534b4b64 /read-cache.c | |
parent | read-cache: teach refresh_cache_entry to take istate (diff) | |
download | git-825ed4d9a044380ac093563e6bd74311ea4488ef.tar.xz git-825ed4d9a044380ac093563e6bd74311ea4488ef.zip |
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 'read-cache.c')
-rw-r--r-- | read-cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/read-cache.c b/read-cache.c index fa8366ecab..c12664c789 100644 --- a/read-cache.c +++ b/read-cache.c @@ -746,8 +746,10 @@ int add_file_to_index(struct index_state *istate, const char *path, int flags) } struct cache_entry *make_cache_entry(unsigned int mode, - const unsigned char *sha1, const char *path, int stage, - unsigned int refresh_options) + const struct object_id *oid, + const char *path, + int stage, + unsigned int refresh_options) { int size, len; struct cache_entry *ce, *ret; @@ -761,7 +763,7 @@ struct cache_entry *make_cache_entry(unsigned int mode, size = cache_entry_size(len); ce = xcalloc(1, size); - hashcpy(ce->oid.hash, sha1); + oidcpy(&ce->oid, oid); memcpy(ce->name, path, len); ce->ce_flags = create_ce_flags(stage); ce->ce_namelen = len; |