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:
authorJunio C Hamano <gitster@pobox.com>2019-07-10 01:25:45 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-10 01:25:45 +0300
commit6624e07b36c97e04ba68c8310a70bc69433e187e (patch)
tree8581bf4a6011e865729a154f5bb0ded87e05d6ac /sequencer.c
parent88176b7023efc5c147539791610f58d671fe1978 (diff)
parent5b12e3123b7b70e3875404a4ffe571ca079364fe (diff)
Merge branch 'sg/rebase-progress'
Use "Erase in Line" CSI sequence that is already used in the editor support to clear cruft in the progress output. * sg/rebase-progress: progress: use term_clear_line() rebase: fix garbled progress display with '-x' pager: add a helper function to clear the last line in the terminal t3404: make the 'rebase.missingCommitsCheck=ignore' test more focused t3404: modernize here doc style
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index 74a7a47d01..cf262701e8 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3741,8 +3741,11 @@ static int pick_commits(struct repository *r,
unlink(git_path_merge_head(the_repository));
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
- if (item->command == TODO_BREAK)
+ if (item->command == TODO_BREAK) {
+ if (!opts->verbose)
+ term_clear_line();
return stopped_at_head(r);
+ }
}
if (item->command <= TODO_SQUASH) {
if (is_rebase_i(opts))
@@ -3764,11 +3767,14 @@ static int pick_commits(struct repository *r,
}
if (item->command == TODO_EDIT) {
struct commit *commit = item->commit;
- if (!res)
+ if (!res) {
+ if (!opts->verbose)
+ term_clear_line();
fprintf(stderr,
_("Stopped at %s... %.*s\n"),
short_commit_name(commit),
item->arg_len, arg);
+ }
return error_with_patch(r, commit,
arg, item->arg_len, opts, res, !res);
}
@@ -3806,6 +3812,8 @@ static int pick_commits(struct repository *r,
int saved = *end_of_arg;
struct stat st;
+ if (!opts->verbose)
+ term_clear_line();
*end_of_arg = '\0';
res = do_exec(r, arg);
*end_of_arg = saved;
@@ -3964,10 +3972,13 @@ cleanup_head_ref:
}
apply_autostash(opts);
- if (!opts->quiet)
+ if (!opts->quiet) {
+ if (!opts->verbose)
+ term_clear_line();
fprintf(stderr,
"Successfully rebased and updated %s.\n",
head_ref.buf);
+ }
strbuf_release(&buf);
strbuf_release(&head_ref);