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

[PATCH 2/3] remote-helpers: return successfully if everything up-to-date

From
Clemens Buchacher <drizzd@aon.at>
Date
Oct 25, 2009, 12:06 UTC
Message-ID
<1256472380-924-3-git-send-email-drizzd@aon.at>
In-Reply-To
<1256472380-924-2-git-send-email-drizzd@aon.at>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
 t/t5540-http-push.sh |    2 +-
 transport-helper.c   |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 09edd23..2ece661 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -58,7 +58,7 @@ test_expect_success 'push to remote repository with packed refs' '
 	 test $HEAD = $(git rev-parse --verify HEAD))
 '
 
-test_expect_failure 'push already up-to-date' '
+test_expect_success 'push already up-to-date' '
 	git push
 '
 
diff --git a/transport-helper.c b/transport-helper.c
index 16c6641..5078c71 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -263,6 +263,8 @@ static int push_refs(struct transport *transport,
 		strbuf_addstr(&buf, ref->name);
 		strbuf_addch(&buf, '\n');
 	}
+	if (buf.len == 0)
+		return 0;
 
 	transport->verbose = flags & TRANSPORT_PUSH_VERBOSE ? 1 : 0;
 	standard_options(transport);
-- 
1.6.5.35.ge41a3
Previous: Clemens BuchacherNext: Clemens Buchacher
Message 3 of 9 in “Smart HTTP tests”
  1. Clemens BuchacherOct 25, 2009
  2. 1/3 update http tests according to remote-curl capabilitiesClemens Buchacher, Oct 25, 2009
  3. 2/3 remote-helpers: return successfully if everything up-to-dateClemens Buchacher, Oct 25, 2009
  4. 3/3 add smart HTTP testsClemens Buchacher, Oct 25, 2009
  5. Shawn O. PearceOct 28, 2009
  6. t5540: test both smart and dumb protocolsClemens Buchacher, Oct 28, 2009
  7. Shawn O. PearceOct 28, 2009
  8. Junio C HamanoOct 28, 2009
  9. Shawn O. PearceOct 28, 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.