Defect #26645

git 2.14 compatibility

Added by Philip Taffner 9 days ago. Updated 9 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:3.3.5
Resolution: Affected version:3.4.2

Description

There is no "--no-color" argument for "git version" anymore.

Potential fix:

Index: lib/redmine/scm/adapters/git_adapter.rb
===================================================================
--- lib/redmine/scm/adapters/git_adapter.rb     (revision 16828)
+++ lib/redmine/scm/adapters/git_adapter.rb     (working copy)
@@ -54,7 +54,7 @@
           end

           def scm_version_from_command_line
-            shellout("#{sq_bin} --version --no-color") { |io| io.read }.to_s
+            shellout("#{sq_bin} --version") { |io| io.read }.to_s
           end
         end

Related issues

Related to Redmine - Defect #5324: Git not working if color.ui is enabled Closed 2010-04-15

Associated revisions

Revision 16948
Added by Toshi MARUYAMA 9 days ago

git: remove "--no-color" option from "git --version" for git 2.14 compatibility (#26645)

Revision 16949
Added by Toshi MARUYAMA 9 days ago

Merged r16948 from trunk to 3.4-stable (#26645)

git: remove "--no-color" option from "git --version" for git 2.14 compatibility.

Revision 16950
Added by Toshi MARUYAMA 9 days ago

Merged r16948 from trunk to 3.3-stable (#26645)

git: remove "--no-color" option from "git --version" for git 2.14 compatibility.

History

#1 Updated by Toshi MARUYAMA 9 days ago

  • Related to Defect #5324: Git not working if color.ui is enabled added

#2 Updated by Toshi MARUYAMA 9 days ago

$ ./git --version
git version 2.14.0
$ ./git --version --no-color
error: unknown option `no-color'
usage: git version [<options>]

    --build-options       also print build options

$ ./git log --no-color | wc
 753470 3494163 28722346
$ ./git log | wc
 753470 3494163 28722346
$ ./git config -l | grep color
color.ui=true

#3 Updated by Toshi MARUYAMA 9 days ago

  • Subject changed from git 2.14 breaks fetch_changesets to git 2.14 comatibility

#4 Updated by Toshi MARUYAMA 9 days ago

  • Subject changed from git 2.14 comatibility to git 2.14 compatibility

#5 Updated by Toshi MARUYAMA 9 days ago

  • Target version set to 3.3.5

I have committed r16948.
We cannot use self.superclass.client_version_above? because "git --version --no-color" fails.
I think I added "--no-color" to "git --version" at r4885 for preventing feature brokenness.

Also available in: Atom PDF