setup_temporary_shallow: avoid using inactive tempfile
[gitweb.git] / builtin / update-index.c
index 56721cf03db23a2f5a1b8e9419422df916d7b00f..d562f2ec69c28f9cecf7da07e71374ae9aecad93 100644 (file)
@@ -280,7 +280,7 @@ static int add_one_path(const struct cache_entry *old, const char *path, int len
        fill_stat_cache_info(ce, st);
        ce->ce_mode = ce_mode_from_stat(old, st->st_mode);
 
-       if (index_path(ce->oid.hash, path, st,
+       if (index_path(&ce->oid, path, st,
                       info_only ? 0 : HASH_WRITE_OBJECT)) {
                free(ce);
                return -1;