forked from jesseduffield/lazygit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor to group up more commonly used git command stuff
- Loading branch information
1 parent
9706416
commit 3e80a9e
Showing
18 changed files
with
191 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package git_commands | ||
|
||
import ( | ||
gogit "github.com/jesseduffield/go-git/v5" | ||
"github.com/jesseduffield/lazygit/pkg/commands/oscommands" | ||
"github.com/jesseduffield/lazygit/pkg/common" | ||
) | ||
|
||
type GitCommon struct { | ||
*common.Common | ||
cmd oscommands.ICmdObjBuilder | ||
os *oscommands.OSCommand | ||
dotGitDir string | ||
repo *gogit.Repository | ||
config *ConfigCommands | ||
} | ||
|
||
func NewGitCommon( | ||
cmn *common.Common, | ||
cmd oscommands.ICmdObjBuilder, | ||
osCommand *oscommands.OSCommand, | ||
dotGitDir string, | ||
repo *gogit.Repository, | ||
config *ConfigCommands, | ||
) *GitCommon { | ||
return &GitCommon{ | ||
Common: cmn, | ||
cmd: cmd, | ||
os: osCommand, | ||
dotGitDir: dotGitDir, | ||
repo: repo, | ||
config: config, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.