diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index df42f5a62..5c56b6b83 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -191,6 +191,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: toggle line staged / unstaged d: delete change (git reset) E: edit hunk + c: commit changes + w: commit changes without pre-commit hook + C: commit changes using git editor ## Reflog diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md index 910b6938d..2cf603abf 100644 --- a/docs/keybindings/Keybindings_ja.md +++ b/docs/keybindings/Keybindings_ja.md @@ -251,6 +251,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: 選択行をステージ/アンステージ d: 変更を削除 (git reset) E: edit hunk + c: 変更をコミット + w: pre-commitフックを実行せずに変更をコミット + C: gitエディタを使用して変更をコミット ## リモート diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md index 2edef93ff..f49e6eb78 100644 --- a/docs/keybindings/Keybindings_ko.md +++ b/docs/keybindings/Keybindings_ko.md @@ -136,6 +136,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: 선택한 행을 staged / unstaged d: 변경을 삭제 (git reset) E: edit hunk + c: 커밋 변경내용 + w: commit changes without pre-commit hook + C: Git 편집기를 사용하여 변경 내용을 커밋합니다. ## 브랜치 diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 06b96af5c..01ea95417 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -229,6 +229,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: toggle lijnen staged / unstaged d: verwijdert change (git reset) E: edit hunk + c: commit veranderingen + w: commit veranderingen zonder pre-commit hook + C: commit veranderingen met de git editor ## Stash diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index a1ca9cfd2..23473ca2c 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -168,6 +168,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: toggle line staged / unstaged d: delete change (git reset) E: edit hunk + c: Zatwierdź zmiany + w: zatwierdź zmiany bez skryptu pre-commit + C: Zatwierdź zmiany używając edytora ## Reflog diff --git a/docs/keybindings/Keybindings_zh.md b/docs/keybindings/Keybindings_zh.md index 98b180a52..6650d0f71 100644 --- a/docs/keybindings/Keybindings_zh.md +++ b/docs/keybindings/Keybindings_zh.md @@ -238,6 +238,9 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct space: 切换行暂存状态 d: 取消变更 (git reset) E: edit hunk + c: 提交更改 + w: 提交更改而无需预先提交钩子 + C: 提交更改(使用编辑器编辑提交信息) ## 正常 diff --git a/pkg/gui/controllers.go b/pkg/gui/controllers.go index 4efb5e1ff..98a15b3d8 100644 --- a/pkg/gui/controllers.go +++ b/pkg/gui/controllers.go @@ -24,6 +24,10 @@ func (gui *Gui) resetControllers() { rebaseHelper := helpers.NewMergeAndRebaseHelper(helperCommon, gui.State.Contexts, gui.git, refsHelper) suggestionsHelper := helpers.NewSuggestionsHelper(helperCommon, model, gui.refreshSuggestions) + setCommitMessage := gui.getSetTextareaTextFn(func() *gocui.View { return gui.Views.CommitMessage }) + getSavedCommitMessage := func() string { + return gui.State.savedCommitMessage + } gui.helpers = &helpers.Helpers{ Refs: refsHelper, Host: helpers.NewHostHelper(helperCommon, gui.git), @@ -31,7 +35,7 @@ func (gui *Gui) resetControllers() { Bisect: helpers.NewBisectHelper(helperCommon, gui.git), Suggestions: suggestionsHelper, Files: helpers.NewFilesHelper(helperCommon, gui.git, osCommand), - WorkingTree: helpers.NewWorkingTreeHelper(helperCommon, gui.git, model), + WorkingTree: helpers.NewWorkingTreeHelper(helperCommon, gui.git, gui.State.Contexts, refsHelper, model, setCommitMessage, getSavedCommitMessage), Tags: helpers.NewTagsHelper(helperCommon, gui.git), GPG: helpers.NewGpgHelper(helperCommon, gui.os, gui.git), MergeAndRebase: rebaseHelper, @@ -76,16 +80,10 @@ func (gui *Gui) resetControllers() { bisectController := controllers.NewBisectController(common) - getSavedCommitMessage := func() string { - return gui.State.savedCommitMessage - } - getCommitMessage := func() string { return strings.TrimSpace(gui.Views.CommitMessage.TextArea.GetContent()) } - setCommitMessage := gui.getSetTextareaTextFn(func() *gocui.View { return gui.Views.CommitMessage }) - onCommitAttempt := func(message string) { gui.State.savedCommitMessage = message gui.Views.CommitMessage.ClearTextArea() diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index 22da8332b..27ae9b3fd 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -1,18 +1,14 @@ package controllers import ( - "fmt" - "regexp" "strings" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/git_commands" "github.com/jesseduffield/lazygit/pkg/commands/models" - "github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/filetree" "github.com/jesseduffield/lazygit/pkg/gui/types" - "github.com/jesseduffield/lazygit/pkg/utils" ) type FilesController struct { @@ -54,12 +50,12 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types }, { Key: opts.GetKey(opts.Config.Files.CommitChanges), - Handler: self.HandleCommitPress, + Handler: self.helpers.WorkingTree.HandleCommitPress, Description: self.c.Tr.CommitChanges, }, { Key: opts.GetKey(opts.Config.Files.CommitChangesWithoutHook), - Handler: self.HandleWIPCommitPress, + Handler: self.helpers.WorkingTree.HandleWIPCommitPress, Description: self.c.Tr.LcCommitChangesWithoutHook, }, { @@ -69,7 +65,7 @@ func (self *FilesController) GetKeybindings(opts types.KeybindingsOpts) []*types }, { Key: opts.GetKey(opts.Config.Files.CommitChangesWithEditor), - Handler: self.HandleCommitEditorPress, + Handler: self.helpers.WorkingTree.HandleCommitEditorPress, Description: self.c.Tr.CommitChangesWithEditor, }, { @@ -554,112 +550,17 @@ func (self *FilesController) ignoreOrExcludeMenu(node *filetree.FileNode) error }) } -func (self *FilesController) HandleWIPCommitPress() error { - skipHookPrefix := self.c.UserConfig.Git.SkipHookPrefix - if skipHookPrefix == "" { - return self.c.ErrorMsg(self.c.Tr.SkipHookPrefixNotConfigured) - } - - self.setCommitMessage(skipHookPrefix) - - return self.HandleCommitPress() -} - -func (self *FilesController) commitPrefixConfigForRepo() *config.CommitPrefixConfig { - cfg, ok := self.c.UserConfig.Git.CommitPrefixes[utils.GetCurrentRepoName()] - if !ok { - return nil - } - - return &cfg -} - -func (self *FilesController) prepareFilesForCommit() error { - noStagedFiles := !self.helpers.WorkingTree.AnyStagedFiles() - if noStagedFiles && self.c.UserConfig.Gui.SkipNoStagedFilesWarning { - self.c.LogAction(self.c.Tr.Actions.StageAllFiles) - err := self.git.WorkingTree.StageAll() - if err != nil { - return err - } - - return self.syncRefresh() - } - - return nil -} - -// for when you need to refetch files before continuing an action. Runs synchronously. -func (self *FilesController) syncRefresh() error { - return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC, Scope: []types.RefreshableView{types.FILES}}) -} - func (self *FilesController) refresh() error { return self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{types.FILES}}) } -func (self *FilesController) HandleCommitPress() error { - if err := self.prepareFilesForCommit(); err != nil { - return self.c.Error(err) - } - - if len(self.model.Files) == 0 { - return self.c.ErrorMsg(self.c.Tr.NoFilesStagedTitle) - } - - if !self.helpers.WorkingTree.AnyStagedFiles() { - return self.promptToStageAllAndRetry(self.HandleCommitPress) - } - - savedCommitMessage := self.getSavedCommitMessage() - if len(savedCommitMessage) > 0 { - self.setCommitMessage(savedCommitMessage) - } else { - commitPrefixConfig := self.commitPrefixConfigForRepo() - if commitPrefixConfig != nil { - prefixPattern := commitPrefixConfig.Pattern - prefixReplace := commitPrefixConfig.Replace - rgx, err := regexp.Compile(prefixPattern) - if err != nil { - return self.c.ErrorMsg(fmt.Sprintf("%s: %s", self.c.Tr.LcCommitPrefixPatternError, err.Error())) - } - prefix := rgx.ReplaceAllString(self.helpers.Refs.GetCheckedOutRef().Name, prefixReplace) - self.setCommitMessage(prefix) - } - } - - if err := self.c.PushContext(self.contexts.CommitMessage); err != nil { - return err - } - - return nil -} - -func (self *FilesController) promptToStageAllAndRetry(retry func() error) error { - return self.c.Confirm(types.ConfirmOpts{ - Title: self.c.Tr.NoFilesStagedTitle, - Prompt: self.c.Tr.NoFilesStagedPrompt, - HandleConfirm: func() error { - self.c.LogAction(self.c.Tr.Actions.StageAllFiles) - if err := self.git.WorkingTree.StageAll(); err != nil { - return self.c.Error(err) - } - if err := self.syncRefresh(); err != nil { - return self.c.Error(err) - } - - return retry() - }, - }) -} - func (self *FilesController) handleAmendCommitPress() error { if len(self.model.Files) == 0 { return self.c.ErrorMsg(self.c.Tr.NoFilesStagedTitle) } if !self.helpers.WorkingTree.AnyStagedFiles() { - return self.promptToStageAllAndRetry(self.handleAmendCommitPress) + return self.helpers.WorkingTree.PromptToStageAllAndRetry(self.handleAmendCommitPress) } if len(self.model.Commits) == 0 { @@ -677,23 +578,6 @@ func (self *FilesController) handleAmendCommitPress() error { }) } -// HandleCommitEditorPress - handle when the user wants to commit changes via -// their editor rather than via the popup panel -func (self *FilesController) HandleCommitEditorPress() error { - if len(self.model.Files) == 0 { - return self.c.ErrorMsg(self.c.Tr.NoFilesStagedTitle) - } - - if !self.helpers.WorkingTree.AnyStagedFiles() { - return self.promptToStageAllAndRetry(self.HandleCommitEditorPress) - } - - self.c.LogAction(self.c.Tr.Actions.Commit) - return self.c.RunSubprocessAndRefresh( - self.git.Commit.CommitEditorCmdObj(), - ) -} - func (self *FilesController) handleStatusFilterPressed() error { return self.c.Menu(types.CreateMenuOptions{ Title: self.c.Tr.FilteringMenuTitle, diff --git a/pkg/gui/controllers/helpers/working_tree_helper.go b/pkg/gui/controllers/helpers/working_tree_helper.go index ab52a37c7..17850b994 100644 --- a/pkg/gui/controllers/helpers/working_tree_helper.go +++ b/pkg/gui/controllers/helpers/working_tree_helper.go @@ -1,9 +1,15 @@ package helpers import ( + "fmt" + "regexp" + "github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands/models" + "github.com/jesseduffield/lazygit/pkg/config" + "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" + "github.com/jesseduffield/lazygit/pkg/utils" ) type IWorkingTreeHelper interface { @@ -14,17 +20,32 @@ type IWorkingTreeHelper interface { } type WorkingTreeHelper struct { - c *types.HelperCommon - git *commands.GitCommand - - model *types.Model + c *types.HelperCommon + git *commands.GitCommand + contexts *context.ContextTree + refHelper *RefsHelper + model *types.Model + setCommitMessage func(message string) + getSavedCommitMessage func() string } -func NewWorkingTreeHelper(c *types.HelperCommon, git *commands.GitCommand, model *types.Model) *WorkingTreeHelper { +func NewWorkingTreeHelper( + c *types.HelperCommon, + git *commands.GitCommand, + contexts *context.ContextTree, + refHelper *RefsHelper, + model *types.Model, + setCommitMessage func(message string), + getSavedCommitMessage func() string, +) *WorkingTreeHelper { return &WorkingTreeHelper{ - c: c, - git: git, - model: model, + c: c, + git: git, + contexts: contexts, + refHelper: refHelper, + model: model, + setCommitMessage: setCommitMessage, + getSavedCommitMessage: getSavedCommitMessage, } } @@ -72,3 +93,115 @@ func (self *WorkingTreeHelper) OpenMergeTool() error { }, }) } + +func (self *WorkingTreeHelper) HandleCommitPress() error { + if err := self.prepareFilesForCommit(); err != nil { + return self.c.Error(err) + } + + if len(self.model.Files) == 0 { + return self.c.ErrorMsg(self.c.Tr.NoFilesStagedTitle) + } + + if !self.AnyStagedFiles() { + return self.PromptToStageAllAndRetry(self.HandleCommitPress) + } + + savedCommitMessage := self.getSavedCommitMessage() + if len(savedCommitMessage) > 0 { + self.setCommitMessage(savedCommitMessage) + } else { + commitPrefixConfig := self.commitPrefixConfigForRepo() + if commitPrefixConfig != nil { + prefixPattern := commitPrefixConfig.Pattern + prefixReplace := commitPrefixConfig.Replace + rgx, err := regexp.Compile(prefixPattern) + if err != nil { + return self.c.ErrorMsg(fmt.Sprintf("%s: %s", self.c.Tr.LcCommitPrefixPatternError, err.Error())) + } + prefix := rgx.ReplaceAllString(self.refHelper.GetCheckedOutRef().Name, prefixReplace) + self.setCommitMessage(prefix) + } + } + + if err := self.c.PushContext(self.contexts.CommitMessage); err != nil { + return err + } + + return nil +} + +// HandleCommitEditorPress - handle when the user wants to commit changes via +// their editor rather than via the popup panel +func (self *WorkingTreeHelper) HandleCommitEditorPress() error { + if len(self.model.Files) == 0 { + return self.c.ErrorMsg(self.c.Tr.NoFilesStagedTitle) + } + + if !self.AnyStagedFiles() { + return self.PromptToStageAllAndRetry(self.HandleCommitEditorPress) + } + + self.c.LogAction(self.c.Tr.Actions.Commit) + return self.c.RunSubprocessAndRefresh( + self.git.Commit.CommitEditorCmdObj(), + ) +} + +func (self *WorkingTreeHelper) HandleWIPCommitPress() error { + skipHookPrefix := self.c.UserConfig.Git.SkipHookPrefix + if skipHookPrefix == "" { + return self.c.ErrorMsg(self.c.Tr.SkipHookPrefixNotConfigured) + } + + self.setCommitMessage(skipHookPrefix) + + return self.HandleCommitPress() +} + +func (self *WorkingTreeHelper) PromptToStageAllAndRetry(retry func() error) error { + return self.c.Confirm(types.ConfirmOpts{ + Title: self.c.Tr.NoFilesStagedTitle, + Prompt: self.c.Tr.NoFilesStagedPrompt, + HandleConfirm: func() error { + self.c.LogAction(self.c.Tr.Actions.StageAllFiles) + if err := self.git.WorkingTree.StageAll(); err != nil { + return self.c.Error(err) + } + if err := self.syncRefresh(); err != nil { + return self.c.Error(err) + } + + return retry() + }, + }) +} + +// for when you need to refetch files before continuing an action. Runs synchronously. +func (self *WorkingTreeHelper) syncRefresh() error { + return self.c.Refresh(types.RefreshOptions{Mode: types.SYNC, Scope: []types.RefreshableView{types.FILES}}) +} + +func (self *WorkingTreeHelper) prepareFilesForCommit() error { + noStagedFiles := !self.AnyStagedFiles() + if noStagedFiles && self.c.UserConfig.Gui.SkipNoStagedFilesWarning { + self.c.LogAction(self.c.Tr.Actions.StageAllFiles) + err := self.git.WorkingTree.StageAll() + if err != nil { + return err + } + + return self.syncRefresh() + } + + return nil +} + +func (self *WorkingTreeHelper) commitPrefixConfigForRepo() *config.CommitPrefixConfig { + cfg, ok := self.c.UserConfig.Git.CommitPrefixes[utils.GetCurrentRepoName()] + if !ok { + return nil + } + + return &cfg +} diff --git a/pkg/gui/controllers/staging_controller.go b/pkg/gui/controllers/staging_controller.go index d41bb1ff5..a141c4740 100644 --- a/pkg/gui/controllers/staging_controller.go +++ b/pkg/gui/controllers/staging_controller.go @@ -73,6 +73,21 @@ func (self *StagingController) GetKeybindings(opts types.KeybindingsOpts) []*typ Handler: self.EditHunkAndRefresh, Description: self.c.Tr.EditHunk, }, + { + Key: opts.GetKey(opts.Config.Files.CommitChanges), + Handler: self.helpers.WorkingTree.HandleCommitPress, + Description: self.c.Tr.CommitChanges, + }, + { + Key: opts.GetKey(opts.Config.Files.CommitChangesWithoutHook), + Handler: self.helpers.WorkingTree.HandleWIPCommitPress, + Description: self.c.Tr.LcCommitChangesWithoutHook, + }, + { + Key: opts.GetKey(opts.Config.Files.CommitChangesWithEditor), + Handler: self.helpers.WorkingTree.HandleCommitEditorPress, + Description: self.c.Tr.CommitChangesWithEditor, + }, } } diff --git a/pkg/integration/tests/commit/staged.go b/pkg/integration/tests/commit/staged.go new file mode 100644 index 000000000..715bc0eb2 --- /dev/null +++ b/pkg/integration/tests/commit/staged.go @@ -0,0 +1,34 @@ +package commit + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var Staged = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Staging a couple files, going in the staged files menu, unstaging a line then committing", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell. + CreateFile("myfile", "myfile content\nwith a second line"). + CreateFile("myfile2", "myfile2 content") + }, + Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { + assert.CommitCount(0) + + input.PrimaryAction() + input.Confirm() + input.PrimaryAction() + input.PressKeys(keys.Files.CommitChanges) + + commitMessage := "my commit message" + input.Type(commitMessage) + input.Confirm() + + assert.CommitCount(1) + assert.MatchHeadCommitMessage(Equals(commitMessage)) + assert.CurrentWindowName("stagingSecondary") + }, +}) diff --git a/pkg/integration/tests/commit/staged_without_hooks.go b/pkg/integration/tests/commit/staged_without_hooks.go new file mode 100644 index 000000000..e1466f8d2 --- /dev/null +++ b/pkg/integration/tests/commit/staged_without_hooks.go @@ -0,0 +1,34 @@ +package commit + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var StagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Staging a couple files, going in the staged files menu, unstaging a line then committing without pre-commit hooks", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell. + CreateFile("myfile", "myfile content\nwith a second line"). + CreateFile("myfile2", "myfile2 content") + }, + Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { + assert.CommitCount(0) + + input.PrimaryAction() + input.Confirm() + input.PrimaryAction() + input.PressKeys(keys.Files.CommitChangesWithoutHook) + + commitMessage := "my commit message" + input.Type(commitMessage) + input.Confirm() + + assert.CommitCount(1) + assert.MatchHeadCommitMessage(Equals("WIP" + commitMessage)) + assert.CurrentWindowName("stagingSecondary") + }, +}) diff --git a/pkg/integration/tests/commit/unstaged.go b/pkg/integration/tests/commit/unstaged.go new file mode 100644 index 000000000..aa8579e2b --- /dev/null +++ b/pkg/integration/tests/commit/unstaged.go @@ -0,0 +1,33 @@ +package commit + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var Unstaged = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Staging a couple files, going in the unstaged files menu, staging a line and committing", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell. + CreateFile("myfile", "myfile content\nwith a second line"). + CreateFile("myfile2", "myfile2 content") + }, + Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { + assert.CommitCount(0) + + input.Confirm() + input.PrimaryAction() + input.PressKeys(keys.Files.CommitChanges) + + commitMessage := "my commit message" + input.Type(commitMessage) + input.Confirm() + + assert.CommitCount(1) + assert.MatchHeadCommitMessage(Equals(commitMessage)) + assert.CurrentWindowName("staging") + }, +}) diff --git a/pkg/integration/tests/commit/unstaged_without_hooks.go b/pkg/integration/tests/commit/unstaged_without_hooks.go new file mode 100644 index 000000000..442316f60 --- /dev/null +++ b/pkg/integration/tests/commit/unstaged_without_hooks.go @@ -0,0 +1,33 @@ +package commit + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var UnstagedWithoutHooks = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Staging a couple files, going in the unstaged files menu, staging a line and committing without pre-commit hooks", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell. + CreateFile("myfile", "myfile content\nwith a second line"). + CreateFile("myfile2", "myfile2 content") + }, + Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { + assert.CommitCount(0) + + input.Confirm() + input.PrimaryAction() + input.PressKeys(keys.Files.CommitChangesWithoutHook) + + commitMessage := "my commit message" + input.Type(commitMessage) + input.Confirm() + + assert.CommitCount(1) + assert.MatchHeadCommitMessage(Equals("WIP" + commitMessage)) + assert.CurrentWindowName("staging") + }, +}) diff --git a/pkg/integration/tests/tests.go b/pkg/integration/tests/tests.go index 6c074bb10..6c4f60026 100644 --- a/pkg/integration/tests/tests.go +++ b/pkg/integration/tests/tests.go @@ -36,6 +36,10 @@ var tests = []*components.IntegrationTest{ cherry_pick.CherryPickConflicts, commit.Commit, commit.NewBranch, + commit.Staged, + commit.Unstaged, + commit.StagedWithoutHooks, + commit.UnstagedWithoutHooks, custom_commands.Basic, custom_commands.FormPrompts, custom_commands.MenuFromCommand, diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/commit/staged/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..8a744b4fe --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +my commit message diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/commit/staged/expected/repo/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/HEAD b/test/integration_new/commit/staged/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/MERGE_RR b/test/integration_new/commit/staged/expected/repo/.git_keep/MERGE_RR new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/config b/test/integration_new/commit/staged/expected/repo/.git_keep/config new file mode 100644 index 000000000..2b89b8630 --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/config @@ -0,0 +1,12 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[user] + email = CI@example.com + name = CI +[commit] + gpgSign = false +[protocol "file"] + allow = always diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/description b/test/integration_new/commit/staged/expected/repo/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/index b/test/integration_new/commit/staged/expected/repo/.git_keep/index new file mode 100644 index 000000000..6ca933f52 Binary files /dev/null and b/test/integration_new/commit/staged/expected/repo/.git_keep/index differ diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/info/exclude b/test/integration_new/commit/staged/expected/repo/.git_keep/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/logs/HEAD b/test/integration_new/commit/staged/expected/repo/.git_keep/logs/HEAD new file mode 100644 index 000000000..277243a2e --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 CI 1669569482 +0100 commit (initial): my commit message diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/commit/staged/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..277243a2e --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 CI 1669569482 +0100 commit (initial): my commit message diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 new file mode 100644 index 000000000..75197c7e9 Binary files /dev/null and b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 differ diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa new file mode 100644 index 000000000..8a26026cd Binary files /dev/null and b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa differ diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a0/a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a0/a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 new file mode 100644 index 000000000..c03b37b1d --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a0/a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 @@ -0,0 +1,2 @@ +xM +0]o/H~%PGJAoo fDd(9XkYq(`$glҕct٨mi4_fY8&2!$0Z:j>SW_Bm-0 \ No newline at end of file diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 new file mode 100644 index 000000000..d746db209 Binary files /dev/null and b/test/integration_new/commit/staged/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 differ diff --git a/test/integration_new/commit/staged/expected/repo/.git_keep/refs/heads/master b/test/integration_new/commit/staged/expected/repo/.git_keep/refs/heads/master new file mode 100644 index 000000000..8aa84085c --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/.git_keep/refs/heads/master @@ -0,0 +1 @@ +a0a4dfd8937f66345c93ee7ebf5f85d53e05e9e8 diff --git a/test/integration_new/commit/staged/expected/repo/myfile b/test/integration_new/commit/staged/expected/repo/myfile new file mode 100644 index 000000000..45e15f2c1 --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/myfile @@ -0,0 +1,2 @@ +myfile content +with a second line \ No newline at end of file diff --git a/test/integration_new/commit/staged/expected/repo/myfile2 b/test/integration_new/commit/staged/expected/repo/myfile2 new file mode 100644 index 000000000..9704090f8 --- /dev/null +++ b/test/integration_new/commit/staged/expected/repo/myfile2 @@ -0,0 +1 @@ +myfile2 content \ No newline at end of file diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..4a4f03e0a --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +WIPmy commit message diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/HEAD b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/MERGE_RR b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/MERGE_RR new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/config b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/config new file mode 100644 index 000000000..2b89b8630 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/config @@ -0,0 +1,12 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[user] + email = CI@example.com + name = CI +[commit] + gpgSign = false +[protocol "file"] + allow = always diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/description b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/index b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/index new file mode 100644 index 000000000..6ca933f52 Binary files /dev/null and b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/index differ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/info/exclude b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/HEAD b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/HEAD new file mode 100644 index 000000000..1c6b9a7b2 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 4a33e6274dd3bc702442966e6774e7688bb7af64 CI 1669660775 +0100 commit (initial): WIPmy commit message diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..1c6b9a7b2 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 4a33e6274dd3bc702442966e6774e7688bb7af64 CI 1669660775 +0100 commit (initial): WIPmy commit message diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 new file mode 100644 index 000000000..75197c7e9 Binary files /dev/null and b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/2c/32ecbb77ddbbb0584ceae9316e290da7733327 differ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa new file mode 100644 index 000000000..8a26026cd Binary files /dev/null and b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/45/e15f2c1a4f47adeba3dbfc075e46a574f9b1fa differ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/4a/33e6274dd3bc702442966e6774e7688bb7af64 b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/4a/33e6274dd3bc702442966e6774e7688bb7af64 new file mode 100644 index 000000000..90e89ac27 Binary files /dev/null and b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/4a/33e6274dd3bc702442966e6774e7688bb7af64 differ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 new file mode 100644 index 000000000..d746db209 Binary files /dev/null and b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/objects/a4/de8e0658023fb43037b687b5052c1b5b2ab0c3 differ diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/refs/heads/master b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/refs/heads/master new file mode 100644 index 000000000..8180a7984 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/.git_keep/refs/heads/master @@ -0,0 +1 @@ +4a33e6274dd3bc702442966e6774e7688bb7af64 diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/myfile b/test/integration_new/commit/staged_without_hooks/expected/repo/myfile new file mode 100644 index 000000000..45e15f2c1 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/myfile @@ -0,0 +1,2 @@ +myfile content +with a second line \ No newline at end of file diff --git a/test/integration_new/commit/staged_without_hooks/expected/repo/myfile2 b/test/integration_new/commit/staged_without_hooks/expected/repo/myfile2 new file mode 100644 index 000000000..9704090f8 --- /dev/null +++ b/test/integration_new/commit/staged_without_hooks/expected/repo/myfile2 @@ -0,0 +1 @@ +myfile2 content \ No newline at end of file diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/commit/unstaged/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..8a744b4fe --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +my commit message diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/commit/unstaged/expected/repo/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/HEAD b/test/integration_new/commit/unstaged/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/MERGE_RR b/test/integration_new/commit/unstaged/expected/repo/.git_keep/MERGE_RR new file mode 100644 index 000000000..e69de29bb diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/config b/test/integration_new/commit/unstaged/expected/repo/.git_keep/config new file mode 100644 index 000000000..2b89b8630 --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/config @@ -0,0 +1,12 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[user] + email = CI@example.com + name = CI +[commit] + gpgSign = false +[protocol "file"] + allow = always diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/description b/test/integration_new/commit/unstaged/expected/repo/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/index b/test/integration_new/commit/unstaged/expected/repo/.git_keep/index new file mode 100644 index 000000000..e4b059071 Binary files /dev/null and b/test/integration_new/commit/unstaged/expected/repo/.git_keep/index differ diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/info/exclude b/test/integration_new/commit/unstaged/expected/repo/.git_keep/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/HEAD b/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/HEAD new file mode 100644 index 000000000..2889f13ff --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 109e5843c76c640d7075c2897b5720f1714df776 CI 1669569750 +0100 commit (initial): my commit message diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..2889f13ff --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 109e5843c76c640d7075c2897b5720f1714df776 CI 1669569750 +0100 commit (initial): my commit message diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b b/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b new file mode 100644 index 000000000..5bdcb3903 Binary files /dev/null and b/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b differ diff --git a/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/10/9e5843c76c640d7075c2897b5720f1714df776 b/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/10/9e5843c76c640d7075c2897b5720f1714df776 new file mode 100644 index 000000000..118e4d39c --- /dev/null +++ b/test/integration_new/commit/unstaged/expected/repo/.git_keep/objects/10/9e5843c76c640d7075c2897b5720f1714df776 @@ -0,0 +1,2 @@ +xK +0@]$ DzL2~!F[nJ3wH*5KIQt 1DA 1669660788 +0100 commit (initial): WIPmy commit message diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..59e73348a --- /dev/null +++ b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 ebc03af0e92eb50f1ab1dec0697880ed9da9b02d CI 1669660788 +0100 commit (initial): WIPmy commit message diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b new file mode 100644 index 000000000..5bdcb3903 Binary files /dev/null and b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/00/e2463e8a06d3191bd825531e5dbf26bac22d6b differ diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/e7/bcdb57454dacf229e5be8122bb27bb56d78dba b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/e7/bcdb57454dacf229e5be8122bb27bb56d78dba new file mode 100644 index 000000000..765928979 --- /dev/null +++ b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/e7/bcdb57454dacf229e5be8122bb27bb56d78dba @@ -0,0 +1 @@ +x+)JMU06a040031QȭLIe`xfvYRj\~]t \ No newline at end of file diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/eb/c03af0e92eb50f1ab1dec0697880ed9da9b02d b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/eb/c03af0e92eb50f1ab1dec0697880ed9da9b02d new file mode 100644 index 000000000..138168db2 Binary files /dev/null and b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/objects/eb/c03af0e92eb50f1ab1dec0697880ed9da9b02d differ diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/refs/heads/master b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/refs/heads/master new file mode 100644 index 000000000..0cbc090e2 --- /dev/null +++ b/test/integration_new/commit/unstaged_without_hooks/expected/repo/.git_keep/refs/heads/master @@ -0,0 +1 @@ +ebc03af0e92eb50f1ab1dec0697880ed9da9b02d diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile b/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile new file mode 100644 index 000000000..45e15f2c1 --- /dev/null +++ b/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile @@ -0,0 +1,2 @@ +myfile content +with a second line \ No newline at end of file diff --git a/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile2 b/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile2 new file mode 100644 index 000000000..9704090f8 --- /dev/null +++ b/test/integration_new/commit/unstaged_without_hooks/expected/repo/myfile2 @@ -0,0 +1 @@ +myfile2 content \ No newline at end of file