@matheusbsbs / matheus-bagliano / commits / 130ab8ab9c
Fork 0

Eliminate “Finished cherry-pick/revert” message

When cherry-pick was written (v0.99.6~63, 2005-08-27), “git commit” was quiet, and the output from cherry-pick provided useful information about the progress of a rebase. Now next to the output from “git commit”, the cherry-pick notification is so much noise (except for the name of the picked commit). $ git cherry-pick ..topic Finished cherry-pick of 499088b. [detached HEAD 17e1ff2] Move glob module to libdpkg Author: Guillem Jover <guillem@debian.org> 8 files changed, 12 insertions(+), 9 deletions(-) rename {src => lib/dpkg}/glob.c (98%) rename {src => lib/dpkg}/glob.h (93%) Finished cherry-pick of ae947e1. [detached HEAD 058caa3] libdpkg: Add missing symbols to Versions script Author: Guillem Jover <guillem@debian.org> 1 files changed, 2 insertions(+), 0 deletions(-) $ The noise is especially troublesome when sifting through the output of a rebase or multiple cherry-pick that eventually failed. With the commit subject, it is already not hard to figure out where the commit came from. So drop the “Finished” message. Cc: Christian Couder <chriscool@tuxfamily.org> Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Aug 11, 2010 at 03:36 UTC 130ab8ab9c64b59b367c08a041200b6b75758b91
4 files changed +30 -21
Documentation/howto/revert-branch-rebase.txt
-6
@@ -112,25 +112,19 @@ $ git tag pu-anchor pu
112 $ git rebase master
113 * Applying: Redo "revert" using three-way merge machinery.
114 First trying simple merge strategy to cherry-pick.
115 -Finished one cherry-pick.
115 * Applying: Remove git-apply-patch-script.
116 First trying simple merge strategy to cherry-pick.
117 Simple cherry-pick fails; trying Automatic cherry-pick.
118 Removing Documentation/git-apply-patch-script.txt
119 Removing git-apply-patch-script
121 -Finished one cherry-pick.
120 * Applying: Document "git cherry-pick" and "git revert"
121 First trying simple merge strategy to cherry-pick.
124 -Finished one cherry-pick.
122 * Applying: mailinfo and applymbox updates
123 First trying simple merge strategy to cherry-pick.
127 -Finished one cherry-pick.
124 * Applying: Show commits in topo order and name all commits.
125 First trying simple merge strategy to cherry-pick.
130 -Finished one cherry-pick.
126 * Applying: More documentation updates.
127 First trying simple merge strategy to cherry-pick.
133 -Finished one cherry-pick.
128 ------------------------------------------------
129
130 The temporary tag 'pu-anchor' is me just being careful, in case 'git
builtin/revert.c
-2
@@ -521,8 +521,6 @@ static int do_pick_commit(void)
521 } else {
522 if (!no_commit)
523 res = run_git_commit(defmsg);
524 - if (!res)
525 - fprintf(stderr, "Finished %s.\n", mebuf.buf);
524 }
525
526 strbuf_release(&mebuf);
contrib/examples/git-revert.sh
-1
@@ -181,7 +181,6 @@ Conflicts:
181 esac
182 exit 1
183 }
184 -echo >&2 "Finished one $me."
184
185 # If we are cherry-pick, and if the merge did not result in
186 # hand-editing, we will hit this commit and inherit the original
t/t3508-cherry-pick-many-commits.sh
+30 -12
@@ -35,36 +35,54 @@ test_expect_success setup '
35 '
36
37 test_expect_success 'cherry-pick first..fourth works' '
38 - cat <<-EOF >expected &&
39 - Finished cherry-pick of commit $(git rev-parse --short second).
40 - Finished cherry-pick of commit $(git rev-parse --short third).
41 - Finished cherry-pick of commit $(git rev-parse --short fourth).
38 + cat <<-\EOF >expected &&
39 + [master OBJID] second
40 + Author: A U Thor <author@example.com>
41 + 1 files changed, 1 insertions(+), 0 deletions(-)
42 + [master OBJID] third
43 + Author: A U Thor <author@example.com>
44 + 1 files changed, 1 insertions(+), 0 deletions(-)
45 + [master OBJID] fourth
46 + Author: A U Thor <author@example.com>
47 + 1 files changed, 1 insertions(+), 0 deletions(-)
48 EOF
49
50 git checkout -f master &&
51 git reset --hard first &&
52 test_tick &&
47 - git cherry-pick first..fourth 2>actual &&
53 + git cherry-pick first..fourth >actual &&
54 git diff --quiet other &&
55 git diff --quiet HEAD other &&
50 - test_cmp expected actual &&
56 +
57 + sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
58 + test_cmp expected actual.fuzzy &&
59 check_head_differs_from fourth
60 '
61
62 test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
55 - cat <<-EOF >expected &&
56 - Finished cherry-pick of commit $(git rev-parse --short second) with strategy resolve.
57 - Finished cherry-pick of commit $(git rev-parse --short third) with strategy resolve.
58 - Finished cherry-pick of commit $(git rev-parse --short fourth) with strategy resolve.
63 + cat <<-\EOF >expected &&
64 + Trying simple merge.
65 + [master OBJID] second
66 + Author: A U Thor <author@example.com>
67 + 1 files changed, 1 insertions(+), 0 deletions(-)
68 + Trying simple merge.
69 + [master OBJID] third
70 + Author: A U Thor <author@example.com>
71 + 1 files changed, 1 insertions(+), 0 deletions(-)
72 + Trying simple merge.
73 + [master OBJID] fourth
74 + Author: A U Thor <author@example.com>
75 + 1 files changed, 1 insertions(+), 0 deletions(-)
76 EOF
77
78 git checkout -f master &&
79 git reset --hard first &&
80 test_tick &&
64 - git cherry-pick --strategy resolve first..fourth 2>actual &&
81 + git cherry-pick --strategy resolve first..fourth >actual &&
82 git diff --quiet other &&
83 git diff --quiet HEAD other &&
67 - test_cmp expected actual &&
84 + sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
85 + test_cmp expected actual.fuzzy &&
86 check_head_differs_from fourth
87 '
88