Skip to content

Commit 4a37727

Browse files
newrenchriscool
authored andcommitted
replay: remove progress and info output
The replay command will be changed in a follow up commit, so that it will not update refs directly, but instead it will print on stdout a list of commands that can be consumed by `git update-ref --stdin`. We don't want this output to be polluted by its current low value output, so let's just remove the latter. In the future, when the command gets an option to update refs by itself, it will make a lot of sense to display a progress meter, but we are not there yet. Co-authored-by: Christian Couder <[email protected]> Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 38283bc commit 4a37727

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

builtin/replay.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,14 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
232232

233233
init_merge_options(&merge_opt, the_repository);
234234
memset(&result, 0, sizeof(result));
235-
merge_opt.show_rename_progress = 1;
235+
merge_opt.show_rename_progress = 0;
236236
merge_opt.branch1 = "HEAD";
237237
head_tree = repo_get_commit_tree(the_repository, onto);
238238
result.tree = head_tree;
239239
last_commit = onto;
240240
while ((commit = get_revision(&revs))) {
241241
struct commit *pick;
242242

243-
fprintf(stderr, "Rebasing %s...\r",
244-
oid_to_hex(&commit->object.oid));
245-
246243
if (!commit->parents)
247244
die(_("replaying down to root commit is not supported yet!"));
248245
if (commit->parents->next)
@@ -261,7 +258,6 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
261258
exit(128);
262259

263260
if (result.clean) {
264-
fprintf(stderr, "\nDone.\n");
265261
strbuf_addf(&reflog_msg, "finish rebase %s onto %s",
266262
oid_to_hex(&last_picked_commit->object.oid),
267263
oid_to_hex(&last_commit->object.oid));
@@ -275,7 +271,6 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
275271
if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
276272
die(_("unable to update HEAD"));
277273
} else {
278-
fprintf(stderr, "\nAborting: Hit a conflict.\n");
279274
strbuf_addf(&reflog_msg, "rebase progress up to %s",
280275
oid_to_hex(&last_picked_commit->object.oid));
281276
if (update_ref(reflog_msg.buf, "HEAD",

0 commit comments

Comments
 (0)