Re: t5505-remote fails on Windows
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Mar 19, 2009, 07:20 UTC
- Message-ID
- <49C1F232.2090009@viscovery.net>
- In-Reply-To
- <20090319044313.GA341@coredump.intra.peff.net>
Jeff King schrieb:
Show 6 quoted lines
> I didn't look closely enough at your issue, which is one > ref pushing to two different places. For that, the sort needs to take > into account the util field, which holds the destination. > > The patch below probably fixes it, but as I can't actually reproduce > here, it is largely untested.
Your patch fixes it. The following change to the test case would be a good addition; it protects later tests from failures in earlier tests.
-- Hannes
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 5ec668d..13f32b8 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -160,7 +160,7 @@ cat > test/expect << EOF master pushes to another (up to date) EOF -test_expect_success 'show' ' +test_expect_success 'more setup for show' ' (cd test && git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream && git fetch && @@ -183,12 +183,20 @@ test_expect_success 'show' ' git config --add remote.origin.push refs/heads/master:refs/heads/upstream && git config --add remote.origin.push +refs/tags/lastbackup && git config --add remote.two.push +refs/heads/ahead:refs/heads/master && - git config --add remote.two.push refs/heads/master:refs/heads/another && + git config --add remote.two.push refs/heads/master:refs/heads/another) +' + +test_expect_success 'show' ' + (cd test && git remote show origin two > output && - git branch -d rebase octopus && test_cmp expect output) ' +test_expect_success 'more setup for show -n' ' + (cd test && + git branch -d rebase octopus) +' + cat > test/expect << EOF * remote origin URL: $(pwd)/one