1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-10 11:10:18 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Jesse Duffield
975d2bedb6 Remove secureexec package
From the go 1.19 release notes:

Command and LookPath no longer allow results from a PATH search to be found relative to the current directory. This removes a common source of security problems but may also break existing programs that depend on using, say, exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in the current directory. See the os/exec package documentation for information about how best to update such programs.
2023-07-30 19:59:51 +10:00
Jesse Duffield
e33fe37a99 Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.

My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).

I've also moved the remaining methods into the utils package.
2023-07-30 18:51:23 +10:00
Gustavo Krieger
9ae7710850 Use comment char config on interactive rebase
Co-authored-by: Stefan Haller <stefan@haller-berlin.de>
2023-07-02 02:07:32 -03:00
Stefan Haller
3fe4db9316 Make RebaseCommands.AmendTo more robust
This fixes two problems with the "amend commit with staged changes" command:

1. Amending to a fixup commit didn't work (this would create a commmit with the
   title "fixup! fixup! original title" and keep that at the top of the branch)
2. Unrelated fixup commits would be squashed too.

The added integration test verifies that both of these problems are fixed.
2023-04-29 07:28:33 +02:00
Jesse Duffield
185bbf0c75 Refactor to tighten interface to lazygit daemon 2023-04-29 07:28:33 +02:00
Stefan Haller
a8586ba57e Refactor: simplify PrepareInteractiveRebaseCommand API
Instead of passing a bunch of different options in
PrepareInteractiveRebaseCommandOpts, where it was unclear how they interact if
several are set, have only a single field "instruction" which can be set to one
of various different instructions.

The functionality of replacing the entire todo file with our own is no longer
available; it is only possible to prepend todos to the existing file.

Also, instead of using different env vars for the various rebase operations that
we want to tell the daemon to do, use a single one that contains a json-encoded
struct with all available instructions. This makes the protocol much clearer,
and makes it easier to extend in the future.
2023-04-29 07:28:33 +02:00
Stefan Haller
dad7a70bf8 Implement moving commits up/down in terms of daemon 2023-04-29 07:28:33 +02:00
Stefan Haller
b8fbe9756e Implement squash, fixup, drop, and reword in terms of daemon 2023-04-29 07:28:33 +02:00
Jesse Duffield
711be78811 extract out function 2023-04-15 17:26:08 +10:00
AzraelSec
368f9c8cb3 feat: let interactive rebase prepend commands to the default todo file 2023-04-15 17:26:08 +10:00
jiepeng
b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
Jesse Duffield
cd5b041b0f clearer separation of concerns when bootstrapping application 2022-05-07 16:02:04 +10:00