summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-03-20 11:00:12 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2016-03-20 11:00:12 +0100
commit60a194aa86d54ffb55c1abff8d0ef05647f936e8 (patch)
treef8312c890d8a5862d1d3ee705fe97fc0778f1bb2 /src/index.c
parentec5a43b60ab0dfcb42db8101edfca34be3d62947 (diff)
downloadlibgit2-60a194aa86d54ffb55c1abff8d0ef05647f936e8.tar.gz
tree: re-use the id and filename in the odb object
Instead of copying over the data into the individual entries, point to the originals, which are already in a format we can use.
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 62aacf959..63e47965a 100644
--- a/src/index.c
+++ b/src/index.c
@@ -2836,7 +2836,7 @@ static int read_tree_cb(
return -1;
entry->mode = tentry->attr;
- entry->id = tentry->oid;
+ git_oid_cpy(&entry->id, git_tree_entry_id(tentry));
/* look for corresponding old entry and copy data to new entry */
if (data->old_entries != NULL &&