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

[PATCH 1/7] t5541-http-push: check that ref is unchanged for non-ff test

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Feb 21, 2010, 03:08 UTC
Message-ID
<1266721708-1060-2-git-send-email-rctay89@gmail.com>
In-Reply-To
<1266721708-1060-1-git-send-email-rctay89@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 t/t5541-http-push.sh |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 53f54a2..ff947f3 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -89,15 +89,17 @@ test_expect_success 'used receive-pack service' '
 '
 
 test_expect_success 'non-fast-forward push fails' '
+	cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
+	HEAD=$(git rev-parse --verify HEAD) &&
+
 	cd "$ROOT_PATH"/test_repo_clone &&
 	git checkout master &&
 	echo "changed" > path2 &&
 	git commit -a -m path2 --amend &&
 
-	HEAD=$(git rev-parse --verify HEAD) &&
 	!(git push -v origin >output 2>&1) &&
 	(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&
-	 test $HEAD != $(git rev-parse --verify HEAD))
+	 test $HEAD = $(git rev-parse --verify HEAD))
 '
 
 test_expect_success 'non-fast-forward push show ref status' '
-- 
1.7.0.26.gbfa16
Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 2 of 13 in “http: minor improvements”
  1. 0/7 http: minor improvementsTay Ray Chuan, Feb 21, 2010
  2. 1/7 t5541-http-push: check that ref is unchanged for non-ff testTay Ray Chuan, Feb 21, 2010
  3. 2/7 t554[01]-http-push: refactor, add non-ff testsTay Ray Chuan, Feb 21, 2010
  4. 3/7 http-push: remove useless conditionTay Ray Chuan, Feb 21, 2010
  5. Clemens BuchacherFeb 21, 2010
  6. Tay Ray ChuanFeb 21, 2010
  7. 4/7 http-walker: cleanup more thoroughlyTay Ray Chuan, Feb 21, 2010
  8. 5/7 http: init and cleanup separately from http-walkerTay Ray Chuan, Feb 21, 2010
  9. Clemens BuchacherFeb 21, 2010
  10. Clemens BuchacherFeb 21, 2010
  11. Tay Ray ChuanFeb 21, 2010
  12. 6/7 remote-curl: use http_fetch_ref() instead of walker wrapperTay Ray Chuan, Feb 21, 2010
  13. 7/7 remote-curl: init walker only when neededTay Ray Chuan, Feb 21, 2010

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.