Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/wt-status.c b/wt-status.c
index ef0fc4bb49..cb24f1fa9b 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -127,6 +127,7 @@ void wt_status_prepare(struct wt_status *s)
s->change.strdup_strings = 1;
s->untracked.strdup_strings = 1;
s->ignored.strdup_strings = 1;
+ s->show_branch = -1; /* unspecified */
}
static void wt_status_print_unmerged_header(struct wt_status *s)
@@ -371,7 +372,7 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q,
static int unmerged_mask(const char *path)
{
int pos, mask;
- struct cache_entry *ce;
+ const struct cache_entry *ce;
pos = cache_name_pos(path, strlen(path));
if (0 <= pos)
@@ -475,7 +476,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s)
for (i = 0; i < active_nr; i++) {
struct string_list_item *it;
struct wt_status_change_data *d;
- struct cache_entry *ce = active_cache[i];
+ const struct cache_entry *ce = active_cache[i];
if (!ce_path_match(ce, &pathspec))
continue;
@@ -825,7 +826,7 @@ static void show_am_in_progress(struct wt_status *s,
if (advice_status_hints) {
if (!state->am_empty_patch)
status_printf_ln(s, color,
- _(" (fix conflicts and then run \"git am --resolved\")"));
+ _(" (fix conflicts and then run \"git am --continue\")"));
status_printf_ln(s, color,
_(" (use \"git am --skip\" to skip this patch)"));
status_printf_ln(s, color,
@@ -954,10 +955,12 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
if (advice_status_hints) {
if (has_unmerged(s))
status_printf_ln(s, color,
- _(" (fix conflicts and run \"git commit\")"));
+ _(" (fix conflicts and run \"git cherry-pick --continue\")"));
else
status_printf_ln(s, color,
- _(" (all conflicts fixed: run \"git commit\")"));
+ _(" (all conflicts fixed: run \"git cherry-pick --continue\")"));
+ status_printf_ln(s, color,
+ _(" (use \"git cherry-pick --abort\" to cancel the cherry-pick operation)"));
}
wt_status_print_trailer(s);
}
@@ -1034,7 +1037,6 @@ got_nothing:
}
struct grab_1st_switch_cbdata {
- int found;
struct strbuf buf;
unsigned char nsha1[20];
};
@@ -1058,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;
}
@@ -1175,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) &&