loop: replace sketch-host remote with origin remote in agent.Init()

Change git remote handling in agent initialization to replace any existing
origin remote with the provided git remote URL instead of creating a
sketch-host remote.

Problem Analysis:
Previously, when a git remote URL was provided to the agent, it would:
1. Add a new remote called 'sketch-host' pointing to the provided URL
2. Configure additional fetch refs for feature branches
3. Use 'sketch-host' for all fetch operations

This created confusion and inconsistency since most git workflows expect
to interact with 'origin' as the primary remote, not a custom 'sketch-host'
remote.

Implementation Changes:

1. Git Remote Setup Logic:
   - Remove existing 'origin' remote if it exists (ignoring errors if not present)
   - Add the provided remote URL as the new 'origin' remote
   - Update fetch operations to use 'origin' instead of 'sketch-host'

2. Branch Detection Logic:
   - Updated branchExists() function to remove 'refs/remotes/sketch-host/' reference
   - Now only checks 'refs/heads/' and 'refs/remotes/origin/' for branch existence

3. Comment Updates:
   - Updated git debugging comment in dockerimg/githttp.go to reference 'origin' instead of 'sketch-host'

Technical Details:
- The 'git remote remove origin' command gracefully handles the case where
  origin doesn't exist by logging and continuing
- All existing git operations (fetch, checkout, commit tracking) continue
  to work seamlessly with the origin remote
- branchExists() function correctly identifies branches in origin remotes

Benefits:
- Consistent with standard git workflows that use 'origin' as primary remote
- Eliminates confusion about which remote to use for git operations
- Maintains all existing functionality while using standard git conventions
- Simplifies git operations by using the expected 'origin' remote name
- Better integration with external git tools and workflows

Testing:
- All existing loop package tests continue to pass
- Verified git fetch, config, and branch detection work correctly
- Integration testing confirms seamless operation with origin remote

This change provides a more intuitive and standard git remote configuration
while preserving all agent functionality and improving compatibility with
standard git workflows.

Co-Authored-By: sketch <hello@sketch.dev>
Change-ID: s9edcdfe5bae3ef4ek
diff --git a/dockerimg/githttp.go b/dockerimg/githttp.go
index e052304..b7203c0 100644
--- a/dockerimg/githttp.go
+++ b/dockerimg/githttp.go
@@ -83,7 +83,7 @@
 	}
 
 	// Check if this is a .git/info/refs request for git-upload-pack service (which happens during git fetch)
-	// Use `GIT_CURL_VERBOSE=1 git fetch sketch-host` to inspect what's going on under the covers for git.
+	// Use `GIT_CURL_VERBOSE=1 git fetch origin` to inspect what's going on under the covers for git.
 	if r.Method == http.MethodGet && strings.Contains(r.URL.Path, ".git/info/refs") && r.URL.Query().Get("service") == "git-upload-pack" {
 		slog.InfoContext(r.Context(), "detected git info/refs request, running git fetch origin")