From 5a7a894e385f0dfdb34bb87af97ad8a02099cccf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 27 Sep 2025 19:09:22 -0500 Subject: prune branches on pull --- doPull.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doPull.go') diff --git a/doPull.go b/doPull.go index a2b2a82..80405ff 100644 --- a/doPull.go +++ b/doPull.go @@ -148,6 +148,9 @@ func rillPull(repo *gitpb.Repo) error { } return nil } + if err := repo.RunVerbose([]string{"git", "fetch", "origin", "--prune"}); err != nil { + return err + } cur := repo.GetCurrentBranchName() if !repo.IsBranchRemote(cur) { if argv.Verbose { @@ -156,11 +159,8 @@ func rillPull(repo *gitpb.Repo) error { return nil } - var cmd []string - cmd = append(cmd, "git", "pull") - err := repo.RunVerbose(cmd) - if err != nil { - log.Info(repo.GetFullPath(), "git pull err:", err) + if err := repo.RunVerbose([]string{"git", "pull"}); err != nil { + return err } return nil } -- cgit v1.2.3