tree 8140acee0f9c57bfd87f40d1f99242c772afcdf2
parent 32efd81a3292a923ce5b5ae2e39ffefd0b08664d
author Brad Roberts <[EMAIL PROTECTED]> 1114074631 -0700
committer Brad Roberts <[EMAIL PROTECTED]> 1114074631 -0700

[PATCH] migrate merge-cache.c over to the new cache api's

Signed-off-by: Brad Roberts <[EMAIL PROTECTED]>
---

 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;

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to