0
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â523_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ     ‹      Õ•QoÚ0Çßû)<?ì.�®U©ã©#HC£€(Õ4MÓäÄ†XMldûôsH´*[§mZ÷äóåï»û]y�ºÓãz;½ ñí›A¿‹pà}»OãêÁi3zCŒpæÜ¢°^¯›ëvS›9L'�¹"?ëŒL]“;Žé	)}ô‘L0îWDœt¹ }ÅÅ¤gôÒYÉ…?·±ÀÅJ¦Â–¶¢ÐfS/mPš‹ Þ]œƒ]&•Ž@Ô§�:I4ß”éÃ?�ÊGÜb°d›±4%.C+–Ë¹Š°ÓL‰,æÈš4Â S­,$9SwÍ¹œaÄrá�ýîè“×�ËÊÓ”0”1‹ðën4¼E1¦CVìqÍµ×\a:`Ö¡Bs9“‚ßTâùõxÀ¸ÒÄÂ¦F.œÔj/�xˆšêÜ.˜g}å	2s¨ª$ügÝ`é½fŒ¯&½á4îOª–ð2Ä¾ºßxq˜Ž™Ê¡X‘:ï¬©ª/Ub—»-ªk6rž9Lj G•¿ :Ó9æõäÓ�uXéƒÒZAë¬†�ð…ç�à¡çÁ`äJ˜-Cm=†¥ºSz­!ü÷ü#ˆÏléC�ˆï4{×°Zj…� <ŠåoÓwÿ ëÒÿŠ³+ÿ[cZ­à‰·Ôs�Àv ¨æß7nÀ±b       ˆÀ¿Ã570¾ÂÁ :    ‹      Õ–]oÚ0†ïû+<_ìN¾6êdêH¥¡R@”iš¦]˜Ø«‰�c¿~f*›@ƒ®Í��¿>~ÞcY6y�zÓ¯ã[ôiz?@ãÏýÂ5€/�@<�Ý@³îù ·CŒpjÌ²°Ùlê›F]éL'�š<kBa´HL�†£+Rþ‹®I9e6"b„ÉxÔ—Œÿ@jŽ@­L!·ó¶0¾	/Ê¾á9ä<Wz»�Šq’åªL‹5×\6›ö�™bÛr]ÿÅÖ°©vàt¶[ªìêˆ˜­i&2ÄF-qDD¾@…NB"Q²€YFåc}!æÑÌ„ø[¿7únu`ÒrvD(J5Ÿ‡øC/^�ÂGCšsô¸æÞjnp4 …A¹bb.8;)~pâñótÂØib^$Z,�PòI
Öâ¡ÕDeÅ’Z¯-ë Õ‡*'aÿªMþ(Æøfr;œÆý‰+	+S<Ñ=sÇp4¦šKƒb¡ybìðÞ‘KÿVÎŠåõïO´çÕb‘!TCG•˜\ÉG©6òÐ§­áQ‡3!íù(ÛCÄ¿˜/h×|¿x(º­w�Ú“y÷¿ðs•1®ÙOíŽ­µgk½gÐûï‘ßézí“ô/Qú‹è}GïW“>pôA5éŽ¾QMú¦£oV“¾åè[Õ¤o;úv5é;Ž¾ójè/¸¬V|moU¹øZ.¬KHwßºx¶Û>ÏÀ™/'Ø¿)	ì^­Ükù�K�    C   ˆl–äY>”ÊeJeA3p\eÅ1hß�þ]qÁ,Ü¢|2—¤t þÅ„d�ÏÄ_ŠI|¥�+Wé3ž¯ÄÃ ?÷     # test_refs.py -- tests for refs.py
# Copyright (C) 2013 Jelmer Vernooij <jelmer@jelmer.uk>
#
# Dulwich is dual-licensed under the Apache License, Version 2.0 and the GNU
# General Public License as public by the Free Software Foundation; version 2.0
# or (at your option) any later version. You can redistribute it and/or
# modify it under the terms of either of these two licenses.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# You should have received a copy of the licenses; if not, see
# <http://www.gnu.org/licenses/> for a copy of the GNU General Public License
# and <http://www.apache.org/licenses/LICENSE-2.0> for a copy of the Apache
# License, Version 2.0.
#

"""Tests for dulwich.refs."""

from io import BytesIO
import os
import sys
import tempfile

from dulwich import errors
from dulwich.file import (
    GitFile,
)
from dulwich.objects import ZERO_SHA
from dulwich.refs import (
    DictRefsContainer,
    InfoRefsContainer,
    SymrefLoop,
    check_ref_format,
    _split_ref_line,
    parse_symref_value,
    read_packed_refs_with_peeled,
    read_packed_refs,
    strip_peeled_refs,
    write_packed_refs,
)
from dulwich.repo import Repo

from dulwich.tests import (
    SkipTest,
    TestCase,
)

from dulwich.tests.utils import (
    open_repo,
    tear_down_repo,
)


class CheckRefFormatTests(TestCase):
    """Tests for the check_ref_format function.

    These are the same tests as in the git test suite.
    """

    def test_valid(self):
        self.assertTrue(check_ref_format(b"heads/foo"))
        self.assertTrue(check_ref_format(b"foo/bar/baz"))
        self.assertTrue(check_ref_format(b"refs///heads/foo"))
        self.assertTrue(check_ref_format(b"foo./bar"))
        self.assertTrue(check_ref_format(b"heads/foo@bar"))
        self.assertTrue(check_ref_format(b"heads/fix.lock.error"))

    def test_invalid(self):
        self.assertFalse(check_ref_format(b"foo"))
        self.assertFalse(check_ref_format(b"heads/foo/"))
        self.assertFalse(check_ref_format(b"./foo"))
        self.assertFalse(check_ref_format(b".refs/foo"))
        self.assertFalse(check_ref_format(b"heads/foo..bar"))
        self.assertFalse(check_ref_format(b"heads/foo?bar"))
        self.assertFalse(check_ref_format(b"heads/foo.lock"))
        self.assertFalse(check_ref_format(b"heads/v@{ation"))
        self.assertFalse(check_ref_format(b"heads/foo\bar"))


ONES = b"1" * 40
TWOS = b"2" * 40
THREES = b"3" * 40
FOURS = b"4" * 40


class PackedRefsFileTests(TestCase):
    def test_split_ref_line_errors(self):
      