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)
Tue, Nov 19, 1:40 AM
Unknown Object (File)
Sat, Nov 16, 10:45 AM
Unknown Object (File)
Sat, Nov 16, 10:36 AM
Unknown Object (File)
Oct 18 2024, 7:40 AM
Unknown Object (File)
Oct 12 2024, 1:49 AM
Unknown Object (File)
Oct 9 2024, 12:07 PM
Unknown Object (File)
Oct 9 2024, 11:44 AM
Unknown Object (File)
Oct 8 2024, 12:26 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.