summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f26a001)
raw | patch | inline | side by side (parent: f26a001)
author | Kristian Høgsberg <krh@redhat.com> | |
Tue, 18 Sep 2007 00:06:43 +0000 (20:06 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Sep 2007 19:52:19 +0000 (12:52 -0700) |
We still default to get_index_file(), but this can be overridden
by setting wt_status.index_file after calling wt_status_prepare().
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
by setting wt_status.index_file after calling wt_status_prepare().
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c | patch | blob | history | |
wt-status.h | patch | blob | history |
diff --git a/wt-status.c b/wt-status.c
index eeb16915c2ef2f62379e0feb08cf9468ec3acf81..03b5ec4488cb25bca2f9d96493e874d7c12d3636 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
s->branch = head ? xstrdup(head) : NULL;
s->reference = "HEAD";
s->fp = stdout;
+ s->index_file = get_index_file();
}
static void wt_status_print_cached_header(struct wt_status *s)
static void wt_read_cache(struct wt_status *s)
{
discard_cache();
- read_cache();
+ read_cache_from(s->index_file);
}
static void wt_status_print_initial(struct wt_status *s)
diff --git a/wt-status.h b/wt-status.h
index 4f3a615c32bb15bd67cb0a467a7114453fc9a6f1..77449326dbec5c3f83559c300aec2922445829ef 100644 (file)
--- a/wt-status.h
+++ b/wt-status.h
int commitable;
int workdir_dirty;
int workdir_untracked;
+ const char *index_file;
FILE *fp;
};