Revert skipFetchAll Stamping Logic · Entire

The change in URL Handling

The change in the GitHub pull request marks all remotes with a full URL as skipFetchAll. The intention here is to revert that and ensure that every time a new remote is created, we set that value to avoid changing user settings and keep adhoc remotes from cluttering user git configs.

Implementation Details

To clarify my approach, I have been exploring where the CLI creates remotes. In the production code paths I've checked, filtered fetches target a bare URL, and git implicitly logs the remote.<URL>.promisor section — there's typically no explicit invocation of git remote add. If a specific remote-creation site is of concern (e.g., in the git remote-entire helper, during checkpoint setup, or elsewhere), it should be addressed.

Changes Made

  1. remote/git.go

    • Removed the previous behavior where markPromisorEntrySkipped read the remote.<url>.promisor and re-stamped skipFetchAll / skipDefaultUpdate for all filtered fetches, as it marked remotes with a full URL. This was reverted to only consider newly established remotes.
    • Added the gitRemoteSectionExists function to check existence of remote.<url>.* sections prior to fetch.
    • Introduced markRemoteSkipped, which sets the skipFetchAll without conducting promisor checks.
    • Now, Fetch() only applies the stamps when the remote was newly created and had not existed previously.
  2. git_test.go

    • Renamed the new remote test, ensuring pre-existing URL remotes remain untouched.
    • Verified the functionality for existing remotes with new test cases.

Key Decisions

Verified Changes

Following the changes, I have confirmed that pre-existing remote configurations remain intact, thus aligning with your aim to avoid rewriting user settings. All tests, including format and lint checks, have successfully passed.