summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-29 10:05:13 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-29 10:05:13 +0000
commit76435033e7a15f01085c947ea219a8a8b41af19d (patch)
treefb0ce575e8e3a3e69a8a18581e2dc8955abf7485 /app
parent27dca22c917fd78e8e37ac1fd77bcfb7b1cf690d (diff)
downloadredmine-76435033e7a15f01085c947ea219a8a8b41af19d.tar.gz
redmine-76435033e7a15f01085c947ea219a8a8b41af19d.zip
scm: git: add the comment of the reason to scan database in fetching every time (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9287 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/repository/git.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb
index 48fee87e8..b048c0f65 100644
--- a/app/models/repository/git.rb
+++ b/app/models/repository/git.rb
@@ -165,6 +165,20 @@ class Repository::Git < Repository
return if revisions.blank?
# Make the search for existing revisions in the database in a more sufficient manner
+ #
+ # Git branch is the reference to the specific revision.
+ # Git can *delete* remote branch and *re-push* branch.
+ #
+ # $ git push remote :branch
+ # $ git push remote branch
+ #
+ # After deleting branch, revisions remain in repository until "git gc".
+ # On git 1.7.2.3, default pruning date is 2 weeks.
+ # So, "git log --not deleted_branch_head_revision" return code is 0.
+ #
+ # After re-pushing branch, "git log" returns revisions which are saved in database.
+ # So, Redmine needs to scan revisions and database every time.
+ #
# This is replacing the one-after-one queries.
# Find all revisions, that are in the database, and then remove them from the revision array.
# Then later we won't need any conditions for db existence.