From: Charles Bailey <charles@hashpling.org>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: [PATCH 3/3] contrib/subtree: Small tidy-up to test
Date: Mon, 22 Jun 2015 14:53:30 +0100 [thread overview]
Message-ID: <1434981210-13036-3-git-send-email-charles@hashpling.org> (raw)
In-Reply-To: <1434981210-13036-1-git-send-email-charles@hashpling.org>
From: Charles Bailey <cbailey32@bloomberg.net>
There's no need to switch branches to parse another branch's ancestry.
Signed-off-by: Charles Bailey <cbailey32@bloomberg.net>
---
contrib/subtree/t/t7900-subtree.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 001c604..bd3df97 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -221,9 +221,7 @@ test_expect_success 'check hash of split' '
spl1=$(git subtree split --prefix subdir) &&
git subtree split --prefix subdir --branch splitbr1test &&
check_equal ''"$(git rev-parse splitbr1test)"'' "$spl1" &&
- git checkout splitbr1test &&
- new_hash=$(git rev-parse HEAD~2) &&
- git checkout mainline &&
+ new_hash=$(git rev-parse splitbr1test~2) &&
check_equal ''"$new_hash"'' "$subdir_hash"
'
--
2.4.0.53.g8440f74
next prev parent reply other threads:[~2015-06-22 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 13:53 [PATCH 1/3] contrib/subtree: Use tabs consitently for indentation in tests Charles Bailey
2015-06-22 13:53 ` [PATCH 2/3] contrib/subtree: Fix broken &&-chains and revealed test error Charles Bailey
2015-06-22 13:53 ` Charles Bailey [this message]
2015-06-22 22:42 ` [PATCH 1/3] contrib/subtree: Use tabs consitently for indentation in tests Eric Sunshine
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=1434981210-13036-3-git-send-email-charles@hashpling.org \
--to=charles@hashpling.org \
--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).