{"thread":{"id":"215","subject":"[PATCH 07/19] migrate merge-cache.c over to the new cache api's","startedAt":"2005-04-21T18:36:14Z","lastAt":"2005-04-21T18:36:14Z","messageCount":1,"participants":["Brad Roberts"],"isPatch":true,"patchVersion":1,"patchTotal":19},"messages":[{"id":"1164","messageId":"200504211836.j3LIaEUV027527@gameboy2.puremagic.com","threadId":"215","inReplyTo":null,"subject":"[PATCH 07/19] migrate merge-cache.c over to the new cache api's","fromName":"Brad Roberts","fromEmail":"braddr@gameboy2.puremagic.com","sentAt":"2005-04-21T18:36:14Z","receivedAt":"2005-04-21T18:36:14Z","isPatch":true,"sender":{"key":"braddr@gameboy2.puremagic.com","avatar":null},"body":"tree 8140acee0f9c57bfd87f40d1f99242c772afcdf2\nparent 32efd81a3292a923ce5b5ae2e39ffefd0b08664d\nauthor Brad Roberts <braddr@puremagic.com> 1114074631 -0700\ncommitter Brad Roberts <braddr@gameboy2.puremagic.com> 1114074631 -0700\n\n[PATCH] migrate merge-cache.c over to the new cache api's\n\nSigned-off-by: Brad Roberts <braddr@puremagic.com>\n---\n\n merge-cache.c |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\nIndex: merge-cache.c\n===================================================================\n--- 32efd81a3292a923ce5b5ae2e39ffefd0b08664d:1/merge-cache.c  (mode:100644 sha1:35a0d588178aa5371399458b1a15519cffd645b8)\n+++ e2acfff5e544a8c6769a9e665927092b3edd7579:1/merge-cache.c  (mode:100644 sha1:c2f96e7652a2aea9417c3790bfe9ab14ffcdb12f)\n@@ -30,7 +30,7 @@\n {\n \tint found;\n \t\n-\tif (pos >= active_nr)\n+\tif (pos >= get_num_cache_entries())\n \t\tdie(\"merge-cache: %s not in the cache\", path);\n \targuments[0] = pgm;\n \targuments[1] = \"\";\n@@ -40,7 +40,7 @@\n \tfound = 0;\n \tdo {\n \t\tstatic char hexbuf[4][60];\n-\t\tstruct cache_entry *ce = active_cache[pos];\n+\t\tstruct cache_entry *ce = get_cache_entry(pos);\n \t\tint stage = ce_stage(ce);\n \n \t\tif (strcmp(ce->name, path))\n@@ -48,7 +48,7 @@\n \t\tfound++;\n \t\tstrcpy(hexbuf[stage], sha1_to_hex(ce->sha1));\n \t\targuments[stage] = hexbuf[stage];\n-\t} while (++pos < active_nr);\n+\t} while (++pos < get_num_cache_entries());\n \tif (!found)\n \t\tdie(\"merge-cache: %s not in the cache\", path);\n \trun_program();\n@@ -70,8 +70,8 @@\n static void merge_all(void)\n {\n \tint i;\n-\tfor (i = 0; i < active_nr; i++) {\n-\t\tstruct cache_entry *ce = active_cache[i];\n+\tfor (i = 0; i < get_num_cache_entries(); i++) {\n+\t\tstruct cache_entry *ce = get_cache_entry(i);\n \t\tif (!ce_stage(ce))\n \t\t\tcontinue;\n \t\ti += merge_entry(i, ce->name)-1;\n\n"}]}