Page MenuHomePhabricator

Fix git "origin" remote in more circumstances
ClosedPublic

Authored by epriestley on Nov 20 2013, 4:42 PM.
Tags
None
Referenced Files
F14065715: D7614.diff
Tue, Nov 19, 6:01 AM
F14027255: D7614.id17191.diff
Fri, Nov 8, 6:04 AM
F14013436: D7614.id17191.diff
Sat, Nov 2, 7:02 AM
F14003550: D7614.id17191.diff
Sat, Oct 26, 7:25 AM
F13993713: D7614.id17183.diff
Wed, Oct 23, 12:54 AM
Unknown Object (File)
Oct 13 2024, 10:12 PM
Unknown Object (File)
Oct 9 2024, 3:02 PM
Unknown Object (File)
Sep 6 2024, 9:29 AM
Subscribers

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
T4041: updates on bare repos fail when git < 1.7.2
Commits
Restricted Diffusion Commit
rPa07f444f2a5e: Fix git "origin" remote in more circumstances
Summary

Fixes T4041. We currently detect when "origin" is incorrect, but can do better:

  • When "origin" is missing, we can add it. This happens for Git 1.7.1 -- see T4041.
  • When "origin" is wrong, we can fix it automatically if we control the repository.

We only need to fail when origin exists, is wrong, and we aren't in charge of the repository.

Test Plan

Ran bin/repository discover X on a repository with a good origin, no origin, a bad-but-under-control origin, and a bad-out-of-control origin. Got the right behavior in all cases.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped