summaryrefslogtreecommitdiff
path: root/decorate.c
diff options
context:
space:
mode:
Diffstat (limited to 'decorate.c')
-rw-r--r--decorate.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/decorate.c b/decorate.c
index 7cb5d29a89..b2aac90c26 100644
--- a/decorate.c
+++ b/decorate.c
@@ -8,10 +8,7 @@
static unsigned int hash_obj(const struct object *obj, unsigned int n)
{
- unsigned int hash;
-
- memcpy(&hash, obj->sha1, sizeof(unsigned int));
- return hash % n;
+ return sha1hash(obj->sha1) % n;
}
static void *insert_decoration(struct decoration *n, const struct object *base, void *decoration)