Page MenuHomePhabricator

When observing a repository in Git, just "fetch <url>" without worrying about the "origin" remote
ClosedPublic

Authored by epriestley on Apr 14 2019, 7:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 13, 6:44 AM
Unknown Object (File)
Thu, Apr 11, 7:53 AM
Unknown Object (File)
Mon, Apr 1, 7:03 AM
Unknown Object (File)
Sat, Mar 30, 7:56 AM
Unknown Object (File)
Wed, Mar 20, 1:04 PM
Unknown Object (File)
Mar 15 2024, 8:32 AM
Unknown Object (File)
Mar 1 2024, 5:05 AM
Unknown Object (File)
Feb 21 2024, 1:17 PM
Subscribers
None

Details

Summary

Depends on D20420. Ref T13277. We currently spend substantial effort trying to detect and correct the URL of the "origin" remote in Git repositories.

I believe this is unnecessary, and we can always git fetch <url> ... to get the desired result instead of git muck-with-origin + git fetch origin .... We already do this in the more recent parts of the codebase (e.g., intracluster sync) and it works correctly in every case I'm aware of.

Test Plan
  • Grepped for origin, origin .
  • Ran bin/repository update ... to fetch a mirrored repository.

Diff Detail

Repository
rP Phabricator
Branch
autoclose5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 22593
Build 30951: Run Core Tests
Build 30950: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 17 2019, 6:56 PM
This revision was automatically updated to reflect the committed changes.

It looks like this does actually cause some issues with very old non-bare repositories. I'll follow up in T13280. I'm likely to move toward "users should convert these to bare repositories" over retaining non-bare support, since it's been at least like 4-5 years since we created non-bare repositories.