Skip to content

Commit bfaf706

Browse files
committed
fix(remote): asssertion message formatting
Related to #396
1 parent c4c6851 commit bfaf706

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git/remote.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -607,11 +607,12 @@ def stdout_handler(line):
607607
def _assert_refspec(self):
608608
"""Turns out we can't deal with remotes if the refspec is missing"""
609609
config = self.config_reader
610+
unset = 'placeholder'
610611
try:
611-
if config.get_value('fetch', default=type) is type:
612+
if config.get_value('fetch', default=unset) is unset:
612613
msg = "Remote '%s' has no refspec set.\n"
613614
msg += "You can set it as follows:"
614-
msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % self.name
615+
msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % (self.name, self.name)
615616
raise AssertionError(msg)
616617
finally:
617618
config.release()

0 commit comments

Comments
 (0)