Pull auto-inits repo, restores files, and add -r global shorthand.
pull now works on a fresh machine: inits ~/.sgard if missing, always pulls when local manifest is empty, and restores all files after downloading blobs. -r is now a global shorthand for --remote; list uses resolveRemoteConfig() like prune. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -206,8 +206,8 @@ func (c *Client) doPull(ctx context.Context, g *garden.Garden) (int, error) {
|
||||
serverManifest := server.ProtoToManifest(pullResp.GetManifest())
|
||||
localManifest := g.GetManifest()
|
||||
|
||||
// If local is newer or equal, nothing to do.
|
||||
if !serverManifest.Updated.After(localManifest.Updated) {
|
||||
// If local has files and is newer or equal, nothing to do.
|
||||
if len(localManifest.Files) > 0 && !serverManifest.Updated.After(localManifest.Updated) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user