Six places fall back to a hardcoded "origin" string instead of relying solely on cfg.Remote (which already defaults to "origin" during config loading). One also makes a redundant LoadConfig() call just to get the remote name when cfg is already in scope. Behavior is currently correct, but the fallbacks are misleading and the extra LoadConfig() is wasteful.
Locations
Hardcoded "origin" fallback pattern (if remote == "" { remote = "origin" }):
cmd/publish.go:93-94
cmd/track.go:72-73
cmd/delete.go:61-62
cmd/delete.go:140-141
cmd/update.go:141-142
Redundant LoadConfig() + "origin" fallback:
Suggested Fix
Remove all if remote == "" { remote = "origin" } fallbacks and use cfg.Remote directly. Thread cfg into handleCreateTagStep and remove the redundant LoadConfig() call.
Related: PR #74
Six places fall back to a hardcoded
"origin"string instead of relying solely oncfg.Remote(which already defaults to"origin"during config loading). One also makes a redundantLoadConfig()call just to get the remote name whencfgis already in scope. Behavior is currently correct, but the fallbacks are misleading and the extraLoadConfig()is wasteful.Locations
Hardcoded
"origin"fallback pattern (if remote == "" { remote = "origin" }):cmd/publish.go:93-94cmd/track.go:72-73cmd/delete.go:61-62cmd/delete.go:140-141cmd/update.go:141-142Redundant
LoadConfig()+"origin"fallback:cmd/finish.go:679-683—handleCreateTagStepcallsconfig.LoadConfig()to get the remote name, butcfgshould be threaded through instead (same pattern PR Skip fetch when no remote is configured (#69) #74 fixes forhandleDeleteBranchStep)Suggested Fix
Remove all
if remote == "" { remote = "origin" }fallbacks and usecfg.Remotedirectly. ThreadcfgintohandleCreateTagStepand remove the redundantLoadConfig()call.Related: PR #74