applicable. Required for 3.8 compatibility.
(Jelmer Vernooij)
+ * Support plain strings as refspec arguments to
+ ``dulwich.porcelain.push``. (Jelmer Vernooij)
+
BUG FIXES
* Handle invalid ref that pretends to be a sub-folder under a valid ref.
:return: A tuple with left and right ref
:raise KeyError: If one of the refs can not be found
"""
+ refspec = to_bytes(refspec)
if refspec.startswith(b"+"):
force = True
refspec = refspec[1:]
else:
force = False
- refspec = to_bytes(refspec)
if b":" in refspec:
(lh, rh) = refspec.split(b":")
else:
self.assertEqual((b"refs/heads/foo", None, False),
parse_reftuple(r, r, b"refs/heads/foo:"))
+ def test_default_with_string(self):
+ r = {b"refs/heads/foo": "bla"}
+ self.assertEqual((b"refs/heads/foo", b"refs/heads/foo", False),
+ parse_reftuple(r, r, "foo"))
+
class ParseReftuplesTests(TestCase):