File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
tools/src/main/python/opengrok_tools/scm Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,20 @@ def incoming_check(self):
55
55
self ._configure_git_pull ()
56
56
return self ._run_custom_incoming_command ([self .command , 'pull' , '--dry-run' ])
57
57
58
+ def get_branch (self ):
59
+ status , out = self ._run_command ([self .command , 'branch' , '--show-current' ])
60
+ if status != 0 :
61
+ raise RepositoryException ("cannot get branch of {}: {}" .format (self , out ))
62
+
63
+ branch = out .split ('\n ' )[0 ]
64
+
65
+ return branch
66
+
58
67
def strip_outgoing (self ):
59
68
self ._configure_git_pull ()
69
+ branch = self .get_branch ()
60
70
status , out = self ._run_command ([self .command , 'log' ,
61
- '--pretty=tformat:%H' , '--reverse' , 'origin..' ])
71
+ '--pretty=tformat:%H' , '--reverse' , 'origin/' + branch + ' ..' ])
62
72
if status == 0 :
63
73
lines = out .split ('\n ' )
64
74
if len (lines ) == 0 :
You can’t perform that action at this time.
0 commit comments