Commit 87c3890b authored by Douwe Maan's avatar Douwe Maan

Merge branch '5894-show-git-status-to-debug' into 'master'

Report git status whenever ee-specific-lines-check failed to rebase cleanly

See merge request gitlab-org/gitlab-ee!5594
parents 21fd3c4d 8cb0a5cd
...@@ -100,12 +100,18 @@ module EESpecificCheck ...@@ -100,12 +100,18 @@ module EESpecificCheck
# CE and EE branches. # CE and EE branches.
run_git_command("rebase --onto #{ce_merge_base} canonical-ce/master #{ce_fetch_head}") run_git_command("rebase --onto #{ce_merge_base} canonical-ce/master #{ce_fetch_head}")
if status_clean? status = git_status
if status == ''
head_commit_sha head_commit_sha
else else
say <<~MESSAGE say <<~MESSAGE
💥 WE HAVE CONFLICTS! This shouldn't happen. Please create an issue 💥 Git status not clean! This shouldn't happen. Please create an issue
💥 and ping @godfat to investigate. 💥 and ping @godfat to investigate.
⚠️ Git status:
#{status}
MESSAGE MESSAGE
run_git_command("rebase --abort") run_git_command("rebase --abort")
...@@ -122,8 +128,8 @@ module EESpecificCheck ...@@ -122,8 +128,8 @@ module EESpecificCheck
run_git_command("rev-parse HEAD") run_git_command("rev-parse HEAD")
end end
def status_clean? def git_status
run_git_command("status --porcelain") == '' run_git_command("status --porcelain")
end end
def remove_remotes def remove_remotes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment