Defect #25371

Git 2.9 compatibility

Added by Tamara S 10 days ago. Updated 6 days ago.

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

0%

Category:SCM
Target version:3.2.6
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.

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

Associated revisions

Revision 16422
Added by Toshi MARUYAMA 10 days ago

Git 2.9 compatibility (#25371)

Revision 16424
Added by Toshi MARUYAMA 10 days ago

Merged r16422 from trunk to 3.3-stable (#25371)

Git 2.9 compatibility.

Revision 16425
Added by Toshi MARUYAMA 10 days ago

Merged r16422 from trunk to 3.2-stable (#25371)

Git 2.9 compatibility.

Revision 16428
Added by Toshi MARUYAMA 6 days ago

git: use '--no-renames' option in 'show' command (#25371)

Revision 16429
Added by Toshi MARUYAMA 6 days ago

Merged r16428 from trunk to 3.3-stable (#25371)

git: use '--no-renames' option in 'show' command.

Revision 16430
Added by Toshi MARUYAMA 6 days ago

Merged r16428 from trunk to 3.2-stable (#25371)

git: use '--no-renames' option in 'show' command.

History

#1 Updated by Toshi MARUYAMA 10 days 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

#2 Updated by Toshi MARUYAMA 10 days ago

  • Tracker changed from Feature to Defect

#3 Updated by Toshi MARUYAMA 10 days ago

  • Target version set to 3.2.6

#4 Updated by Toshi MARUYAMA 10 days 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.

#5 Updated by Tamara S 6 days 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 = []

#6 Updated by Toshi MARUYAMA 6 days ago

  • Status changed from Reopened to Closed

Fixed. Thanks for pointing out.

Also available in: Atom PDF