summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-09-17 20:06:43 -0400
committerJunio C Hamano <gitster@pobox.com>2007-09-19 12:52:19 -0700
commit0f729f21348c43a1c80f48faed2e753b1c923e85 (patch)
tree54bd68cc0cd04e96a013f94fd18b50dd9dd26703 /wt-status.c
parentf26a0012262106e0c7e92d8d07f00611112d3a8d (diff)
downloadgit-0f729f21348c43a1c80f48faed2e753b1c923e85.tar.gz
Enable wt-status to run against non-standard index file.
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>
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wt-status.c b/wt-status.c
index eeb16915c2..03b5ec4488 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -53,6 +53,7 @@ void wt_status_prepare(struct wt_status *s)
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)
@@ -198,7 +199,7 @@ static void wt_status_print_changed_cb(struct diff_queue_struct *q,
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)