wt-status.c: make wt_status_check_rebase() work on any worktree

This is a preparation step for find_shared_symref() to detect if any
worktree is being rebased.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2016-04-22 20:01:31 +07:00
committed by Junio C Hamano
parent bcd522a149
commit 81eff27b0f
2 changed files with 24 additions and 14 deletions

View File

@@ -6,6 +6,8 @@
#include "color.h"
#include "pathspec.h"
struct worktree;
enum color_wt_status {
WT_STATUS_HEADER = 0,
WT_STATUS_UPDATED,
@@ -100,7 +102,8 @@ void wt_status_prepare(struct wt_status *s);
void wt_status_print(struct wt_status *s);
void wt_status_collect(struct wt_status *s);
void wt_status_get_state(struct wt_status_state *state, int get_detached_from);
int wt_status_check_rebase(struct wt_status_state *state);
int wt_status_check_rebase(const struct worktree *wt,
struct wt_status_state *state);
void wt_shortstatus_print(struct wt_status *s);
void wt_porcelain_print(struct wt_status *s);