* [PATCH 07/19] migrate merge-cache.c over to the new cache api's
@ 2005-04-21 18:36 Brad Roberts
0 siblings, 0 replies; only message in thread
From: Brad Roberts @ 2005-04-21 18:36 UTC (permalink / raw)
To: git
tree 8140acee0f9c57bfd87f40d1f99242c772afcdf2
parent 32efd81a3292a923ce5b5ae2e39ffefd0b08664d
author Brad Roberts <braddr@puremagic.com> 1114074631 -0700
committer Brad Roberts <braddr@gameboy2.puremagic.com> 1114074631 -0700
[PATCH] migrate merge-cache.c over to the new cache api's
Signed-off-by: Brad Roberts <braddr@puremagic.com>
---
merge-cache.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Index: merge-cache.c
===================================================================
--- 32efd81a3292a923ce5b5ae2e39ffefd0b08664d:1/merge-cache.c (mode:100644 sha1:35a0d588178aa5371399458b1a15519cffd645b8)
+++ e2acfff5e544a8c6769a9e665927092b3edd7579:1/merge-cache.c (mode:100644 sha1:c2f96e7652a2aea9417c3790bfe9ab14ffcdb12f)
@@ -30,7 +30,7 @@
{
int found;
- if (pos >= active_nr)
+ if (pos >= get_num_cache_entries())
die("merge-cache: %s not in the cache", path);
arguments[0] = pgm;
arguments[1] = "";
@@ -40,7 +40,7 @@
found = 0;
do {
static char hexbuf[4][60];
- struct cache_entry *ce = active_cache[pos];
+ struct cache_entry *ce = get_cache_entry(pos);
int stage = ce_stage(ce);
if (strcmp(ce->name, path))
@@ -48,7 +48,7 @@
found++;
strcpy(hexbuf[stage], sha1_to_hex(ce->sha1));
arguments[stage] = hexbuf[stage];
- } while (++pos < active_nr);
+ } while (++pos < get_num_cache_entries());
if (!found)
die("merge-cache: %s not in the cache", path);
run_program();
@@ -70,8 +70,8 @@
static void merge_all(void)
{
int i;
- for (i = 0; i < active_nr; i++) {
- struct cache_entry *ce = active_cache[i];
+ for (i = 0; i < get_num_cache_entries(); i++) {
+ struct cache_entry *ce = get_cache_entry(i);
if (!ce_stage(ce))
continue;
i += merge_entry(i, ce->name)-1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-21 18:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-21 18:36 [PATCH 07/19] migrate merge-cache.c over to the new cache api's Brad Roberts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox