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:
-rw-r--r--Documentation/howto/revert-branch-rebase.txt6
-rw-r--r--builtin/revert.c2
-rwxr-xr-xcontrib/examples/git-revert.sh1
-rwxr-xr-xt/t3508-cherry-pick-many-commits.sh42
4 files changed, 30 insertions, 21 deletions
diff --git a/Documentation/howto/revert-branch-rebase.txt b/Documentation/howto/revert-branch-rebase.txt
index 8c32da6deb..093c656048 100644
--- a/Documentation/howto/revert-branch-rebase.txt
+++ b/Documentation/howto/revert-branch-rebase.txt
@@ -112,25 +112,19 @@ $ git tag pu-anchor pu
$ git rebase master
* Applying: Redo "revert" using three-way merge machinery.
First trying simple merge strategy to cherry-pick.
-Finished one cherry-pick.
* Applying: Remove git-apply-patch-script.
First trying simple merge strategy to cherry-pick.
Simple cherry-pick fails; trying Automatic cherry-pick.
Removing Documentation/git-apply-patch-script.txt
Removing git-apply-patch-script
-Finished one cherry-pick.
* Applying: Document "git cherry-pick" and "git revert"
First trying simple merge strategy to cherry-pick.
-Finished one cherry-pick.
* Applying: mailinfo and applymbox updates
First trying simple merge strategy to cherry-pick.
-Finished one cherry-pick.
* Applying: Show commits in topo order and name all commits.
First trying simple merge strategy to cherry-pick.
-Finished one cherry-pick.
* Applying: More documentation updates.
First trying simple merge strategy to cherry-pick.
-Finished one cherry-pick.
------------------------------------------------
The temporary tag 'pu-anchor' is me just being careful, in case 'git
diff --git a/builtin/revert.c b/builtin/revert.c
index e261fb2391..c3d64af02d 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -521,8 +521,6 @@ static int do_pick_commit(void)
} else {
if (!no_commit)
res = run_git_commit(defmsg);
- if (!res)
- fprintf(stderr, "Finished %s.\n", mebuf.buf);
}
strbuf_release(&mebuf);
diff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh
index 49f00321b2..60a05a8b97 100755
--- a/contrib/examples/git-revert.sh
+++ b/contrib/examples/git-revert.sh
@@ -181,7 +181,6 @@ Conflicts:
esac
exit 1
}
-echo >&2 "Finished one $me."
# If we are cherry-pick, and if the merge did not result in
# hand-editing, we will hit this commit and inherit the original
diff --git a/t/t3508-cherry-pick-many-commits.sh b/t/t3508-cherry-pick-many-commits.sh
index 0f61495b2c..8e09fd0319 100755
--- a/t/t3508-cherry-pick-many-commits.sh
+++ b/t/t3508-cherry-pick-many-commits.sh
@@ -35,36 +35,54 @@ test_expect_success setup '
'
test_expect_success 'cherry-pick first..fourth works' '
- cat <<-EOF >expected &&
- Finished cherry-pick of commit $(git rev-parse --short second).
- Finished cherry-pick of commit $(git rev-parse --short third).
- Finished cherry-pick of commit $(git rev-parse --short fourth).
+ cat <<-\EOF >expected &&
+ [master OBJID] second
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ [master OBJID] third
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ [master OBJID] fourth
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
EOF
git checkout -f master &&
git reset --hard first &&
test_tick &&
- git cherry-pick first..fourth 2>actual &&
+ git cherry-pick first..fourth >actual &&
git diff --quiet other &&
git diff --quiet HEAD other &&
- test_cmp expected actual &&
+
+ sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
+ test_cmp expected actual.fuzzy &&
check_head_differs_from fourth
'
test_expect_success 'cherry-pick --strategy resolve first..fourth works' '
- cat <<-EOF >expected &&
- Finished cherry-pick of commit $(git rev-parse --short second) with strategy resolve.
- Finished cherry-pick of commit $(git rev-parse --short third) with strategy resolve.
- Finished cherry-pick of commit $(git rev-parse --short fourth) with strategy resolve.
+ cat <<-\EOF >expected &&
+ Trying simple merge.
+ [master OBJID] second
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ Trying simple merge.
+ [master OBJID] third
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ Trying simple merge.
+ [master OBJID] fourth
+ Author: A U Thor <author@example.com>
+ 1 files changed, 1 insertions(+), 0 deletions(-)
EOF
git checkout -f master &&
git reset --hard first &&
test_tick &&
- git cherry-pick --strategy resolve first..fourth 2>actual &&
+ git cherry-pick --strategy resolve first..fourth >actual &&
git diff --quiet other &&
git diff --quiet HEAD other &&
- test_cmp expected actual &&
+ sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
+ test_cmp expected actual.fuzzy &&
check_head_differs_from fourth
'