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
F19476246: D20421.diff
Wed, Jan 7, 6:56 PM
F19064443: D20421.id.diff
Nov 29 2025, 9:35 PM
F19055384: D20421.diff
Nov 28 2025, 5:20 PM
F19022157: D20421.diff
Nov 23 2025, 8:22 PM
F18846922: D20421.id.diff
Oct 29 2025, 9:55 PM
F18842813: D20421.id48774.diff
Oct 28 2025, 6:42 PM
F18842667: D20421.diff
Oct 28 2025, 5:34 PM
F18802960: D20421.id48723.diff
Oct 17 2025, 9:04 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.