diff options
author | Elijah Newren <newren@gmail.com> | 2020-05-30 20:25:57 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-31 09:03:10 -0700 |
commit | d42a2fb72f8cbe6efd60a4f90c8e9ec1c888c3a7 (patch) | |
tree | 13d931bd4842f372e9ff21bed65678b8a9763a5e /git-instaweb.sh | |
parent | Git 2.26.2 (diff) | |
download | tgif-d42a2fb72f8cbe6efd60a4f90c8e9ec1c888c3a7.tar.xz |
fast-import: add new --date-format=raw-permissive format
There are multiple repositories in the wild with random, invalid
timezones. Most notably is a commit from rails.git with a timezone of
"+051800"[1]. A few searches will find other repos with that same
invalid timezone as well. Further, Peff reports that GitHub relaxed
their fsck checks in August 2011 to accept any timezone value[2], and
there have been multiple reports to filter-repo about fast-import
crashing while trying to import their existing repositories since they
had timezone values such as "-7349423" and "-43455309"[3].
The existing check on timezone values inside fast-import may prove
useful for people who are crafting fast-import input by hand or with a
new script. For them, the check may help them avoid accidentally
recording invalid dates. (Note that this check is rather simplistic and
there are still several forms of invalid dates that fast-import does not
check for: dates in the future, timezone values with minutes that are
not divisible by 15, and timezone values with minutes that are 60 or
greater.) While this simple check may have some value for those users,
other users or tools will want to import existing repositories as-is.
Provide a --date-format=raw-permissive format that will not error out on
these otherwise invalid timezones so that such existing repositories can
be imported.
[1] https://github.com/rails/rails/commit/4cf94979c9f4d6683c9338d694d5eb3106a4e734
[2] https://lore.kernel.org/git/20200521195513.GA1542632@coredump.intra.peff.net/
[3] https://github.com/newren/git-filter-repo/issues/88
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-instaweb.sh')
0 files changed, 0 insertions, 0 deletions