mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-09-08 00:00:52 +02:00
filter-repo: make tagger optional
Apparently, despite the git-fast-import.txt documentation, tagger is optional for both fast-export and fast-import. I suspect this is because there are several (old) tags in the linux.git repository that have no tagger, so if we want to test rewriting linux.git history then we need to make it optional for filter-repo too. Signed-off-by: Elijah Newren <newren@gmail.com>
This commit is contained in:
parent
911f234e3d
commit
a7110de5f5
|
@ -687,6 +687,7 @@ class Tag(_GitElement):
|
||||||
file_.write('tag %s\n' % self.ref)
|
file_.write('tag %s\n' % self.ref)
|
||||||
mark = ':' if isinstance(self.from_ref, int) else ''
|
mark = ':' if isinstance(self.from_ref, int) else ''
|
||||||
file_.write('from {}{}\n'.format(mark, self.from_ref))
|
file_.write('from {}{}\n'.format(mark, self.from_ref))
|
||||||
|
if self.tagger_name:
|
||||||
file_.write('tagger %s <%s> ' % (self.tagger_name, self.tagger_email))
|
file_.write('tagger %s <%s> ' % (self.tagger_name, self.tagger_email))
|
||||||
_write_date(file_, self.tagger_date)
|
_write_date(file_, self.tagger_date)
|
||||||
file_.write('\n')
|
file_.write('\n')
|
||||||
|
@ -1382,6 +1383,8 @@ class FastExportFilter(object):
|
||||||
if self._currentline.startswith('original-oid'):
|
if self._currentline.startswith('original-oid'):
|
||||||
original_id = self._parse_original_id();
|
original_id = self._parse_original_id();
|
||||||
|
|
||||||
|
tagger_name, tagger_email, tagger_date = None, None, None
|
||||||
|
if self._currentline.startswith('tagger'):
|
||||||
(tagger_name, tagger_email, tagger_date) = self._parse_user('tagger')
|
(tagger_name, tagger_email, tagger_date) = self._parse_user('tagger')
|
||||||
tag_msg = self._parse_data()
|
tag_msg = self._parse_data()
|
||||||
if self._currentline == '\n':
|
if self._currentline == '\n':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user