You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: git_cmd_obj_runner.go
    path of file: ./repos/lazygit/pkg/commands
    
    the code of the file until where you have to start completion: package commands

import (
	"strings"
	"time"

	"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
	"github.com/sirupsen/logrus"
)

    
func (self *gitCmdObjRunner) RunWithOutputs(cmdObj oscommands.ICmdObj) (string, string, error) {
	var stdout, stderr string
	var err error
	for i := 0; i < RetryCount; i++ {
		newCmdObj := cmdObj.Clone()
		stdout, stderr, err = self.innerRunner.RunWithOutputs(newCmdObj)

		if err == nil || !strings.Contains(stdout+stderr, ".git/index.lock") {
			return stdout, stderr, err
		}

		// if we have an error based on the index lock, we should wait a bit and then retry
		self.log.Warn("index.lock prevented command from running. Retrying command after a small wait")
		time.Sleep(WaitTime)
	}

	return stdout, stderr, err
}