I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Patch #2095

Git repositories are always created without .git extension

Added by Manfred Kröhnert over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
24 Jul 2012
Due date:
14 Nov 2012
% Done:

100%

Redmine version:
External issue:

Description

During creation of a new Git repository the URL field always showed something like /path/to/git/repo.git.
After clicking Create new repository the created repository was always /path/to/git/repo and it was missing the .git extension.

To fix this I had to change the following line:

--- lib/scm_repositories_controller_patch.rb    (revision 118)
+++ lib/scm_repositories_controller_patch.rb    (working copy)
@@ -220,7 +220,7 @@
         def scm_create_repository(repository, interface, url)
             name = interface.repository_name(url)
             if name
-                path = interface.path(name)
+                path = interface.default_path(name)
                 if File.directory?(path)
                     repository.errors.add(:url, :already_exists)
                 else

I hope this helps and is the correct patch.

patch.diff View (508 Bytes) Manfred Kröhnert, 24 Jul 2012 15:15


Related issues

Related to SCM Creator (+Github) - Bug #2102: Code to strip '.git' extensions is not correct. Closed 27 Sep 2012 14 Nov 2012
Duplicated by SCM Creator (+Github) - Bug #2120: git_ext not applied when creating repository after project creation Closed 08 Nov 2012

Associated revisions

Revision 119 (diff)
Added by Andriy Lesyuk about 12 years ago

Applied fixes (#2095, #2102 and #2120)

History

#1 Updated by Manfred Kröhnert over 12 years ago

Patch attached as the formatter seems to mess the inline patch.

#2 Updated by Andriy Lesyuk about 12 years ago

  • Assignee set to Andriy Lesyuk
  • Target version set to 0.4.2

#3 Updated by Andriy Lesyuk about 12 years ago

  • Due date set to 14 Nov 2012
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF

Terms of use | Privacy policy