Page MenuHomePhabricator

When landing changes in an empty repository, merge cleanly in Git
ClosedPublic

Authored by epriestley on Jun 7 2020, 3:29 PM.
Tags
None
Referenced Files
F13240394: D21324.diff
Wed, May 22, 1:51 PM
F13238665: D21324.diff
Tue, May 21, 8:37 PM
F13237626: D21324.id50754.diff
Tue, May 21, 1:57 PM
F13224256: D21324.id50787.diff
Sun, May 19, 7:24 AM
F13222802: D21324.diff
Sun, May 19, 3:59 AM
F13214885: D21324.id.diff
Fri, May 17, 1:34 PM
F13202580: D21324.diff
Tue, May 14, 10:52 PM
Unknown Object (File)
Fri, May 3, 2:35 AM
Subscribers
None

Details

Summary

Fixes T12876. Ref T13546. When you make the first change in a new Git repository, "arc land" currently can not merge it because there's nothing to merge into.

Support merging into the empty state formally, reachable by using "--into-empty" (which should be uncommon) or "arc land" in an empty repository.

Test Plan
  • Used "arc land --into-empty --hold ..." to generate merges against the empty state under "squash" and "merge" strategies in Git.
    • Got sensible result commits with appropriate parents and content.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jun 8 2020, 11:20 PM
This revision was automatically updated to reflect the committed changes.