summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/custom.go
blob: 6dff6e771b87914e832b529622f5fc4149e39e18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package git_commands

type CustomCommands struct {
	*GitCommon
}

func NewCustomCommands(gitCommon *GitCommon) *CustomCommands {
	return &CustomCommands{
		GitCommon: gitCommon,
	}
}

// Only to be used for the sake of running custom commands specified by the user.
// If you want to run a new command, try finding a place for it in one of the neighbouring
// files, or creating a new BlahCommands struct to hold it.
func (self *CustomCommands) RunWithOutput(cmdStr string) (string, error) {
	return self.cmd.New(cmdStr).RunWithOutput()
}