Page MenuHomePhabricator

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

Authored by epriestley on Jun 7 2020, 3:29 PM.
Referenced Files
Unknown Object (File)
Thu, Apr 11, 10:03 AM
Unknown Object (File)
Fri, Apr 5, 12:20 PM
Unknown Object (File)
Tue, Apr 2, 1:47 PM
Unknown Object (File)
Mon, Apr 1, 5:53 PM
Unknown Object (File)
Sat, Mar 30, 12:11 AM
Unknown Object (File)
Feb 24 2024, 4:36 PM
Unknown Object (File)
Feb 21 2024, 12:31 AM
Unknown Object (File)
Feb 18 2024, 10:33 PM



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

rARC Arcanist
Lint Not Applicable
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.