From acf5a26058ca3e1c275bbd08b009af21e8e599a7 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 12 Oct 2020 22:54:56 +0200 Subject: [PATCH] DEV: Fix an apparently "too modern" git command (#10894) A follow-up to a follow-up. (6932a373a34a7150f8514af7edaf9048cc719a7d and 572da7a57b7ec672fcde673a5d7ac4ce555f249d) Our `discourse_test` Docker image uses git 2.20.1 released on Dec 15, 2018. It does not support `git branch --show-current`. (it was added in 2.22.0) --- spec/components/version_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/components/version_spec.rb b/spec/components/version_spec.rb index 6d519a22ae5..345cc251f69 100644 --- a/spec/components/version_spec.rb +++ b/spec/components/version_spec.rb @@ -106,7 +106,7 @@ describe Discourse::VERSION do # Simulate a remote upstream `cd #{path} && git remote add origin #{path}/.git && git fetch -q` - `cd #{path} && git branch -u origin/$(git branch --show-current)` + `cd #{path} && git branch -u origin/$(git rev-parse --abbrev-ref HEAD)` end path