From: Brad Roberts <braddr@gameboy2.puremagic.com>
To: git@vger.kernel.org
Subject: [PATCH 07/19] migrate merge-cache.c over to the new cache api's
Date: Thu, 21 Apr 2005 11:36:14 -0700 [thread overview]
Message-ID: <200504211836.j3LIaEUV027527@gameboy2.puremagic.com> (raw)
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;
reply other threads:[~2005-04-21 18:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200504211836.j3LIaEUV027527@gameboy2.puremagic.com \
--to=braddr@gameboy2.puremagic.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox