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
F19540899: D21324.diff
Thu, Jan 22, 12:39 AM
F19518306: D21324.id.diff
Thu, Jan 15, 7:26 PM
F19516105: D21324.diff
Wed, Jan 14, 8:00 PM
F19282052: D21324.id50787.diff
Dec 23 2025, 4:07 AM
F19122168: D21324.id50787.diff
Dec 9 2025, 11:17 PM
F18925002: D21324.id.diff
Nov 9 2025, 6:15 PM
F18773578: D21324.diff
Oct 9 2025, 10:50 AM
F18713501: D21324.id.diff
Sep 29 2025, 6:27 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
Branch
land17
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/land/engine/ArcanistGitLandEngine.php:745XHP16TODO Comment
Advicesrc/land/engine/ArcanistGitLandEngine.php:747XHP16TODO Comment
Advicesrc/land/engine/ArcanistLandEngine.php:1278XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 24576
Build 33878: Run Core Tests

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.