wt-status: refactor detached HEAD analysis
wt_status_print() is the only caller of wt_status_get_detached_from(). The latter performs most of the analysis of a detached HEAD, including finding state->detached_from; the caller checks whether the detached HEAD is still at state->detached_from or has moved away. Move that last bit of analysis to wt_status_get_detached_from(), too, and store the boolean result in state->detached_at. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
9874fca712
commit
970399e74c
@@ -84,6 +84,7 @@ struct wt_status_state {
|
||||
int cherry_pick_in_progress;
|
||||
int bisect_in_progress;
|
||||
int revert_in_progress;
|
||||
int detached_at;
|
||||
char *branch;
|
||||
char *onto;
|
||||
char *detached_from;
|
||||
|
||||
Reference in New Issue
Block a user