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 <chriscool@tuxfamily.org> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed Nov 24, 2023 at 12:10 UTC 4a37727626ae60c1e791c243679bc8d437052ee4
1 file changed +1 -6
builtin/replay.c
+1 -6
@@ -232,7 +232,7 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
232
233 init_merge_options(&merge_opt, the_repository);
234 memset(&result, 0, sizeof(result));
235 - merge_opt.show_rename_progress = 1;
235 + merge_opt.show_rename_progress = 0;
236 merge_opt.branch1 = "HEAD";
237 head_tree = repo_get_commit_tree(the_repository, onto);
238 result.tree = head_tree;
@@ -240,9 +240,6 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
240 while ((commit = get_revision(&revs))) {
241 struct commit *pick;
242
243 - fprintf(stderr, "Rebasing %s...\r",
244 - oid_to_hex(&commit->object.oid));
245 -
243 if (!commit->parents)
244 die(_("replaying down to root commit is not supported yet!"));
245 if (commit->parents->next)
@@ -261,7 +258,6 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
258 exit(128);
259
260 if (result.clean) {
264 - fprintf(stderr, "\nDone.\n");
261 strbuf_addf(&reflog_msg, "finish rebase %s onto %s",
262 oid_to_hex(&last_picked_commit->object.oid),
263 oid_to_hex(&last_commit->object.oid));
@@ -275,7 +271,6 @@ int cmd_replay(int argc, const char **argv, const char *prefix)
271 if (create_symref("HEAD", branch_name.buf, reflog_msg.buf) < 0)
272 die(_("unable to update HEAD"));
273 } else {
278 - fprintf(stderr, "\nAborting: Hit a conflict.\n");
274 strbuf_addf(&reflog_msg, "rebase progress up to %s",
275 oid_to_hex(&last_picked_commit->object.oid));
276 if (update_ref(reflog_msg.buf, "HEAD",