From: Linus Torvalds Date: Sat, 21 Apr 2007 01:30:06 +0000 (-0700) Subject: Fix a copy-n-paste bug in the object decorator code. X-Git-Tag: v1.5.2-rc0~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a1a3dce3333950d16f78caf34b3bb2ac46ab4d4;p=git.git Fix a copy-n-paste bug in the object decorator code. Duh. When I did the object decorator thing, I made the "loop over the hash" function use the same logic for updating the hash, ie made them use if (++j >= size) j = 0; for both the hash update for both "insert" and "lookup" HOWEVER. For some inexplicable reason I had an extraneous j++; in the insert path (probably just from the fact that the old code there used j++; if (j >= size) j = 0; and when I made them use the same logic I just didn't remove the old extraneous line properly. This fixes it. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- diff --git a/decorate.c b/decorate.c index 396b41311..23f6b0040 100644 --- a/decorate.c +++ b/decorate.c @@ -24,7 +24,6 @@ static void *insert_decoration(struct decoration *n, struct object *base, void * hash[j].decoration = decoration; return old; } - j++; if (++j >= size) j = 0; }