We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2d6057 commit f8b2d38Copy full SHA for f8b2d38
tools/src/main/python/opengrok_tools/scm/git.py
@@ -64,8 +64,18 @@ def get_branch(self):
64
65
return branch
66
67
+ def fetch(self):
68
+ status, out = self._run_command([self.command, 'fetch'])
69
+ if status != 0:
70
+ raise RepositoryException("cannot fetch {}: {}".format(self, out))
71
+
72
def strip_outgoing(self):
73
+ """
74
+ Check for outgoing changes and if found, strip them.
75
+ :return: True if there were any changes stripped, False otherwise.
76
77
self._configure_git_pull()
78
+ self.fetch()
79
branch = self.get_branch()
80
status, out = self._run_command([self.command, 'log',
81
'--pretty=tformat:%H', '--reverse', 'origin/' + branch + '..'])
0 commit comments