1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-19 12:12:42 +02:00

13 Commits

Author SHA1 Message Date
Stefan Haller
eaaf123238 Combine GetPathDiff and GetAllDiff into one command (GetDiff)
This makes it more reusable for other purposes.
2025-01-07 17:46:51 +01:00
Stefan Haller
7fb9e8fa9a Respect the diff context size when showing a range diff
This applies to both the "sticky" range diff when diffing mode is on, and the
more temporary one when selecting a range of commits.
2024-12-01 13:01:16 +01:00
Stefan Haller
5cca4c7063 Cleanup: move adding --ignore-all-space arg to DiffCmdObj
It is needed by both call sites of this function. This has the added benefit
that the argument doesn't unnecessarily show up in the status view when diffing
mode is on.
2024-12-01 13:01:15 +01:00
Stefan Haller
f98b57aa5e Change direct access to Common.UserConfig to a getter
This will allow us to turn the field into an atomic.Value for safe concurrent
access.
2024-08-18 10:24:52 +02:00
Stefan Haller
496308e023 Support external diff command in diffing mode 2024-04-25 08:50:30 +02:00
Stefan Haller
98c569749f Use git.paging.colorArg in diffing mode diff 2024-04-25 08:50:30 +02:00
Stefan Haller
047380f311 Cleanup: use separate Arg calls for unrelated arguments 2024-04-25 08:50:30 +02:00
Stefan Haller
d329c92554 Set diff.noprefix=false for all other diff commands too
This fixes problems with being able to stage things in a custom patch correctly.
2024-02-18 15:22:43 +01:00
John Whitley
3d9f1e02e5 Refactor repo_paths.go to use git rev-parse
This changes GetRepoPaths() to pull information from `git rev-parse`
instead of effectively reimplementing git's logic for pathfinding. This
change fixes issues with bare repos, esp. versioned homedir use cases,
by aligning lazygit's path handling to what git itself does.

This change also enables lazygit to run from arbitrary subdirectories of
a repository, including correct handling of symlinks, including "deep"
symlinks into a repo, worktree, a repo's submodules, etc.

Integration tests are now resilient against unintended side effects from
the host's environment variables. Of necessity, $PATH and $TERM are the
only env vars allowed through now.
2024-01-24 08:40:01 +01:00
Stefan Haller
8ca78412ac Add command to find base commit for creating a fixup 2024-01-10 09:11:40 +01:00
Stefan Haller
517e0f8248 Add command to open git difftool 2024-01-09 14:27:33 +01:00
AzraelSec
c7012528fc feat: introduce a copy menu into the file view 2023-12-07 08:30:03 +01:00
Jesse Duffield
63dc07fded Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments

Mandate that args must be passed when building a command

Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.

For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00