1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00
Commit Graph

1287 Commits

Author SHA1 Message Date
c5cd217a65 Allow squashing fixups above the first commit of a repo
This includes amending changes into a given commit, since that's implemented in
terms of the former.
2023-02-20 08:29:43 +01:00
9e1e20fef2 Merge pull request #2421 from Ryooooooga/tag-on-branch 2023-02-20 18:20:16 +11:00
a349e886ce Allow interactive rebasing all the way down to the first commit
Pass --root instead of a sha when we want to rebase down to the initial commit.
2023-02-20 07:40:05 +01:00
dd61c49a15 Better error message for trying to squash or fixup the first commit
It's not so much the total number of commits that matters here, it's just
whether we are on the first one. (This includes the other condition.)

This allows us to get rid of the condition in rebase.go.
2023-02-20 07:40:04 +01:00
ac9515d8c7 Revert "fix: improve backward compatibility"
Since we now require git 2.20, we don't need this any more.

This reverts commit 7c5f33980f.
2023-02-19 16:13:31 +01:00
67b08ac239 feat: support to create tag on branch 2023-02-19 23:31:46 +09:00
67b8ef449c Edit by breaking after current commit
Instead of rebasing from the commit below the current one and then setting the
current one to "edit", we rebase from the current one and insert a "break" after
it. In most cases the behavior is exactly the same as before, except that the
new method also works if the current commit is a merge commit. This is useful if
you want to create a new commit at the very beginning of your branch (by editing
the last commit before your branch).
2023-02-19 10:21:01 +01:00
979c3d6278 Fix yellow/red coloring of pushed/unpushed commits in branch commits panel (#2448) 2023-02-19 10:13:46 +11:00
stk
1da762c295 Explicitly pass --no-autosquash when rebasing
This fixes the problem shown in the previous commit.
2023-02-09 18:21:11 +01:00
stk
5bb6198219 Allow ignoring whitespace in diff in commits panel 2023-02-07 12:14:29 +01:00
stk
946c1dff99 Cleanup: remove extra space 2023-02-07 12:09:15 +01:00
469938ee9b Merge pull request #2342 from knutwalker/override-git-sequence-editor-for-rebase 2023-02-05 13:52:35 +11:00
d8c7d47067 Merge pull request #2395 from stefanhaller/trailing-lf-when-copying-diff-lines 2023-01-29 14:19:29 +11:00
f79a8c281f Merge pull request #2398 from Ryooooooga/fix-detached-head
fix https://github.com/jesseduffield/lazygit/issues/1467
2023-01-29 14:19:05 +11:00
2183c157d4 feat(log): allow to disable git.log.order 2023-01-28 21:17:05 +09:00
5dec080719 fix: fix RefName of detached HEAD to works in Chinese 2023-01-27 20:45:18 +09:00
stk
fc38e3b54d Don't omit final line feed when copying diff lines to clipboard 2023-01-26 10:30:05 +01:00
stk
93d845cb01 Cleanup: remove unused function RenderPlain 2023-01-26 10:30:05 +01:00
21f8857d36 refactor: simplify log format 2023-01-06 11:15:33 +09:00
965f7bfcb2 feat(config): change git.commit.verbose to accept "default" 2023-01-06 11:15:33 +09:00
bc7873144e Override GIT_SEQUENCE_EDITOR for rebase commands
I noticed that `$GIT_SEQUENCE_EDITOR` is overridden in `PrepareInteractiveRebaseCommand`
but not in `runSkipEditorCommand`.

Before this change, some commands such as `SquashAllAboveFixupCommits`
would not work when a different sequence editor, e.g.
[git-interactive-rebase-tool](https://github.com/MitMaro/git-interactive-rebase-tool)
is configured.
2023-01-01 04:37:19 +01:00
1bb138c79c Merge pull request #2341 from knutwalker/commit-verbose 2023-01-01 13:57:49 +11:00
d98130c3ef Add option to allow --verbose commit in editor commits 2023-01-01 02:01:04 +01:00
7c5f33980f fix: improve backward compatibility 2022-12-31 22:47:21 +09:00
e00f248cf7 feat: support for push --force-if-includes 2022-12-30 20:01:15 +09:00
cd9111837e feat: add GitVersion struct 2022-12-30 20:01:14 +09:00
1a1f042f49 Add credential prompts for U2F-backed SSH keys
The 8.2 release of OpenSSH added support for FIDO/U2F hardware
authenticators, which manifests in being able to create new types of SSH
key, named `ecdsa-sk` nad `ed25519-sk`. This is relevant to lazygit,
as those SSH keys can be used to authorise git operations over SSH, as
well as signing git commits. Actual code changes are required for
correct support, as the authentication process for these types of keys
is different than the process for types supported previously.

When an operation requiring credentials is initialised with a U2F
authenticator-backed key, the first prompt is:

	Enter PIN for ${key_type} key ${path_to_key}:

at which point the user is supposed to enter a numeric (and secret) PIN,
specific to the particular FIDO/U2F authenticator using which the SSH
keypair was generated. Upon entering the correct key, the user is
supposed to physically interact with the authenticator to confirm
presence. Sometimes this is accompanied by the following text prompt:

	Confirm user presence for key ${key_type} ${key_fingerprint}

This second prompt does not always occur and it is presumed that the
user will know to perform this step even if not prompted specifically.
At this stage some authenticator devices may also begin to blink a LED
to indicate that they're waiting for input.

To facilitate lazygit's interoperability with these types of keys, add
support for the first PIN prompt, which allows "fetch", "pull", and
"push" git operations to complete.
2022-11-30 13:34:32 +11:00
245563bc99 (#2288) quote remoteName before compiling regex
If the remote name contains special regex-chars,
the compilation of the regex might fail.
Quoting the remoteName ensures that all special chars
in the remoteName are properly escaped before compiling
the regex.
2022-11-24 12:56:28 +00:00
52a2e4c1dc fix: fix ambiguous branch name
test: add an integration test for checkout branch by name

fix: fix full ref name of detached head

refactor: refactor current branch loader

chore: use field name explicitly
2022-11-14 19:05:07 +11:00
b33ec5a050 Merge pull request #1980 from ajhynes7/stash-untracked-changes 2022-11-14 18:46:53 +11:00
3e73dacce3 Merge loaders package into git_commands package 2022-11-14 18:11:45 +11:00
df3cd941d7 use tempdir in tests to prevent polluting worktree 2022-11-13 14:10:21 +11:00
97ced9e14f fix could-not-access error 2022-11-12 18:09:15 -03:30
e8b97c9fe2 fix could-not-access error 2022-11-11 12:30:14 +11:00
a47e72892a Merge branch 'master' into stash-untracked-changes 2022-11-01 16:08:34 -02:30
3103398e31 chore: refactor rename stash 2022-10-16 09:30:04 +09:00
eceb3a5aa6 chore: refactor rename stash 2022-10-16 09:12:43 +09:00
8a9eefa4d2 chore: remove unnecessary space
Co-authored-by: Jesse Duffield <jessedduffield@gmail.com>
2022-10-16 09:12:43 +09:00
11316b7a48 feat: add rename stash 2022-10-16 09:12:42 +09:00
a4239c7a37 fix: fix stash with empty message 2022-10-13 22:23:56 +09:00
8c46a0110d Merge branch 'master' into stash-untracked-changes 2022-10-06 22:59:06 -02:30
41f86f6535 Rebase merges by default 2022-09-24 23:37:17 +02:00
fd66499c8f Merge pull request #2167 from xiaoliwang/remove_deprecated 2022-09-23 23:01:40 -07:00
438038a4f1 fix(loaders/file.go): changed to ignore stderr when loading git status 2022-09-19 18:46:32 +09:00
3d79c6a3d3 formatter 2022-09-17 15:10:41 -07:00
b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
c7733aa5e5 refactor: rename method to StashIncludeUntrackedChanges 2022-09-15 21:48:49 -02:30
6feb301c2a fix: use message in git stash command 2022-09-15 21:48:49 -02:30
e66b162726 refactor: remove redundant if statement 2022-09-15 21:48:49 -02:30
4f8816ebf2 refactor: use extended flag name 2022-09-15 21:48:49 -02:30