mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-17 22:32:58 +02:00
Non-sticky range selection diff (#3869)
- **PR Description** When selecting a range of commits, show the combined diff for them. Along the way, fix a few minor issues with the current implementation of diffing mode; see the individual commit messages for details. Fixes #3862. - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [ ] If a new UserConfig entry was added, make sure it can be hot-reloaded (see [here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig)) * [ ] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
This commit is contained in:
commit
2f01af49e8
@ -53,6 +53,10 @@ func (b *Branch) RefName() string {
|
|||||||
return b.Name
|
return b.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *Branch) ShortRefName() string {
|
||||||
|
return b.RefName()
|
||||||
|
}
|
||||||
|
|
||||||
func (b *Branch) ParentRefName() string {
|
func (b *Branch) ParentRefName() string {
|
||||||
return b.RefName() + "^"
|
return b.RefName() + "^"
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,10 @@ func (c *Commit) RefName() string {
|
|||||||
return c.Hash
|
return c.Hash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Commit) ShortRefName() string {
|
||||||
|
return c.Hash[:7]
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Commit) ParentRefName() string {
|
func (c *Commit) ParentRefName() string {
|
||||||
if c.IsFirstCommit() {
|
if c.IsFirstCommit() {
|
||||||
return EmptyTreeCommitHash
|
return EmptyTreeCommitHash
|
||||||
|
@ -18,6 +18,10 @@ func (r *RemoteBranch) RefName() string {
|
|||||||
return r.FullName()
|
return r.FullName()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *RemoteBranch) ShortRefName() string {
|
||||||
|
return r.RefName()
|
||||||
|
}
|
||||||
|
|
||||||
func (r *RemoteBranch) ParentRefName() string {
|
func (r *RemoteBranch) ParentRefName() string {
|
||||||
return r.RefName() + "^"
|
return r.RefName() + "^"
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,10 @@ func (s *StashEntry) RefName() string {
|
|||||||
return fmt.Sprintf("stash@{%d}", s.Index)
|
return fmt.Sprintf("stash@{%d}", s.Index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *StashEntry) ShortRefName() string {
|
||||||
|
return s.RefName()
|
||||||
|
}
|
||||||
|
|
||||||
func (s *StashEntry) ParentRefName() string {
|
func (s *StashEntry) ParentRefName() string {
|
||||||
return s.RefName() + "^"
|
return s.RefName() + "^"
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,10 @@ func (t *Tag) RefName() string {
|
|||||||
return t.Name
|
return t.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *Tag) ShortRefName() string {
|
||||||
|
return t.RefName()
|
||||||
|
}
|
||||||
|
|
||||||
func (t *Tag) ParentRefName() string {
|
func (t *Tag) ParentRefName() string {
|
||||||
return t.RefName() + "^"
|
return t.RefName() + "^"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package context
|
package context
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"github.com/jesseduffield/gocui"
|
"github.com/jesseduffield/gocui"
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/filetree"
|
"github.com/jesseduffield/lazygit/pkg/gui/filetree"
|
||||||
@ -75,6 +77,25 @@ func (self *CommitFilesContext) GetDiffTerminals() []string {
|
|||||||
return []string{self.GetRef().RefName()}
|
return []string{self.GetRef().RefName()}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *CommitFilesContext) GetFromAndToForDiff() (string, string) {
|
||||||
|
if refs := self.GetRefRange(); refs != nil {
|
||||||
|
return refs.From.ParentRefName(), refs.To.RefName()
|
||||||
|
}
|
||||||
|
ref := self.GetRef()
|
||||||
|
return ref.ParentRefName(), ref.RefName()
|
||||||
|
}
|
||||||
|
|
||||||
func (self *CommitFilesContext) ModelSearchResults(searchStr string, caseSensitive bool) []gocui.SearchPosition {
|
func (self *CommitFilesContext) ModelSearchResults(searchStr string, caseSensitive bool) []gocui.SearchPosition {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *CommitFilesContext) ReInit(ref types.Ref, refRange *types.RefRange) {
|
||||||
|
self.SetRef(ref)
|
||||||
|
self.SetRefRange(refRange)
|
||||||
|
if refRange != nil {
|
||||||
|
self.SetTitleRef(fmt.Sprintf("%s-%s", refRange.From.ShortRefName(), refRange.To.ShortRefName()))
|
||||||
|
} else {
|
||||||
|
self.SetTitleRef(ref.Description())
|
||||||
|
}
|
||||||
|
self.GetView().Title = self.Title()
|
||||||
|
}
|
||||||
|
@ -128,6 +128,19 @@ func (self *LocalCommitsContext) GetSelectedRef() types.Ref {
|
|||||||
return commit
|
return commit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *LocalCommitsContext) GetSelectedRefRangeForDiffFiles() *types.RefRange {
|
||||||
|
commits, startIdx, endIdx := self.GetSelectedItems()
|
||||||
|
if commits == nil || startIdx == endIdx {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
from := commits[len(commits)-1]
|
||||||
|
to := commits[0]
|
||||||
|
if from.IsTODO() || to.IsTODO() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return &types.RefRange{From: from, To: to}
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the commit hash of the selected commit, or an empty string if no
|
// Returns the commit hash of the selected commit, or an empty string if no
|
||||||
// commit is selected
|
// commit is selected
|
||||||
func (self *LocalCommitsContext) GetSelectedCommitHash() string {
|
func (self *LocalCommitsContext) GetSelectedCommitHash() string {
|
||||||
|
@ -71,6 +71,11 @@ func (self *ReflogCommitsContext) GetSelectedRef() types.Ref {
|
|||||||
return commit
|
return commit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *ReflogCommitsContext) GetSelectedRefRangeForDiffFiles() *types.RefRange {
|
||||||
|
// It doesn't make much sense to show a range diff between two reflog entries.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (self *ReflogCommitsContext) GetCommits() []*models.Commit {
|
func (self *ReflogCommitsContext) GetCommits() []*models.Commit {
|
||||||
return self.getModel()
|
return self.getModel()
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,11 @@ func (self *StashContext) GetSelectedRef() types.Ref {
|
|||||||
return stash
|
return stash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *StashContext) GetSelectedRefRangeForDiffFiles() *types.RefRange {
|
||||||
|
// It doesn't make much sense to show a range diff between two stash entries.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (self *StashContext) GetDiffTerminals() []string {
|
func (self *StashContext) GetDiffTerminals() []string {
|
||||||
itemId := self.GetSelectedItemId()
|
itemId := self.GetSelectedItemId()
|
||||||
|
|
||||||
|
@ -186,6 +186,19 @@ func (self *SubCommitsContext) GetSelectedRef() types.Ref {
|
|||||||
return commit
|
return commit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *SubCommitsContext) GetSelectedRefRangeForDiffFiles() *types.RefRange {
|
||||||
|
commits, startIdx, endIdx := self.GetSelectedItems()
|
||||||
|
if commits == nil || startIdx == endIdx {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
from := commits[len(commits)-1]
|
||||||
|
to := commits[0]
|
||||||
|
if from.Divergence != to.Divergence {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return &types.RefRange{From: from, To: to}
|
||||||
|
}
|
||||||
|
|
||||||
func (self *SubCommitsContext) GetCommits() []*models.Commit {
|
func (self *SubCommitsContext) GetCommits() []*models.Commit {
|
||||||
return self.getModel()
|
return self.getModel()
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,7 @@ func (gui *Gui) resetHelpersAndControllers() {
|
|||||||
gui.State.Contexts.Stash,
|
gui.State.Contexts.Stash,
|
||||||
} {
|
} {
|
||||||
controllers.AttachControllers(context, controllers.NewSwitchToDiffFilesController(
|
controllers.AttachControllers(context, controllers.NewSwitchToDiffFilesController(
|
||||||
common, context, gui.State.Contexts.CommitFiles,
|
common, context,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,9 +136,8 @@ func (self *CommitFilesController) GetOnRenderToMain() func() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
ref := self.context().GetRef()
|
from, to := self.context().GetFromAndToForDiff()
|
||||||
to := ref.RefName()
|
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(from)
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
|
||||||
|
|
||||||
cmdObj := self.c.Git().WorkingTree.ShowFileDiffCmdObj(from, to, reverse, node.GetPath(), false)
|
cmdObj := self.c.Git().WorkingTree.ShowFileDiffCmdObj(from, to, reverse, node.GetPath(), false)
|
||||||
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
||||||
@ -250,9 +249,8 @@ func (self *CommitFilesController) canEditFiles(nodes []*filetree.CommitFileNode
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *CommitFilesController) openDiffTool(node *filetree.CommitFileNode) error {
|
func (self *CommitFilesController) openDiffTool(node *filetree.CommitFileNode) error {
|
||||||
ref := self.context().GetRef()
|
from, to := self.context().GetFromAndToForDiff()
|
||||||
to := ref.RefName()
|
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(from)
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
|
||||||
_, err := self.c.RunSubprocess(self.c.Git().Diff.OpenDiffToolCmdObj(
|
_, err := self.c.RunSubprocess(self.c.Git().Diff.OpenDiffToolCmdObj(
|
||||||
git_commands.DiffToolCmdOptions{
|
git_commands.DiffToolCmdOptions{
|
||||||
Filepath: node.GetPath(),
|
Filepath: node.GetPath(),
|
||||||
@ -307,7 +305,8 @@ func (self *CommitFilesController) toggleForPatch(selectedNodes []*filetree.Comm
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.c.Git().Patch.PatchBuilder.Active() && self.c.Git().Patch.PatchBuilder.To != self.context().GetRef().RefName() {
|
from, to, reverse := self.currentFromToReverseForPatchBuilding()
|
||||||
|
if self.c.Git().Patch.PatchBuilder.Active() && self.c.Git().Patch.PatchBuilder.NewPatchRequired(from, to, reverse) {
|
||||||
return self.c.Confirm(types.ConfirmOpts{
|
return self.c.Confirm(types.ConfirmOpts{
|
||||||
Title: self.c.Tr.DiscardPatch,
|
Title: self.c.Tr.DiscardPatch,
|
||||||
Prompt: self.c.Tr.DiscardPatchConfirm,
|
Prompt: self.c.Tr.DiscardPatchConfirm,
|
||||||
@ -330,14 +329,20 @@ func (self *CommitFilesController) startPatchBuilder() error {
|
|||||||
commitFilesContext := self.context()
|
commitFilesContext := self.context()
|
||||||
|
|
||||||
canRebase := commitFilesContext.GetCanRebase()
|
canRebase := commitFilesContext.GetCanRebase()
|
||||||
ref := commitFilesContext.GetRef()
|
from, to, reverse := self.currentFromToReverseForPatchBuilding()
|
||||||
to := ref.RefName()
|
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
|
||||||
|
|
||||||
self.c.Git().Patch.PatchBuilder.Start(from, to, reverse, canRebase)
|
self.c.Git().Patch.PatchBuilder.Start(from, to, reverse, canRebase)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *CommitFilesController) currentFromToReverseForPatchBuilding() (string, string, bool) {
|
||||||
|
commitFilesContext := self.context()
|
||||||
|
|
||||||
|
from, to := commitFilesContext.GetFromAndToForDiff()
|
||||||
|
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(from)
|
||||||
|
return from, to, reverse
|
||||||
|
}
|
||||||
|
|
||||||
func (self *CommitFilesController) enter(node *filetree.CommitFileNode) error {
|
func (self *CommitFilesController) enter(node *filetree.CommitFileNode) error {
|
||||||
return self.enterCommitFile(node, types.OnFocusOpts{ClickedWindowName: "", ClickedViewLineIdx: -1})
|
return self.enterCommitFile(node, types.OnFocusOpts{ClickedWindowName: "", ClickedViewLineIdx: -1})
|
||||||
}
|
}
|
||||||
@ -357,7 +362,8 @@ func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode
|
|||||||
return self.c.Context().Push(self.c.Contexts().CustomPatchBuilder, opts)
|
return self.c.Context().Push(self.c.Contexts().CustomPatchBuilder, opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.c.Git().Patch.PatchBuilder.Active() && self.c.Git().Patch.PatchBuilder.To != self.context().GetRef().RefName() {
|
from, to, reverse := self.currentFromToReverseForPatchBuilding()
|
||||||
|
if self.c.Git().Patch.PatchBuilder.Active() && self.c.Git().Patch.PatchBuilder.NewPatchRequired(from, to, reverse) {
|
||||||
return self.c.Confirm(types.ConfirmOpts{
|
return self.c.Confirm(types.ConfirmOpts{
|
||||||
Title: self.c.Tr.DiscardPatch,
|
Title: self.c.Tr.DiscardPatch,
|
||||||
Prompt: self.c.Tr.DiscardPatchConfirm,
|
Prompt: self.c.Tr.DiscardPatchConfirm,
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package helpers
|
package helpers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/modes/diffing"
|
"github.com/jesseduffield/lazygit/pkg/gui/modes/diffing"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
)
|
)
|
||||||
@ -19,7 +23,7 @@ func NewDiffHelper(c *HelperCommon) *DiffHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *DiffHelper) DiffArgs() []string {
|
func (self *DiffHelper) DiffArgs() []string {
|
||||||
output := []string{self.c.Modes().Diffing.Ref}
|
output := []string{"--stat", "-p", self.c.Modes().Diffing.Ref}
|
||||||
|
|
||||||
right := self.currentDiffTerminal()
|
right := self.currentDiffTerminal()
|
||||||
if right != "" {
|
if right != "" {
|
||||||
@ -46,14 +50,46 @@ func (self *DiffHelper) DiffArgs() []string {
|
|||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Returns an update task that can be passed to RenderToMainViews to render a
|
||||||
|
// diff for the selected commit(s). We need to pass both the selected commit
|
||||||
|
// and the refRange for a range selection. If the refRange is nil (meaning that
|
||||||
|
// either there's no range, or it can't be diffed for some reason), then we want
|
||||||
|
// to fall back to rendering the diff for the single commit.
|
||||||
|
func (self *DiffHelper) GetUpdateTaskForRenderingCommitsDiff(commit *models.Commit, refRange *types.RefRange) types.UpdateTask {
|
||||||
|
if refRange != nil {
|
||||||
|
from, to := refRange.From, refRange.To
|
||||||
|
args := []string{from.ParentRefName(), to.RefName(), "--stat", "-p"}
|
||||||
|
if self.c.GetAppState().IgnoreWhitespaceInDiffView {
|
||||||
|
args = append(args, "--ignore-all-space")
|
||||||
|
}
|
||||||
|
args = append(args, "--")
|
||||||
|
if path := self.c.Modes().Filtering.GetPath(); path != "" {
|
||||||
|
args = append(args, path)
|
||||||
|
}
|
||||||
|
cmdObj := self.c.Git().Diff.DiffCmdObj(args)
|
||||||
|
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
||||||
|
task.Prefix = style.FgYellow.Sprintf("%s %s-%s\n\n", self.c.Tr.ShowingDiffForRange, from.ShortRefName(), to.ShortRefName())
|
||||||
|
return task
|
||||||
|
}
|
||||||
|
|
||||||
|
cmdObj := self.c.Git().Commit.ShowCmdObj(commit.Hash, self.c.Modes().Filtering.GetPath())
|
||||||
|
return types.NewRunPtyTask(cmdObj.GetCmd())
|
||||||
|
}
|
||||||
|
|
||||||
func (self *DiffHelper) ExitDiffMode() error {
|
func (self *DiffHelper) ExitDiffMode() error {
|
||||||
self.c.Modes().Diffing = diffing.New()
|
self.c.Modes().Diffing = diffing.New()
|
||||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *DiffHelper) RenderDiff() error {
|
func (self *DiffHelper) RenderDiff() error {
|
||||||
cmdObj := self.c.Git().Diff.DiffCmdObj(self.DiffArgs())
|
args := self.DiffArgs()
|
||||||
|
cmdObj := self.c.Git().Diff.DiffCmdObj(args)
|
||||||
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
task := types.NewRunPtyTask(cmdObj.GetCmd())
|
||||||
|
task.Prefix = style.FgMagenta.Sprintf(
|
||||||
|
"%s %s\n\n",
|
||||||
|
self.c.Tr.ShowingGitDiff,
|
||||||
|
"git diff "+strings.Join(args, " "),
|
||||||
|
)
|
||||||
|
|
||||||
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||||
Pair: self.c.MainViewPairs().Normal,
|
Pair: self.c.MainViewPairs().Normal,
|
||||||
|
@ -73,9 +73,8 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
ref := self.c.Contexts().CommitFiles.CommitFileTreeViewModel.GetRef()
|
from, to := self.c.Contexts().CommitFiles.GetFromAndToForDiff()
|
||||||
to := ref.RefName()
|
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(from)
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
|
||||||
diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true)
|
diff, err := self.c.Git().WorkingTree.ShowFileDiff(from, to, reverse, path, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -285,8 +285,8 @@ func (self *RefreshHelper) refreshCommitsAndCommitFiles() {
|
|||||||
// For now the awkwardness remains.
|
// For now the awkwardness remains.
|
||||||
commit := self.c.Contexts().LocalCommits.GetSelected()
|
commit := self.c.Contexts().LocalCommits.GetSelected()
|
||||||
if commit != nil && commit.RefName() != "" {
|
if commit != nil && commit.RefName() != "" {
|
||||||
self.c.Contexts().CommitFiles.SetRef(commit)
|
refRange := self.c.Contexts().LocalCommits.GetSelectedRefRangeForDiffFiles()
|
||||||
self.c.Contexts().CommitFiles.SetTitleRef(commit.RefName())
|
self.c.Contexts().CommitFiles.ReInit(commit, refRange)
|
||||||
_ = self.refreshCommitFilesContext()
|
_ = self.refreshCommitFilesContext()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,9 +387,8 @@ func (self *RefreshHelper) RefreshAuthors(commits []*models.Commit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *RefreshHelper) refreshCommitFilesContext() error {
|
func (self *RefreshHelper) refreshCommitFilesContext() error {
|
||||||
ref := self.c.Contexts().CommitFiles.GetRef()
|
from, to := self.c.Contexts().CommitFiles.GetFromAndToForDiff()
|
||||||
to := ref.RefName()
|
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(from)
|
||||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(ref.ParentRefName())
|
|
||||||
|
|
||||||
files, err := self.c.Git().Loaders.CommitFileLoader.GetFilesInDiff(from, to, reverse)
|
files, err := self.c.Git().Loaders.CommitFileLoader.GetFilesInDiff(from, to, reverse)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -290,8 +290,8 @@ func (self *LocalCommitsController) GetOnRenderToMain() func() error {
|
|||||||
task = types.NewRenderStringTask(
|
task = types.NewRenderStringTask(
|
||||||
self.c.Tr.ExecCommandHere + "\n\n" + commit.Name)
|
self.c.Tr.ExecCommandHere + "\n\n" + commit.Name)
|
||||||
} else {
|
} else {
|
||||||
cmdObj := self.c.Git().Commit.ShowCmdObj(commit.Hash, self.c.Modes().Filtering.GetPath())
|
refRange := self.context().GetSelectedRefRangeForDiffFiles()
|
||||||
task = types.NewRunPtyTask(cmdObj.GetCmd())
|
task = self.c.Helpers().Diff.GetUpdateTaskForRenderingCommitsDiff(commit, refRange)
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||||
|
@ -46,9 +46,8 @@ func (self *SubCommitsController) GetOnRenderToMain() func() error {
|
|||||||
if commit == nil {
|
if commit == nil {
|
||||||
task = types.NewRenderStringTask("No commits")
|
task = types.NewRenderStringTask("No commits")
|
||||||
} else {
|
} else {
|
||||||
cmdObj := self.c.Git().Commit.ShowCmdObj(commit.Hash, self.c.Modes().Filtering.GetPath())
|
refRange := self.context().GetSelectedRefRangeForDiffFiles()
|
||||||
|
task = self.c.Helpers().Diff.GetUpdateTaskForRenderingCommitsDiff(commit, refRange)
|
||||||
task = types.NewRunPtyTask(cmdObj.GetCmd())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
return self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -13,36 +12,25 @@ type CanSwitchToDiffFiles interface {
|
|||||||
types.IListContext
|
types.IListContext
|
||||||
CanRebase() bool
|
CanRebase() bool
|
||||||
GetSelectedRef() types.Ref
|
GetSelectedRef() types.Ref
|
||||||
|
GetSelectedRefRangeForDiffFiles() *types.RefRange
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not using our ListControllerTrait because our 'selected' item is not a list item
|
// Not using our ListControllerTrait because we have our own way of working with
|
||||||
// but an attribute on it i.e. the ref of an item.
|
// range selections that's different from ListControllerTrait's
|
||||||
type SwitchToDiffFilesController struct {
|
type SwitchToDiffFilesController struct {
|
||||||
baseController
|
baseController
|
||||||
*ListControllerTrait[types.Ref]
|
c *ControllerCommon
|
||||||
c *ControllerCommon
|
context CanSwitchToDiffFiles
|
||||||
context CanSwitchToDiffFiles
|
|
||||||
diffFilesContext *context.CommitFilesContext
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSwitchToDiffFilesController(
|
func NewSwitchToDiffFilesController(
|
||||||
c *ControllerCommon,
|
c *ControllerCommon,
|
||||||
context CanSwitchToDiffFiles,
|
context CanSwitchToDiffFiles,
|
||||||
diffFilesContext *context.CommitFilesContext,
|
|
||||||
) *SwitchToDiffFilesController {
|
) *SwitchToDiffFilesController {
|
||||||
return &SwitchToDiffFilesController{
|
return &SwitchToDiffFilesController{
|
||||||
baseController: baseController{},
|
baseController: baseController{},
|
||||||
ListControllerTrait: NewListControllerTrait[types.Ref](
|
c: c,
|
||||||
c,
|
context: context,
|
||||||
context,
|
|
||||||
context.GetSelectedRef,
|
|
||||||
func() ([]types.Ref, int, int) {
|
|
||||||
panic("Not implemented")
|
|
||||||
},
|
|
||||||
),
|
|
||||||
c: c,
|
|
||||||
context: context,
|
|
||||||
diffFilesContext: diffFilesContext,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,8 +38,8 @@ func (self *SwitchToDiffFilesController) GetKeybindings(opts types.KeybindingsOp
|
|||||||
bindings := []*types.Binding{
|
bindings := []*types.Binding{
|
||||||
{
|
{
|
||||||
Key: opts.GetKey(opts.Config.Universal.GoInto),
|
Key: opts.GetKey(opts.Config.Universal.GoInto),
|
||||||
Handler: self.withItem(self.enter),
|
Handler: self.enter,
|
||||||
GetDisabledReason: self.require(self.singleItemSelected(self.itemRepresentsCommit)),
|
GetDisabledReason: self.canEnter,
|
||||||
Description: self.c.Tr.ViewItemFiles,
|
Description: self.c.Tr.ViewItemFiles,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -59,29 +47,43 @@ func (self *SwitchToDiffFilesController) GetKeybindings(opts types.KeybindingsOp
|
|||||||
return bindings
|
return bindings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *SwitchToDiffFilesController) Context() types.Context {
|
||||||
|
return self.context
|
||||||
|
}
|
||||||
|
|
||||||
func (self *SwitchToDiffFilesController) GetOnClick() func() error {
|
func (self *SwitchToDiffFilesController) GetOnClick() func() error {
|
||||||
return self.withItemGraceful(self.enter)
|
return func() error {
|
||||||
|
if self.canEnter() == nil {
|
||||||
|
return self.enter()
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *SwitchToDiffFilesController) enter(ref types.Ref) error {
|
func (self *SwitchToDiffFilesController) enter() error {
|
||||||
return self.viewFiles(SwitchToCommitFilesContextOpts{
|
ref := self.context.GetSelectedRef()
|
||||||
Ref: ref,
|
refsRange := self.context.GetSelectedRefRangeForDiffFiles()
|
||||||
CanRebase: self.context.CanRebase(),
|
commitFilesContext := self.c.Contexts().CommitFiles
|
||||||
Context: self.context,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (self *SwitchToDiffFilesController) viewFiles(opts SwitchToCommitFilesContextOpts) error {
|
canRebase := self.context.CanRebase()
|
||||||
diffFilesContext := self.diffFilesContext
|
if canRebase {
|
||||||
|
if self.c.Modes().Diffing.Active() {
|
||||||
|
if self.c.Modes().Diffing.Ref != ref.RefName() {
|
||||||
|
canRebase = false
|
||||||
|
}
|
||||||
|
} else if refsRange != nil {
|
||||||
|
canRebase = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
diffFilesContext.SetSelection(0)
|
commitFilesContext.ReInit(ref, refsRange)
|
||||||
diffFilesContext.SetRef(opts.Ref)
|
commitFilesContext.SetSelection(0)
|
||||||
diffFilesContext.SetTitleRef(opts.Ref.Description())
|
commitFilesContext.SetCanRebase(canRebase)
|
||||||
diffFilesContext.SetCanRebase(opts.CanRebase)
|
commitFilesContext.SetParentContext(self.context)
|
||||||
diffFilesContext.SetParentContext(opts.Context)
|
commitFilesContext.SetWindowName(self.context.GetWindowName())
|
||||||
diffFilesContext.SetWindowName(opts.Context.GetWindowName())
|
commitFilesContext.ClearSearchString()
|
||||||
diffFilesContext.ClearSearchString()
|
commitFilesContext.GetView().TitlePrefix = self.context.GetView().TitlePrefix
|
||||||
diffFilesContext.GetView().TitlePrefix = opts.Context.GetView().TitlePrefix
|
|
||||||
|
|
||||||
if err := self.c.Refresh(types.RefreshOptions{
|
if err := self.c.Refresh(types.RefreshOptions{
|
||||||
Scope: []types.RefreshableView{types.COMMIT_FILES},
|
Scope: []types.RefreshableView{types.COMMIT_FILES},
|
||||||
@ -89,10 +91,18 @@ func (self *SwitchToDiffFilesController) viewFiles(opts SwitchToCommitFilesConte
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return self.c.Context().Push(diffFilesContext)
|
return self.c.Context().Push(commitFilesContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *SwitchToDiffFilesController) itemRepresentsCommit(ref types.Ref) *types.DisabledReason {
|
func (self *SwitchToDiffFilesController) canEnter() *types.DisabledReason {
|
||||||
|
refRange := self.context.GetSelectedRefRangeForDiffFiles()
|
||||||
|
if refRange != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
ref := self.context.GetSelectedRef()
|
||||||
|
if ref == nil {
|
||||||
|
return &types.DisabledReason{Text: self.c.Tr.NoItemSelected}
|
||||||
|
}
|
||||||
if ref.RefName() == "" {
|
if ref.RefName() == "" {
|
||||||
return &types.DisabledReason{Text: self.c.Tr.SelectedItemDoesNotHaveFiles}
|
return &types.DisabledReason{Text: self.c.Tr.SelectedItemDoesNotHaveFiles}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package controllers
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
// all fields mandatory (except `CanRebase` because it's boolean)
|
|
||||||
type SwitchToCommitFilesContextOpts struct {
|
|
||||||
// this is something like a commit or branch
|
|
||||||
Ref types.Ref
|
|
||||||
|
|
||||||
// from the local commits view we're allowed to do rebase stuff with any patch
|
|
||||||
// we generate from the diff files context, but we don't have that same ability
|
|
||||||
// with say the sub commits context or the reflog context.
|
|
||||||
CanRebase bool
|
|
||||||
|
|
||||||
Context types.Context
|
|
||||||
}
|
|
@ -16,6 +16,8 @@ type ICommitFileTreeViewModel interface {
|
|||||||
|
|
||||||
GetRef() types.Ref
|
GetRef() types.Ref
|
||||||
SetRef(types.Ref)
|
SetRef(types.Ref)
|
||||||
|
GetRefRange() *types.RefRange // can be nil, in which case GetRef should be used
|
||||||
|
SetRefRange(*types.RefRange) // should be set to nil when selection is not a range
|
||||||
GetCanRebase() bool
|
GetCanRebase() bool
|
||||||
SetCanRebase(bool)
|
SetCanRebase(bool)
|
||||||
}
|
}
|
||||||
@ -25,9 +27,14 @@ type CommitFileTreeViewModel struct {
|
|||||||
types.IListCursor
|
types.IListCursor
|
||||||
ICommitFileTree
|
ICommitFileTree
|
||||||
|
|
||||||
// this is e.g. the commit for which we're viewing the files
|
// this is e.g. the commit for which we're viewing the files, if there is no
|
||||||
|
// range selection, or if the range selection can't be used for some reason
|
||||||
ref types.Ref
|
ref types.Ref
|
||||||
|
|
||||||
|
// this is a commit range for which we're viewing the files. Can be nil, in
|
||||||
|
// which case ref is used.
|
||||||
|
refRange *types.RefRange
|
||||||
|
|
||||||
// we set this to true when you're viewing the files within the checked-out branch's commits.
|
// we set this to true when you're viewing the files within the checked-out branch's commits.
|
||||||
// If you're viewing the files of some random other branch we can't do any rebase stuff.
|
// If you're viewing the files of some random other branch we can't do any rebase stuff.
|
||||||
canRebase bool
|
canRebase bool
|
||||||
@ -42,6 +49,7 @@ func NewCommitFileTreeViewModel(getFiles func() []*models.CommitFile, log *logru
|
|||||||
ICommitFileTree: fileTree,
|
ICommitFileTree: fileTree,
|
||||||
IListCursor: listCursor,
|
IListCursor: listCursor,
|
||||||
ref: nil,
|
ref: nil,
|
||||||
|
refRange: nil,
|
||||||
canRebase: false,
|
canRebase: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -54,6 +62,14 @@ func (self *CommitFileTreeViewModel) SetRef(ref types.Ref) {
|
|||||||
self.ref = ref
|
self.ref = ref
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *CommitFileTreeViewModel) GetRefRange() *types.RefRange {
|
||||||
|
return self.refRange
|
||||||
|
}
|
||||||
|
|
||||||
|
func (self *CommitFileTreeViewModel) SetRefRange(refsForRange *types.RefRange) {
|
||||||
|
self.refRange = refsForRange
|
||||||
|
}
|
||||||
|
|
||||||
func (self *CommitFileTreeViewModel) GetCanRebase() bool {
|
func (self *CommitFileTreeViewModel) GetCanRebase() bool {
|
||||||
return self.canRebase
|
return self.canRebase
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,12 @@ package types
|
|||||||
type Ref interface {
|
type Ref interface {
|
||||||
FullRefName() string
|
FullRefName() string
|
||||||
RefName() string
|
RefName() string
|
||||||
|
ShortRefName() string
|
||||||
ParentRefName() string
|
ParentRefName() string
|
||||||
Description() string
|
Description() string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RefRange struct {
|
||||||
|
From Ref
|
||||||
|
To Ref
|
||||||
|
}
|
||||||
|
@ -445,7 +445,6 @@ type TranslationSet struct {
|
|||||||
ScrollRight string
|
ScrollRight string
|
||||||
DiscardPatch string
|
DiscardPatch string
|
||||||
DiscardPatchConfirm string
|
DiscardPatchConfirm string
|
||||||
DiscardPatchSameCommitConfirm string
|
|
||||||
CantPatchWhileRebasingError string
|
CantPatchWhileRebasingError string
|
||||||
ToggleAddToPatch string
|
ToggleAddToPatch string
|
||||||
ToggleAddToPatchTooltip string
|
ToggleAddToPatchTooltip string
|
||||||
@ -582,6 +581,7 @@ type TranslationSet struct {
|
|||||||
OpenCommandLogMenu string
|
OpenCommandLogMenu string
|
||||||
OpenCommandLogMenuTooltip string
|
OpenCommandLogMenuTooltip string
|
||||||
ShowingGitDiff string
|
ShowingGitDiff string
|
||||||
|
ShowingDiffForRange string
|
||||||
CommitDiff string
|
CommitDiff string
|
||||||
CopyCommitHashToClipboard string
|
CopyCommitHashToClipboard string
|
||||||
CommitHash string
|
CommitHash string
|
||||||
@ -1435,7 +1435,6 @@ func EnglishTranslationSet() *TranslationSet {
|
|||||||
ScrollRight: "Scroll right",
|
ScrollRight: "Scroll right",
|
||||||
DiscardPatch: "Discard patch",
|
DiscardPatch: "Discard patch",
|
||||||
DiscardPatchConfirm: "You can only build a patch from one commit/stash-entry at a time. Discard current patch?",
|
DiscardPatchConfirm: "You can only build a patch from one commit/stash-entry at a time. Discard current patch?",
|
||||||
DiscardPatchSameCommitConfirm: "You currently have changes added to a patch for this commit. Discard current patch?",
|
|
||||||
CantPatchWhileRebasingError: "You cannot build a patch or run patch commands while in a merging or rebasing state",
|
CantPatchWhileRebasingError: "You cannot build a patch or run patch commands while in a merging or rebasing state",
|
||||||
ToggleAddToPatch: "Toggle file included in patch",
|
ToggleAddToPatch: "Toggle file included in patch",
|
||||||
ToggleAddToPatchTooltip: "Toggle whether the file is included in the custom patch. See {{.doc}}.",
|
ToggleAddToPatchTooltip: "Toggle whether the file is included in the custom patch. See {{.doc}}.",
|
||||||
@ -1571,6 +1570,7 @@ func EnglishTranslationSet() *TranslationSet {
|
|||||||
OpenCommandLogMenu: "View command log options",
|
OpenCommandLogMenu: "View command log options",
|
||||||
OpenCommandLogMenuTooltip: "View options for the command log e.g. show/hide the command log and focus the command log.",
|
OpenCommandLogMenuTooltip: "View options for the command log e.g. show/hide the command log and focus the command log.",
|
||||||
ShowingGitDiff: "Showing output for:",
|
ShowingGitDiff: "Showing output for:",
|
||||||
|
ShowingDiffForRange: "Showing diff for range",
|
||||||
CommitDiff: "Commit diff",
|
CommitDiff: "Commit diff",
|
||||||
CopyCommitHashToClipboard: "Copy commit hash to clipboard",
|
CopyCommitHashToClipboard: "Copy commit hash to clipboard",
|
||||||
CommitHash: "Commit hash",
|
CommitHash: "Commit hash",
|
||||||
|
@ -35,11 +35,11 @@ var Diff = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
t.Views().Branches().
|
t.Views().Branches().
|
||||||
IsFocused().
|
IsFocused().
|
||||||
Tap(func() {
|
Tap(func() {
|
||||||
t.Views().Information().Content(Contains("Showing output for: git diff branch-a branch-a"))
|
t.Views().Information().Content(Contains("Showing output for: git diff --stat -p branch-a branch-a"))
|
||||||
}).
|
}).
|
||||||
SelectNextItem().
|
SelectNextItem().
|
||||||
Tap(func() {
|
Tap(func() {
|
||||||
t.Views().Information().Content(Contains("Showing output for: git diff branch-a branch-b"))
|
t.Views().Information().Content(Contains("Showing output for: git diff --stat -p branch-a branch-b"))
|
||||||
t.Views().Main().Content(Contains("+second line"))
|
t.Views().Main().Content(Contains("+second line"))
|
||||||
}).
|
}).
|
||||||
PressEnter()
|
PressEnter()
|
||||||
@ -67,7 +67,7 @@ var Diff = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Press(keys.Universal.DiffingMenu)
|
Press(keys.Universal.DiffingMenu)
|
||||||
|
|
||||||
t.ExpectPopup().Menu().Title(Equals("Diffing")).Select(Contains("Reverse diff direction")).Confirm()
|
t.ExpectPopup().Menu().Title(Equals("Diffing")).Select(Contains("Reverse diff direction")).Confirm()
|
||||||
t.Views().Information().Content(Contains("Showing output for: git diff branch-a branch-b -R"))
|
t.Views().Information().Content(Contains("Showing output for: git diff --stat -p branch-a branch-b -R"))
|
||||||
t.Views().Main().Content(Contains("-second line"))
|
t.Views().Main().Content(Contains("-second line"))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -32,13 +32,13 @@ var DiffAndApplyPatch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
|
|
||||||
t.ExpectPopup().Menu().Title(Equals("Diffing")).Select(Equals("Diff branch-a")).Confirm()
|
t.ExpectPopup().Menu().Title(Equals("Diffing")).Select(Equals("Diff branch-a")).Confirm()
|
||||||
|
|
||||||
t.Views().Information().Content(Contains("Showing output for: git diff branch-a branch-a"))
|
t.Views().Information().Content(Contains("Showing output for: git diff --stat -p branch-a branch-a"))
|
||||||
|
|
||||||
t.Views().Branches().
|
t.Views().Branches().
|
||||||
IsFocused().
|
IsFocused().
|
||||||
SelectNextItem().
|
SelectNextItem().
|
||||||
Tap(func() {
|
Tap(func() {
|
||||||
t.Views().Information().Content(Contains("Showing output for: git diff branch-a branch-b"))
|
t.Views().Information().Content(Contains("Showing output for: git diff --stat -p branch-a branch-b"))
|
||||||
t.Views().Main().Content(Contains("+second line"))
|
t.Views().Main().Content(Contains("+second line"))
|
||||||
}).
|
}).
|
||||||
PressEnter()
|
PressEnter()
|
||||||
|
45
pkg/integration/tests/diff/diff_non_sticky_range.go
Normal file
45
pkg/integration/tests/diff/diff_non_sticky_range.go
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package diff
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var DiffNonStickyRange = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "View the combined diff of multiple commits using a range selection",
|
||||||
|
ExtraCmdArgs: []string{},
|
||||||
|
Skip: false,
|
||||||
|
SetupConfig: func(config *config.AppConfig) {},
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
shell.EmptyCommit("initial commit")
|
||||||
|
shell.CreateFileAndAdd("file1", "first line\n")
|
||||||
|
shell.Commit("first commit")
|
||||||
|
shell.UpdateFileAndAdd("file1", "first line\nsecond line\n")
|
||||||
|
shell.Commit("second commit")
|
||||||
|
shell.UpdateFileAndAdd("file1", "first line\nsecond line\nthird line\n")
|
||||||
|
shell.Commit("third commit")
|
||||||
|
},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
t.Views().Commits().
|
||||||
|
Focus().
|
||||||
|
Lines(
|
||||||
|
Contains("third commit").IsSelected(),
|
||||||
|
Contains("second commit"),
|
||||||
|
Contains("first commit"),
|
||||||
|
Contains("initial commit"),
|
||||||
|
).
|
||||||
|
Press(keys.Universal.RangeSelectDown).
|
||||||
|
Press(keys.Universal.RangeSelectDown).
|
||||||
|
Tap(func() {
|
||||||
|
t.Views().Main().Content(Contains("Showing diff for range ").
|
||||||
|
Contains("+first line\n+second line\n+third line"))
|
||||||
|
}).
|
||||||
|
PressEnter()
|
||||||
|
|
||||||
|
t.Views().CommitFiles().
|
||||||
|
IsFocused().
|
||||||
|
SelectedLine(Contains("file1"))
|
||||||
|
|
||||||
|
t.Views().Main().Content(Contains("+first line\n+second line\n+third line"))
|
||||||
|
},
|
||||||
|
})
|
@ -148,6 +148,7 @@ var tests = []*components.IntegrationTest{
|
|||||||
diff.Diff,
|
diff.Diff,
|
||||||
diff.DiffAndApplyPatch,
|
diff.DiffAndApplyPatch,
|
||||||
diff.DiffCommits,
|
diff.DiffCommits,
|
||||||
|
diff.DiffNonStickyRange,
|
||||||
diff.IgnoreWhitespace,
|
diff.IgnoreWhitespace,
|
||||||
diff.RenameSimilarityThresholdChange,
|
diff.RenameSimilarityThresholdChange,
|
||||||
file.CopyMenu,
|
file.CopyMenu,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user