@@ -81,7 +81,7 @@ def reset(self, commit='HEAD', index=True, working_tree=False,
8181
8282try :
8383self .repo .git .reset (mode ,commit ,add_arg ,paths ,** kwargs )
84- except GitCommandError , e :
84+ except GitCommandError as e :
8585# git nowadays may use 1 as status to indicate there are still unstaged
8686# modifications after the reset
8787if e .status != 1 :
@@ -134,6 +134,7 @@ def set_tracking_branch(self, remote_reference):
134134 :param remote_reference: The remote reference to track or None to untrack
135135 any references
136136 :return: self"""
137+ from .remote import RemoteReference
137138if remote_reference is not None and not isinstance (remote_reference ,RemoteReference ):
138139raise ValueError ("Incorrect parameter type: %r" % remote_reference )
139140# END handle type
@@ -156,6 +157,7 @@ def tracking_branch(self):
156157"""
157158 :return: The remote_reference we are tracking, or None if we are
158159 not a tracking branch"""
160+ from .remote import RemoteReference
159161reader = self .config_reader ()
160162if reader .has_option (self .k_config_remote )and reader .has_option (self .k_config_remote_ref ):
161163ref = Head (self .repo ,Head .to_full_path (reader .get_value (self .k_config_remote_ref )))