git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t3501: check that commits are actually done

From
Stephan Beyer <s-beyer@gmx.net>
Date
Jan 15, 2009, 13:03 UTC
Message-ID
<1232024597-16728-1-git-send-email-s-beyer@gmx.net>

The basic idea of t3501 is to check whether revert and cherry-pick works on renamed files. But as there is no pure cherry-pick/revert test, it is good to also check if commits are actually done in that scenario.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
	This patch was originally motivated because of a bug that
	I introduced in my repo while hacking on cherry-pick/revert.
	None of the cherry-pick test cases failed, so I thought
	this tiny addition is useful.
 t/t3501-revert-cherry-pick.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh
index 6da2128..bb4cf00 100755
--- a/t/t3501-revert-cherry-pick.sh
+++ b/t/t3501-revert-cherry-pick.sh
@@ -45,6 +45,7 @@ test_expect_success 'cherry-pick after renaming branch' '
 
 	git checkout rename2 &&
 	git cherry-pick added &&
+	test $(git rev-parse HEAD^) = $(git rev-parse rename2) &&
 	test -f opos &&
 	grep "Add extra line at the end" opos
 
@@ -54,6 +55,7 @@ test_expect_success 'revert after renaming branch' '
 
 	git checkout rename1 &&
 	git revert added &&
+	test $(git rev-parse HEAD^) = $(git rev-parse rename1) &&
 	test -f spoo &&
 	! grep "Add extra line at the end" spoo
 
-- 
1.6.1.160.gecdb
Message 1 of 1 in “t3501: check that commits are actually done”
  1. t3501: check that commits are actually doneStephan Beyer, Jan 15, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.