Merge branch 'ks/branch-list-detached-rebase-i'
"git branch --list" during an interrupted "rebase -i" now lets users distinguish the case where a detached HEAD is being rebased and a normal branch is being rebased. * ks/branch-list-detached-rebase-i: t3200: verify "branch --list" sanity when rebasing from detached HEAD branch --list: print useful info whilst interactive rebasing a detached HEAD
This commit is contained in:
12
ref-filter.c
12
ref-filter.c
@ -1309,10 +1309,14 @@ char *get_head_description(void)
|
||||
memset(&state, 0, sizeof(state));
|
||||
wt_status_get_state(&state, 1);
|
||||
if (state.rebase_in_progress ||
|
||||
state.rebase_interactive_in_progress)
|
||||
strbuf_addf(&desc, _("(no branch, rebasing %s)"),
|
||||
state.branch);
|
||||
else if (state.bisect_in_progress)
|
||||
state.rebase_interactive_in_progress) {
|
||||
if (state.branch)
|
||||
strbuf_addf(&desc, _("(no branch, rebasing %s)"),
|
||||
state.branch);
|
||||
else
|
||||
strbuf_addf(&desc, _("(no branch, rebasing detached HEAD %s)"),
|
||||
state.detached_from);
|
||||
} else if (state.bisect_in_progress)
|
||||
strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
|
||||
state.branch);
|
||||
else if (state.detached_from) {
|
||||
|
||||
Reference in New Issue
Block a user