Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
status: factor two rebase-related messages together
author
Guillaume Pagès
<guillaume.pages@ensimag.grenoble-inp.fr>
Tue, 30 Jun 2015 13:01:12 +0000
(15:01 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 30 Jun 2015 18:12:30 +0000
(11:12 -0700)
Signed-off-by: Guillaume Pagès <guillaume.pages@ensimag.grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7974889
)
diff --git
a/wt-status.c
b/wt-status.c
index c56c78fb6f6947a61a1d54b15da53ad967cc7d38..9e0559c0c8c361ee12056ef183c83f095dea2eea 100644
(file)
--- a/
wt-status.c
+++ b/
wt-status.c
@@
-1026,6
+1026,20
@@
static int split_commit_in_progress(struct wt_status *s)
return split_in_progress;
}
return split_in_progress;
}
+static void print_rebase_state(struct wt_status *s,
+ struct wt_status_state *state,
+ const char *color)
+{
+ if (state->branch)
+ status_printf_ln(s, color,
+ _("You are currently rebasing branch '%s' on '%s'."),
+ state->branch,
+ state->onto);
+ else
+ status_printf_ln(s, color,
+ _("You are currently rebasing."));
+}
+
static void show_rebase_in_progress(struct wt_status *s,
struct wt_status_state *state,
const char *color)
static void show_rebase_in_progress(struct wt_status *s,
struct wt_status_state *state,
const char *color)
@@
-1033,14
+1047,7
@@
static void show_rebase_in_progress(struct wt_status *s,
struct stat st;
if (has_unmerged(s)) {
struct stat st;
if (has_unmerged(s)) {
- if (state->branch)
- status_printf_ln(s, color,
- _("You are currently rebasing branch '%s' on '%s'."),
- state->branch,
- state->onto);
- else
- status_printf_ln(s, color,
- _("You are currently rebasing."));
+ print_rebase_state(s, state, color);
if (s->hints) {
status_printf_ln(s, color,
_(" (fix conflicts and then run \"git rebase --continue\")"));
if (s->hints) {
status_printf_ln(s, color,
_(" (fix conflicts and then run \"git rebase --continue\")"));
@@
-1050,14
+1057,7
@@
static void show_rebase_in_progress(struct wt_status *s,
_(" (use \"git rebase --abort\" to check out the original branch)"));
}
} else if (state->rebase_in_progress || !stat(git_path("MERGE_MSG"), &st)) {
_(" (use \"git rebase --abort\" to check out the original branch)"));
}
} else if (state->rebase_in_progress || !stat(git_path("MERGE_MSG"), &st)) {
- if (state->branch)
- status_printf_ln(s, color,
- _("You are currently rebasing branch '%s' on '%s'."),
- state->branch,
- state->onto);
- else
- status_printf_ln(s, color,
- _("You are currently rebasing."));
+ print_rebase_state(s, state, color);
if (s->hints)
status_printf_ln(s, color,
_(" (all conflicts fixed: run \"git rebase --continue\")"));
if (s->hints)
status_printf_ln(s, color,
_(" (all conflicts fixed: run \"git rebase --continue\")"));