diff --git a/rhodecode/lib/vcs/backends/git/repository.py b/rhodecode/lib/vcs/backends/git/repository.py --- a/rhodecode/lib/vcs/backends/git/repository.py +++ b/rhodecode/lib/vcs/backends/git/repository.py @@ -1040,6 +1040,8 @@ class GitRepository(BaseRepository): pr_branch, self.path, target_ref.name, enable_hooks=True, rc_scm_data=self.config.get('rhodecode', 'RC_SCM_DATA')) merge_succeeded = True + if close_branch and source_ref.name != target_ref.name and not dry_run and source_ref.type == 'branch': + self.delete_branch(source_ref.name) except RepositoryError: log.exception( 'Failure when doing local push from the shadow ' diff --git a/rhodecode/templates/base/vcs_settings.mako b/rhodecode/templates/base/vcs_settings.mako --- a/rhodecode/templates/base/vcs_settings.mako +++ b/rhodecode/templates/base/vcs_settings.mako @@ -300,31 +300,30 @@ % endif -## DISABLED FOR GIT FOR NOW as the rebase/close is not supported yet -## % if display_globals or repo_type in ['git']: -##