diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-08-16 13:05:05 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-08-18 02:34:10 +0200 |
| commit | c85e08b1bda30c1a7e0a6e804f81665047fd8005 (patch) | |
| tree | 4a30079c545060954773c4302d347ec75b5a2138 /src/indexer.c | |
| parent | 7adba5f49c5520f591c4e6519c5bea770a3e4b5d (diff) | |
| download | libgit2-c85e08b1bda30c1a7e0a6e804f81665047fd8005.tar.gz | |
odb: Do not pass around a header when hashing
Diffstat (limited to 'src/indexer.c')
| -rw-r--r-- | src/indexer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/indexer.c b/src/indexer.c index 23556a3c2..bef62a23d 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -322,8 +322,7 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats) git_oid oid; struct git_pack_entry *pentry; git_mwindow *w = NULL; - char hdr[512] = {0}; /* FIXME: How long should this be? */ - int i, hdr_len; + int i; off_t entry_start = off; void *packed; size_t entry_size; @@ -345,7 +344,7 @@ int git_indexer_run(git_indexer *idx, git_indexer_stats *stats) } /* FIXME: Parse the object instead of hashing it */ - error = git_odb__hash_obj(&oid, hdr, sizeof(hdr), &hdr_len, &obj); + error = git_odb__hash_obj(&oid, &obj); if (error < GIT_SUCCESS) { error = git__rethrow(error, "Failed to hash object"); goto cleanup; |
