| 1 | package subprocessscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/ |
| 2 | |
| 3 | import ( |
| 4 | "ioscip-go gomod github.com/golang/go/src go1.25.0 io/" |
| 5 | "os/execscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/" |
| 6 | ) |
| 7 | |
| 8 | // Thin wrapper around exec.Cmd. Takes care of pipe shutdown by |
| 9 | // keeping an internal reference to any created pipes. Whenever |
| 10 | // Cmd.Wait() is called, all created pipes are closed. |
| 11 | type Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd# struct { |
| 12 | *execscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd. |
| 13 | |
| 14 | pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes. []ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Closerscip-go gomod github.com/golang/go/src go1.25.0 io/Closer# |
| 15 | } |
| 16 | |
| 17 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) Runscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Run().() error { |
| 18 | c.tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#trace().() |
| 19 | return c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..Runscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Run().() |
| 20 | } |
| 21 | |
| 22 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) Startscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Start().() error { |
| 23 | c.tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#trace().() |
| 24 | return c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..Startscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Start().() |
| 25 | } |
| 26 | |
| 27 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) Outputscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Output().() ([]byte, error) { |
| 28 | c.tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#trace().() |
| 29 | return c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..Outputscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Output().() |
| 30 | } |
| 31 | |
| 32 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) CombinedOutputscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#CombinedOutput().() ([]byte, error) { |
| 33 | c.tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#trace().() |
| 34 | return c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..CombinedOutputscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#CombinedOutput().() |
| 35 | } |
| 36 | |
| 37 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) StdoutPipescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#StdoutPipe().() (ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadCloserscip-go gomod github.com/golang/go/src go1.25.0 io/ReadCloser#, error) { |
| 38 | stdout, err := c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..StdoutPipescip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#StdoutPipe().() |
| 39 | c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes. = append(c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes., stdout) |
| 40 | return stdout, err |
| 41 | } |
| 42 | |
| 43 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) StderrPipescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#StderrPipe().() (ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadCloserscip-go gomod github.com/golang/go/src go1.25.0 io/ReadCloser#, error) { |
| 44 | stderr, err := c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..StderrPipescip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#StderrPipe().() |
| 45 | c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes. = append(c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes., stderr) |
| 46 | return stderr, err |
| 47 | } |
| 48 | |
| 49 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) StdinPipescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#StdinPipe().() (ioscip-go gomod github.com/golang/go/src go1.25.0 io/.WriteCloserscip-go gomod github.com/golang/go/src go1.25.0 io/WriteCloser#, error) { |
| 50 | stdin, err := c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..StdinPipescip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#StdinPipe().() |
| 51 | c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes. = append(c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes., stdin) |
| 52 | return stdin, err |
| 53 | } |
| 54 | |
| 55 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) Waitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Wait().() error { |
| 56 | for _, pipe := range c.pipesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#pipes. { |
| 57 | pipe.Closescip-go gomod github.com/golang/go/src go1.25.0 io/Closer#Close().() |
| 58 | } |
| 59 | |
| 60 | return c.Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd..Waitscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Wait().() |
| 61 | } |
| 62 | |
| 63 | func (c *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#) tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#trace().() { |
| 64 | if len(c.Argsscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Args.) > 0 { |
| 65 | Tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Trace().(c.Argsscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Args.[0], c.Argsscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Args.[1:]...) |
| 66 | } else { |
| 67 | Tracescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Trace().(c.Pathscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#Path.) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func newCmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/newCmd().(cmd *execscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/.Cmdscip-go gomod github.com/golang/go/src go1.25.0 `os/exec`/Cmd#) *Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd# { |
| 72 | wrapped := &Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#{Cmdscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/subprocess`/Cmd#Cmd.: cmd} |
| 73 | return wrapped |
| 74 | } |