Project

General

Profile

Actions

Defect #25371

closed

Git 2.9 compatibility

Added by Tamara S about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

With git 2.9 I have some problems with redmine git tests.

Failure:
RepositoryGitTest#test_fetch_changesets_from_scratch [redmine/trunk/test/unit/repository_git_test.rb:139]:
Expected: 39
Actual: 38

This patch heals it.


Files

adding-no-renames.patch (821 Bytes) adding-no-renames.patch Tamara S, 2017-03-20 15:47
Actions #1

Updated by Toshi MARUYAMA about 7 years ago

  • Tracker changed from Patch to Feature
  • Subject changed from RepositoryGitTest#test_fetch_changesets_from_scratch to Git 2.9 compatibility
  • Category set to SCM
Actions #2

Updated by Toshi MARUYAMA about 7 years ago

  • Tracker changed from Feature to Defect
Actions #3

Updated by Toshi MARUYAMA about 7 years ago

  • Target version set to 3.2.6
Actions #4

Updated by Toshi MARUYAMA about 7 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed in trunk, 3.3-stable, and 3.2-stable.
Thanks for pointing out.

Actions #5

Updated by Tamara S about 7 years ago

  • Status changed from Closed to Reopened

Thank you!
Sorry for reopening (I think, there is no need for new issue), but I have problems with tests (with git 2.9) again.

Failure:
RepositoriesGitControllerTest#test_diff_should_show_filenames [/trunk/test/functional/repositories_git_controller_test.rb:380]:
<test.txt> expected but was
<copied_README>..
Expected 0 to be >= 1.

It seems, that the cure is the same

--- lib/redmine/scm/adapters/git_adapter.rb (revision 16427)
+++ lib/redmine/scm/adapters/git_adapter.rb (working copy)
@ -317,6 +317,7 @
cmd_args << '--no-renames' if self.class.client_version_above?([2, 9])
else
cmd_args << "show" << "--no-color" << identifier_from
+ cmd_args << '--no-renames' if self.class.client_version_above?([2, 9])
end
cmd_args << "--" << scm_iconv(@path_encoding, 'UTF-8', path) unless path.empty?
diff = []
Actions #6

Updated by Toshi MARUYAMA about 7 years ago

  • Status changed from Reopened to Closed

Fixed. Thanks for pointing out.

Actions

Also available in: Atom PDF