summaryrefslogtreecommitdiff
path: root/builtin/hash-object.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 17:57:31 +0200
committerJunio C Hamano <gitster@pobox.com>2018-09-21 09:48:11 -0700
commit58bf2a4cc7a929d2fe0ff30eda86fcec54aef0f8 (patch)
tree14a33e0559d194d11f89ac2cdf61789db64dffcb /builtin/hash-object.c
parenta7edadda593e34243c1cd3b3db750d502acf9b83 (diff)
downloadgit-58bf2a4cc7a929d2fe0ff30eda86fcec54aef0f8.tar.gz
sha1-file.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/hash-object.c')
-rw-r--r--builtin/hash-object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 9ada4f4dfd..d6f06ea32f 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -40,7 +40,7 @@ static void hash_fd(int fd, const char *type, const char *path, unsigned flags,
if (fstat(fd, &st) < 0 ||
(literally
? hash_literally(&oid, fd, type, flags)
- : index_fd(&oid, fd, &st, type_from_string(type), path, flags)))
+ : index_fd(&the_index, &oid, fd, &st, type_from_string(type), path, flags)))
die((flags & HASH_WRITE_OBJECT)
? "Unable to add %s to database"
: "Unable to hash %s", path);