summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-11 20:04:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-11 20:04:33 (GMT)
commit6af984043f121d2f80aeb837c0b2259ad254a829 (patch)
tree892790852e26db212da6ec26f816795a74de5b97 /wt-status.c
parent3b8d2765c794ef1f1c7b39a90f72c4e61ce26fbd (diff)
parent3bed291a3b121408b4de83f4fa3cc0f1d98c676e (diff)
downloadgit-6af984043f121d2f80aeb837c0b2259ad254a829.zip
git-6af984043f121d2f80aeb837c0b2259ad254a829.tar.gz
git-6af984043f121d2f80aeb837c0b2259ad254a829.tar.bz2
Merge branch 'rr/rebase-checkout-reflog'
Invocations of "git checkout" used internally by "git rebase" were counted as "checkout", and affected later "git checkout -" to the the user to an unexpected place. * rr/rebase-checkout-reflog: checkout: respect GIT_REFLOG_ACTION status: do not depend on rebase reflog messages t/t2021-checkout-last: "checkout -" should work after a rebase finishes wt-status: remove unused field in grab_1st_switch_cbdata t7512: test "detached from" as well
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c
index b191c65..72db290 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1037,7 +1037,6 @@ got_nothing:
}
struct grab_1st_switch_cbdata {
- int found;
struct strbuf buf;
unsigned char nsha1[20];
};
@@ -1061,7 +1060,6 @@ static int grab_1st_switch(unsigned char *osha1, unsigned char *nsha1,
for (end = target; *end && *end != '\n'; end++)
;
strbuf_add(&cb->buf, target, end - target);
- cb->found = 1;
return 1;
}
@@ -1178,7 +1176,10 @@ void wt_status_print(struct wt_status *s)
branch_name += 11;
else if (!strcmp(branch_name, "HEAD")) {
branch_status_color = color(WT_STATUS_NOBRANCH, s);
- if (state.detached_from) {
+ if (state.rebase_in_progress || state.rebase_interactive_in_progress) {
+ on_what = _("rebase in progress; onto ");
+ branch_name = state.onto;
+ } else if (state.detached_from) {
unsigned char sha1[20];
branch_name = state.detached_from;
if (!get_sha1("HEAD", sha1) &&