summaryrefslogtreecommitdiffstats
path: root/pkg
AgeCommit message (Collapse)Author
2023-04-30remove context callback optsJesse Duffield
2023-04-30lots more refactoringJesse Duffield
2023-04-30Begin refactoring guiJesse Duffield
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the gui package purely for the sake of better encapsulation
2023-04-29enforce lowercase filenamesJesse Duffield
2023-04-29Merge pull request #2558 from stefanhaller/allow-resetting-author-during-rebaseJesse Duffield
2023-04-29Merge pull request #2548 from AKARSHITJOSHI/fix/tagPushJesse Duffield
2023-04-27Add an editor preset for kakoune (kakoune.org).J. B. Rainsberger
2023-04-24Merge pull request #2557 from noahziheng/feature/add-gitea-prJesse Duffield
2023-04-18feat: add gitea to hosting serviceNoah Gao
2023-04-18Don't allow resetting non-HEAD commits (including rebase todos) during rebaseStefan Haller
2023-04-18Allow resetting author of HEAD commit during rebaseStefan Haller
2023-04-17Revert "feat: support for `push --force-if-includes`"Ryooooooga
This reverts commit e00f248cf72785429e2bafc4bcd7bf39528163a5.
2023-04-16Change push tag commandPersonal
Signed-off-by: AKARSHITJOSHI <akarshitjoshi@gmail.com>
2023-04-15test: check focus on commits after performing an advanced rebaseAzraelSec
2023-04-15chore: add focus on local commits after interactively rebaseAzraelSec
2023-04-15use lowercase text for menu items (as we're still yet to standardise on ↵Jesse Duffield
'Sentence case')
2023-04-15test: add integration test to verify the interactive rebase correctly workAzraelSec
2023-04-15refactor: introduce a struct to pack theAzraelSec
`PrepareInteractiveRebaseCommand` function
2023-04-15extract out functionJesse Duffield
2023-04-15test: update the UI to follow the new rebase type selection instead of ↵AzraelSec
confirm the previous popup
2023-04-15feat: allow to perform a rebase with breaking before the first commitAzraelSec
2023-04-15feat: let interactive rebase prepend commands to the default todo fileAzraelSec
2023-04-15Don't allow changing the type of certain rebase todosStefan Haller
We already show "merge" todo entries when starting an interactive rebase with --rebase-merges outside of lazygit. Changing the type of a merge entry to "pick" or "edit" doesn't make sense and shouldn't be allowed. Earlier in this branch we have started to show "update-ref" entries, these can't be changed either (they can be moved, though). You might argue that it should be possible to change them to "drop", but in the case of "update-ref" this doesn't make sense either, because "drop" needs a Sha and we don't have one here. Also, you would then be able to later change it back to "pick", so we would have to remember that this isn't allowed for this particular drop entry; that's messy, so just disallow all editing.
2023-04-15Make moving todo commits more robustStefan Haller
2023-04-15Make EditRebaseTodo more robustStefan Haller
It used to work on the assumption that rebasing commits in lazygit's model correspond one-to-one to lines in the git-rebase-todo file, which isn't necessarily true (e.g. when users use "git rebase --edit-todo" at the custom command prompt and add a "break" between lines).
2023-04-15Add integration test for dropping a todo commit when there's an update-refStefan Haller
The test shows how we are accidentally dropping the wrong commit in this case. We'll fix that in the next commit.
2023-04-15Add GitVersion field to NewIntegrationTestArgsStefan Haller
It can be used to specify which git versions a given test should or should not run on.
2023-04-15Show update-ref commands in rebase todo listStefan Haller
This is useful when working with stacked branches, because you can now move "pick" entries across an update-ref command and you can tell exactly which branch the commit will end up in. It's also useful to spot situations where the --update-refs option didn't work as desired. For example, if you duplicate a branch and want to rebase only one of the branches but not the other (maybe for testing); if you have rebase.updateRefs=true in your git config, then rebasing one branch will move the other branch along. To solve this we'll have to introduce a way to delete the update-ref entry (maybe by hitting backspace?); this is out of scope for this PR, so for now users will have to type "git rebase --edit-todo" into the custom command prompt to sort this out. We will also have to prevent users from trying to turn update-ref commands into other commands like "pick" or "drop"; we'll do this later in this branch.
2023-04-15Visualize branch heads in commits panelStefan Haller
Useful when working with stacked branches.
2023-04-15Make getHydratedRebasingCommits more robustStefan Haller
So far the algorithm worked on the assumption that the output of the "git show" command corresponds one-to-one to the lines of the rebase-todo file. This assumption doesn't hold once we start to include todo lines that don't have a sha (like update-ref), or when the todo file contains multiple entries for the same sha. This should never happen normally, but it can if users manually edit the todo file and duplicate a line.
2023-04-15Store commit.Action as an enum instead of a stringStefan Haller
The main reason for doing this (besides the reasons given for Status in the previous commit) is that it allows us to easily convert from TodoCommand to Action and back. This will be needed later in the branch. Fortunately, TodoCommand is one-based, so this allows us to add an ActionNone constant with the value 0.
2023-04-15Store commit.Status as an enum instead of a stringStefan Haller
This is unrelated to the changes in this PR, but since we are doing the same thing for the commit.Action field in the next commit, it makes sense to do it for Status too for consistency. Modelling this as an enum feels more natural than modelling it as a string, since there's a finite set of possible values. And it saves a little bit of memory (not very much, since none of the strings were heap-allocated, but still).
2023-04-14fix flaky testsJesse Duffield
2023-04-13Reorder testsStefan Haller
2023-04-13Rename test files to match test namesStefan Haller
2023-04-13Merge pull request #2544 from scallaway/git-diff-detect-renamesJesse Duffield
2023-04-13Merge pull request #2496 from ↵Jesse Duffield
jesseduffield/feature/prevent-history-custom-command
2023-04-13Merge pull request #2523 from stefanhaller/editor-configJesse Duffield
2023-04-13Don't add custom command to history if it starts with spaceLuka Markušić
Add tests for custom command with leading space
2023-04-13Show warning about deprecated edit configsStefan Haller
We print this to the terminal after lazygit quits rather than showing it in a panel at startup, so as to not annoy people too much. Hopefully it will still be prominent enough this way.
2023-04-13Change OpenCommand to Open and OpenLinkCommand to OpenLinkStefan Haller
We do this for consistency with the edit settings. The old names are kept as a fallback for now.
2023-04-13Don't set platform defaults on OSConfig struct immediatelyStefan Haller
Instead, query the platform defaults only if the config is empty. This will be necessary later to distinguish an empty config from a default config, so that we can give deprecation warnings.
2023-04-13Remove line number support for "open" commandStefan Haller
The "open" command is supposed to behave in the same way as double-clicking a file in the Finder/Explorer. The concept of jumping to a specific line in the file doesn't make sense for this; use "edit" instead.
2023-04-13Add support for falling back to legacy edit configStefan Haller
2023-04-13Implement edit presetsStefan Haller
2023-04-13Cleanup: fix copy/paste error in commentStefan Haller
2023-04-13Fix windows testsStefan Haller
Now that the tests run again, it turns out that they actually fail, so fix them.
2023-04-13Rename test files so that test discovery works againStefan Haller
These files were renamed from os_windows_test.go to os_test_windows.go (etc.) in 95b2e9540a5. Since then, the tests have no longer run, since go only looks for tests in files ending with "test.go". It isn't important that the file name ends with "_windows.go", since there are already build constrains in the files themselves.
2023-04-13feat: remove --no-renames flag from main panel diffs (to show renamed files)Scott Callaway
2023-04-12fix: organise commit test fileScott Callaway
Pulled this out into a separate commit since it was unrelated to the feature coming behind it. This just cleans up the `commit_test.go` file slightly (for the method that I was working on) so that the tests are built in a way that is slightly more readable - testing each configuration option individually without combining any of them.