{"thread":{"id":"11625","subject":"[PATCH] Squelch bogus progress output from git-rebase--interactive","startedAt":"2008-01-15T04:04:31Z","lastAt":"2008-01-15T11:22:59Z","messageCount":2,"participants":["Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"65357","messageId":"7v3aszivjk.fsf@gitster.siamese.dyndns.org","threadId":"11625","inReplyTo":null,"subject":"[PATCH] Squelch bogus progress output from git-rebase--interactive","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-01-15T04:04:31Z","receivedAt":"2008-01-15T04:04:31Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The command repeats \"Rebasing (1/1)\" many times even when\nthere is only one task remaining, because mark_action_done() is\ncalled to skip comment and empty lines in the TODO file.\n\nThis should fix it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-rebase--interactive.sh |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex acdcc54..402ff37 100755\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -73,14 +73,19 @@ comment_for_reflog () {\n \tesac\n }\n \n+last_count=\n mark_action_done () {\n \tsed -e 1q < \"$TODO\" >> \"$DONE\"\n \tsed -e 1d < \"$TODO\" >> \"$TODO\".new\n \tmv -f \"$TODO\".new \"$TODO\"\n \tcount=$(($(grep -ve '^$' -e '^#' < \"$DONE\" | wc -l)))\n \ttotal=$(($count+$(grep -ve '^$' -e '^#' < \"$TODO\" | wc -l)))\n-\tprintf \"Rebasing (%d/%d)\\r\" $count $total\n-\ttest -z \"$VERBOSE\" || echo\n+\tif test \"$last_count\" != \"$count\"\n+\tthen\n+\t\tlast_count=$count\n+\t\tprintf \"Rebasing (%d/%d)\\r\" $count $total\n+\t\ttest -z \"$VERBOSE\" || echo\n+\tfi\n }\n \n make_patch () {\n-- \n1.5.4.rc3.10.g471a\n"},{"id":"65374","messageId":"alpine.DEB.1.00.0801151122450.5289@eeepc-johanness","threadId":"11625","inReplyTo":"7v3aszivjk.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Squelch bogus progress output from git-rebase--interactive","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-15T11:22:59Z","receivedAt":"2008-01-15T11:22:59Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 14 Jan 2008, Junio C Hamano wrote:\n\n> The command repeats \"Rebasing (1/1)\" many times even when\n> there is only one task remaining, because mark_action_done() is\n> called to skip comment and empty lines in the TODO file.\n> \n> This should fix it.\n\nYes, it should.\n\nThanks,\nDscho\n"}]}