lazygit/pkg/commands/git_commands
Stefan Haller 5e542c3992 Filter out merge commits when generating todo changes in InteractiveRebase
We will need this because under some conditions we are going to use this
function to edit a range of commits, and we can't set merge commits to "edit".
This corresponds to the code in startInteractiveRebaseWithEdit which has similar
logic.

It is a bit unfortunate that we will have these two different ways of setting
todos to edit: startInteractiveRebaseWithEdit does it after stopping in the
rebase, in the Then function of its refresh, but InteractiveRebase does it in
the daemon with a ChangeTodoActionsInstruction. It still makes sense though,
given how InteractiveRebase works.

This not only affects "edit", but also "drop", "fixup", and "squash".
Previously, when trying to use these for a range selection that includes a merge
commit, they would fail with the cryptic error message "Some todos not found in
git-rebase-todo"; now they simply exclude the merge commit. I'm not sure if one
is better or worse than the other, and we should probably simply disable the
commands when a merge commit is selected, but that's out of scope in this PR.
2024-11-29 18:24:00 +01:00
..
bisect.go rename sha to hash 9, case: Sha 2024-04-12 08:33:47 +02:00
bisect_info.go rename sha to hash 2 2024-04-12 08:33:47 +02:00
blame.go Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
branch.go Better local branch delete confirmation 2024-09-28 11:19:32 +02:00
branch_loader.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
branch_loader_test.go Add ahead/behind information for @{push} 2024-05-19 09:44:38 +02:00
branch_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
commit.go Fix copying commit author to clipboard 2024-09-23 09:47:14 +02:00
commit_file_loader.go Set diff.noprefix=false for all other diff commands too 2024-02-18 15:22:43 +01:00
commit_file_loader_test.go
commit_loader.go Show "exec" todos in the list of rebase todos 2024-06-12 12:44:33 +02:00
commit_loader_test.go Store Common instead of just the list of configured main branches in MainBranches 2024-08-18 10:24:52 +02:00
commit_test.go use unsigned integer in test and fix CI/linter complaint 2024-11-19 08:21:19 +11:00
common.go Remove sync mutex 2023-10-08 18:45:36 +02:00
config.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
custom.go
deps_test.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
diff.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
file.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
file_loader.go Support setting the similarity threshold for detecting renames 2024-07-13 14:24:26 +10:00
file_loader_test.go Support setting the similarity threshold for detecting renames 2024-07-13 14:24:26 +10:00
file_test.go Support editing multiple files at once using range selection 2024-03-22 08:20:16 +01:00
flow.go
flow_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
git_command_builder.go Show all submodules recursively 2024-03-07 20:16:28 +01:00
git_command_builder_test.go Add worktree tests for removing/detaching 2023-07-30 18:35:23 +10:00
main_branches.go Re-determine existing main branches if mainBranches config changed 2024-08-18 10:24:52 +02:00
patch.go Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
rebase.go Filter out merge commits when generating todo changes in InteractiveRebase 2024-11-29 18:24:00 +01:00
rebase_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
reflog_commit_loader.go rename sha to hash 8, update some log and comment 2024-04-12 08:33:47 +02:00
reflog_commit_loader_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
remote.go Obtain remote URL by calling "ls-remote --get-url" instead of using git config 2024-01-10 09:24:23 +01:00
remote_loader.go Implement a sort order menu for remote branches 2023-12-22 16:30:20 +09:00
repo_paths.go Use filepath instead of path for file path operations 2024-08-18 10:24:52 +02:00
repo_paths_test.go Use filepath instead of path for file path operations 2024-08-18 10:24:52 +02:00
stash.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
stash_loader.go chore: use null char as a stash entries divider during loading 2023-12-27 11:21:49 +01:00
stash_loader_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
stash_test.go use unsigned integer in test and fix CI/linter complaint 2024-11-19 08:21:19 +11:00
status.go Optimize number of early calls to GetRepoPaths 2024-07-06 12:09:48 -07:00
submodule.go Show all submodules recursively 2024-03-07 20:16:28 +01:00
sync.go Specifying branch name source from refs/heads for fast forwarding 2024-08-18 10:42:57 +02:00
sync_test.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
tag.go Remove sync mutex 2023-10-08 18:45:36 +02:00
tag_loader.go Standardise on using lo for slice functions 2023-07-30 18:51:23 +10:00
tag_loader_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
version.go Add a method GitVersion.IsAtLeast 2024-01-10 09:18:38 +01:00
version_test.go Add a method GitVersion.IsAtLeast 2024-01-10 09:18:38 +01:00
working_tree.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
working_tree_test.go use unsigned integer in test and fix CI/linter complaint 2024-11-19 08:21:19 +11:00
worktree.go Centralise logic for obtaining repo paths 2023-07-30 18:35:24 +10:00
worktree_loader.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
worktree_loader_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00