git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 1/4] t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputs
Date: Fri, 30 Nov 2012 17:07:33 +0530	[thread overview]
Message-ID: <1354275456-11104-2-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1354275456-11104-1-git-send-email-artagnon@gmail.com>

The expected SHA-1 digests are always available in variables.  Use
them instead of hardcoding.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 t/t4041-diff-submodule-option.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index 57e8a9d..5377639 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -62,7 +62,7 @@ test_expect_success '--submodule=short overrides diff.submodule' "
 	cat >expected <<-EOF &&
 diff --git a/sm1 b/sm1
 new file mode 160000
-index 0000000..a2c4dab
+index 0000000..$head1
 --- /dev/null
 +++ b/sm1
 @@ -0,0 +1 @@
@@ -77,7 +77,7 @@ test_expect_success 'diff.submodule does not affect plumbing' '
 	cat >expected <<-EOF &&
 	diff --git a/sm1 b/sm1
 	new file mode 160000
-	index 0000000..a2c4dab
+	index 0000000..$head1
 	--- /dev/null
 	+++ b/sm1
 	@@ -0,0 +1 @@
@@ -173,10 +173,10 @@ mv sm1-bak sm1
 test_expect_success 'typechanged submodule(submodule->blob), --cached' "
 	git diff --submodule=log --cached >actual &&
 	cat >expected <<-EOF &&
-Submodule sm1 41fbea9...0000000 (submodule deleted)
+Submodule sm1 $head4...0000000 (submodule deleted)
 diff --git a/sm1 b/sm1
 new file mode 100644
-index 0000000..9da5fb8
+index 0000000..$head5
 --- /dev/null
 +++ b/sm1
 @@ -0,0 +1 @@
@@ -190,7 +190,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' "
 	cat >expected <<-EOF &&
 diff --git a/sm1 b/sm1
 deleted file mode 100644
-index 9da5fb8..0000000
+index $head5..0000000
 --- a/sm1
 +++ /dev/null
 @@ -1 +0,0 @@
-- 
1.7.8.1.362.g5d6df.dirty

  reply	other threads:[~2012-11-30 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 11:37 [PATCH v2 0/4] t4041 (diff-submodule-option): minor cleanup Ramkumar Ramachandra
2012-11-30 11:37 ` Ramkumar Ramachandra [this message]
2012-11-30 11:37 ` [PATCH v2 2/4] t4041 (diff-submodule-option): parse digests sensibly Ramkumar Ramachandra
2012-11-30 11:37 ` [PATCH v2 3/4] t4041 (diff-submodule-option): rewrite add_file() routine Ramkumar Ramachandra
2012-11-30 11:37 ` [PATCH v2 4/4] t4041 (diff-submodule-option): modernize style Ramkumar Ramachandra

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=1354275456-11104-2-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).