From 049cfb90f2f985c9ebe603e22b6c8a2530bded75 Mon Sep 17 00:00:00 2001 From: Christophe de Vienne Date: Tue, 2 Apr 2024 22:42:25 +0200 Subject: [PATCH] hg: code cleaning: drop unused function --- pkg/vendir/fetch/hg/hg.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/vendir/fetch/hg/hg.go b/pkg/vendir/fetch/hg/hg.go index 04c5c379..df035cff 100644 --- a/pkg/vendir/fetch/hg/hg.go +++ b/pkg/vendir/fetch/hg/hg.go @@ -229,27 +229,6 @@ func (t *Hg) initClone(dstPath string) error { return nil } -func (t *Hg) fetch(dstPath string, tempArea ctlfetch.TempArea) error { - if err := t.initClone(dstPath); err != nil { - return err - } - - return t.runMultiple([][]string{ - {"pull"}, - {"checkout", t.opts.Ref}, - }, dstPath) -} - -func (t *Hg) runMultiple(argss [][]string, dstPath string) error { - for _, args := range argss { - _, _, err := t.run(args, dstPath) - if err != nil { - return err - } - } - return nil -} - func (t *Hg) run(args []string, dstPath string) (string, string, error) { var stdoutBs, stderrBs bytes.Buffer