Skip to content

Commit fdc8ecb

Browse files
committed
fix(remote): assemble exception message completely
... before trying to substitute values in. Fixes #575
1 parent b197de0 commit fdc8ecb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git/remote.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,8 @@ def _assert_refspec(self):
706706
if config.get_value('fetch', default=unset) is unset:
707707
msg = "Remote '%s' has no refspec set.\n"
708708
msg += "You can set it as follows:"
709-
msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % (self.name, self.name)
710-
raise AssertionError(msg)
709+
msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'."
710+
raise AssertionError(msg % (self.name, self.name))
711711
finally:
712712
config.release()
713713

0 commit comments

Comments
 (0)