Commit 0f741fb0 authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents 141f41e6 c3661d67
......@@ -1417,6 +1417,7 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
translation.get_author_name(request.user),
timezone.now(),
force_commit=True,
force_new=True,
)
translation.check_sync(
force=True,
......
......@@ -791,7 +791,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
return self.subproject.repo_needs_push()
def git_commit(self, request, author, timestamp, force_commit=False,
sync=False, skip_push=False):
sync=False, skip_push=False, force_new=False):
'''
Wrapper for commiting translation to git.
......@@ -801,7 +801,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
translation rescan will be needed)
'''
# Is there something for commit?
if not self.repo_needs_commit():
if not self.repo_needs_commit() and not force_new:
return False
# Can we delay commit?
......
......@@ -533,7 +533,7 @@ class GitRepository(Repository):
"""
# Add files
if files is not None:
self.execute(['add', '--'] + files)
self.execute(['add', '--force', '--'] + files)
# Build the commit command
cmd = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment