Page MenuHomePhabricator

Survive importing Git commits with no commit message and/or no author
ClosedPublic

Authored by epriestley on May 19 2020, 3:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 31, 10:20 PM
Unknown Object (File)
Sun, Mar 31, 10:20 PM
Unknown Object (File)
Mar 15 2024, 8:38 AM
Unknown Object (File)
Feb 24 2024, 5:12 PM
Unknown Object (File)
Feb 12 2024, 9:32 AM
Unknown Object (File)
Dec 25 2023, 12:49 AM
Unknown Object (File)
Nov 30 2023, 4:37 AM
Unknown Object (File)
Nov 17 2023, 12:38 PM
Subscribers
None

Details

Summary

Ref T13538. See PHI1739. Synthetic Git commits with no author and/or no commit message currently extract null and then fail to parse.

Ideally, we would carefully distinguish between null and empty string. In practice, that requires significant schema changes (these columns are non-nullable and have indexing requirements) and these cases are degenerate. These commits are challenging to build and can not normally be constructed with git commit.

At least for now, merge the null cases into the empty string cases so we can survive import.

Test Plan
  • Constructed a commit with no author and no commit message using the approach described in T13538; pushed and parsed it.
  • Before: fatals during identity selection and storing the commit message (both roughly NULL inserts into non-null columns).
  • After: clean import.

This produces a less-than-ideal UI in Diffusion, but it doesn't break anything:

Screen Shot 2020-05-18 at 7.59.36 PM.png (307×516 px, 22 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable