Commit 35df76bdd9536f1b02a04908871904da11292292

Pierre-Olivier Latour 2015-04-15T15:27:56

Use git_oid_cpy() instead of memcpy()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/diff.c b/src/diff.c
index f1bc28f..20f8f74 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -621,7 +621,7 @@ int git_diff__oid_for_entry(
 		git_index *idx;
 
 		if (!(error = git_repository_index__weakptr(&idx, diff->repo))) {
-			memcpy(&entry.id, out, sizeof(entry.id));
+			git_oid_cpy(&entry.id, out);
 			error = git_index_add(idx, &entry);
 		}
  	}