git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Cc: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Subject: [PATCH] t3407: make reflog check stricter
Date: Sun, 21 Nov 2010 20:20:34 +0100	[thread overview]
Message-ID: <1290367234-8206-1-git-send-email-martin.von.zweigbergk@gmail.com> (raw)
In-Reply-To: <1290337881-26449-1-git-send-email-martin.von.zweigbergk@gmail.com>

---
This is hopefully an improvement to the test case. Please squash with
previous patch if you agree.

 t/t3407-rebase-abort.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/t3407-rebase-abort.sh b/t/t3407-rebase-abort.sh
index f3250c3..e573dc8 100755
--- a/t/t3407-rebase-abort.sh
+++ b/t/t3407-rebase-abort.sh
@@ -77,11 +77,12 @@ testrebase() {
 		cd "$work_dir" &&
 		# Clean up the state from the previous one
 		git reset --hard pre-rebase &&
-		reflog_entries_before=$(git reflog show to-rebase | wc -l) &&
+		git reflog show to-rebase > reflog_before &&
 		test_must_fail git rebase$type master &&
 		git rebase --abort &&
-		reflog_entries_after=$(git reflog show to-rebase | wc -l) &&
-		test $reflog_entries_before -eq $reflog_entries_after
+		git reflog show to-rebase > reflog_after &&
+		test_cmp reflog_before reflog_after &&
+		rm reflog_before reflog_after
 	'
 }
 
-- 
1.7.3.2.190.gfb4ae

  reply	other threads:[~2010-11-22  1:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 11:11 [PATCH] rebase --abort: do not update branch ref Martin von Zweigbergk
2010-11-21 19:20 ` Martin von Zweigbergk [this message]
2010-11-22  3:11 ` Junio C Hamano
2010-11-22 12:23   ` Martin von Zweigbergk

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=1290367234-8206-1-git-send-email-martin.von.zweigbergk@gmail.com \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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).