Commit graph

6 commits

Author SHA1 Message Date
Stan Hu
d4c6a3af78
Force a full GC after importing a project
During a project import, it's possible that new branches are created by
the importer to handle pull requests that have been created from forked
projects, which would increment the `pushes_since_gc` value via
`HousekeepingService.increment!` before a full garbage collection gets
to run. This causes HousekeepingService to skip the full `git gc` and
move to the incremental repack mode. To ensure that a garbage collection
is run to pack refs and objects, explicitly execute the task.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59477
2019-04-01 13:33:16 -03:00
gfyoung
fbde835404 Enable more frozen string in app/services/**/*.rb
Partially addresses #47424.
2018-07-17 15:19:40 -07:00
Jacob Vosmaer (GitLab)
0187018e48 Simplify Git interactions in AfterImportService 2017-09-01 12:01:50 +00:00
Lin Jen-Shin
c5553ce772 Use git update-ref --stdin -z to delete refs 2017-08-30 22:01:23 +08:00
Lin Jen-Shin
081e2fce82 Try to make reserved ref names more obvious
So that whenever we want to reserve more, we're aware,
and don't mess it up.
2017-08-25 23:00:06 +08:00
Lin Jen-Shin
d1054bd3dd Resolve feedback on the MR:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13766

* Rename AfterImportService
* Use constants
* Move Git operations to Gitlab::Git::Repository
* Use Regexp.union
2017-08-25 22:38:07 +08:00