Commit 8cb0a5cd authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use a local variable and remove status_clean?

parent 975ee23a
...@@ -100,7 +100,9 @@ module EESpecificCheck ...@@ -100,7 +100,9 @@ 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
...@@ -126,14 +128,10 @@ module EESpecificCheck ...@@ -126,14 +128,10 @@ module EESpecificCheck
run_git_command("rev-parse HEAD") run_git_command("rev-parse HEAD")
end end
def status def git_status
run_git_command("status --porcelain") run_git_command("status --porcelain")
end end
def status_clean?
status == ''
end
def remove_remotes def remove_remotes
run_git_command( run_git_command(
"remote remove canonical-ee", "remote remove canonical-ee",
......
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