git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: spearce@spearce.org
Cc: Mark Lodato <lodatom@gmail.com>,
	git@vger.kernel.org, Clemens Buchacher <drizzd@aon.at>
Subject: [PATCH 2/3] remote-helpers: return successfully if everything up-to-date
Date: Sun, 25 Oct 2009 13:06:19 +0100	[thread overview]
Message-ID: <1256472380-924-3-git-send-email-drizzd@aon.at> (raw)
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

  reply	other threads:[~2009-10-25 12:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-25 12:06 Smart HTTP tests Clemens Buchacher
2009-10-25 12:06 ` [PATCH 1/3] update http tests according to remote-curl capabilities Clemens Buchacher
2009-10-25 12:06   ` Clemens Buchacher [this message]
2009-10-25 12:06     ` [PATCH 3/3] add smart HTTP tests Clemens Buchacher
2009-10-28  0:17       ` Shawn O. Pearce
2009-10-28 17:52         ` [PATCH] t5540: test both smart and dumb protocols Clemens Buchacher
2009-10-28  0:11     ` [PATCH 2/3] remote-helpers: return successfully if everything up-to-date Shawn O. Pearce
2009-10-28  7:18       ` Junio C Hamano
2009-10-28  0:10   ` [PATCH 1/3] update http tests according to remote-curl capabilities Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256472380-924-3-git-send-email-drizzd@aon.at \
    --to=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=lodatom@gmail.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).