mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-29 10:36:45 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d0db51caf | ||
|
|
980a8ca53e | ||
|
|
aa7d26be59 | ||
|
|
4b69d93660 | ||
|
|
82e283429a | ||
|
|
6edf29b0dc | ||
|
|
c9a883b273 | ||
|
|
7eb561921b | ||
|
|
48f2e1dfc1 | ||
|
|
2f575a0b37 | ||
|
|
641740fdec | ||
|
|
bdc780a890 | ||
|
|
443452ad6a | ||
|
|
d97531aeef | ||
|
|
819212b758 | ||
|
|
48a8a71d31 | ||
|
|
be703f3d27 | ||
|
|
06a9ff12ab | ||
|
|
4c9cc1ab7f | ||
|
|
02997d30d9 | ||
|
|
ce202a5612 | ||
|
|
f317a97ac1 | ||
|
|
6f6545e44f | ||
|
|
99e26be3d9 | ||
|
|
de98258e39 | ||
|
|
3bf833aea7 | ||
|
|
39cd4746d5 | ||
|
|
1ede4e6eb9 | ||
|
|
4c731abedd | ||
|
|
c10dfcefcf | ||
|
|
50b5c17d93 | ||
|
|
8d36c8b3c1 | ||
|
|
9f44caa568 | ||
|
|
39477172b8 | ||
|
|
7545fc48e5 | ||
|
|
3d78263e0c | ||
|
|
11e877cbad | ||
|
|
268d1934f8 | ||
|
|
4bcf3e181c | ||
|
|
df1e5512da | ||
|
|
2ba3c1dc3f | ||
|
|
b41bb8f845 | ||
|
|
0339b414d9 | ||
|
|
cb719c11c5 | ||
|
|
19605ad476 | ||
|
|
e0c1d1c752 | ||
|
|
4486c86271 | ||
|
|
b44a369295 | ||
|
|
498bc457fc | ||
|
|
7f957f059b | ||
|
|
1a4af359ec | ||
|
|
f16bec2ce3 | ||
|
|
798fe4a1ef | ||
|
|
bb2e5fa886 | ||
|
|
3067ff1cac | ||
|
|
312feff130 | ||
|
|
ee60102fdc | ||
|
|
7b969a03ad | ||
|
|
1f7e5d7767 | ||
|
|
80dd695d7a | ||
|
|
65edd99fd0 | ||
|
|
98bf8f86d1 | ||
|
|
a0e81c93b8 | ||
|
|
7d142df9c2 | ||
|
|
0bd411111c | ||
|
|
463e81f197 | ||
|
|
810f6b22d2 | ||
|
|
3ccd33b388 | ||
|
|
d34266d5e6 | ||
|
|
c0b6f4adb9 | ||
|
|
72fa54d4d5 | ||
|
|
f68f027bcc | ||
|
|
9e455f427c | ||
|
|
bb816d7001 | ||
|
|
5423e7459c | ||
|
|
fec7e9ce61 | ||
|
|
32207d25c2 | ||
|
|
84be082fb5 | ||
|
|
f7d4efc59e | ||
|
|
b4b21f9c65 | ||
|
|
e1a8327583 | ||
|
|
478d51c83e | ||
|
|
efd4298b5e | ||
|
|
37bc0dfc44 | ||
|
|
74b1255b4b | ||
|
|
a415d1b529 | ||
|
|
0a48f307b1 | ||
|
|
cf873b16d9 | ||
|
|
2189c3b43a | ||
|
|
e7b69bcf24 | ||
|
|
62913ee25d | ||
|
|
262e7f4e79 | ||
|
|
6043eb52db | ||
|
|
70fe7bd1b4 | ||
|
|
344d3866a6 | ||
|
|
f996e47199 | ||
|
|
7e3b24d496 | ||
|
|
e19544a42b | ||
|
|
b7a24c8298 | ||
|
|
24e9197be2 | ||
|
|
3201695658 | ||
|
|
a41bd6a255 | ||
|
|
8651c46e14 | ||
|
|
46c095cc29 | ||
|
|
9aa268c1f4 | ||
|
|
6600adf671 | ||
|
|
f6cba966d0 |
@@ -1,7 +1,7 @@
|
||||
# adapted from https://github.com/devcontainers/images/blob/main/src/go/.devcontainer/Dockerfile
|
||||
|
||||
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster
|
||||
ARG VARIANT=1-bullseye
|
||||
ARG VARIANT=1-trixie
|
||||
FROM golang:${VARIANT}
|
||||
|
||||
RUN go install mvdan.cc/gofumpt@latest
|
||||
|
||||
@@ -26,7 +26,9 @@ If applicable, add screenshots to help explain your problem.
|
||||
### Version info:
|
||||
|
||||
* _Run `lazygit --version` and paste the result here_
|
||||
* _Run `git --version` and paste the result here_
|
||||
|
||||
### Terminal info:
|
||||
What terminal are you using, and which version? For some types of bugs this information can be relevant.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the problem here.
|
||||
|
||||
+17
-17
@@ -28,9 +28,9 @@ jobs:
|
||||
GOFLAGS: -mod=vendor
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
- name: Test code
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
mkdir -p /tmp/code_coverage
|
||||
go test ./... -short -cover -args "-test.gocoverdir=/tmp/code_coverage"
|
||||
- name: Upload code coverage artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: coverage-unit-${{ matrix.os }}-${{ github.run_id }}
|
||||
path: /tmp/code_coverage
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
GOFLAGS: -mod=vendor
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Restore Git cache
|
||||
if: matrix.git-version != 'latest'
|
||||
id: cache-git-restore
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
path: ~/git-${{matrix.git-version}}
|
||||
key: ${{runner.os}}-git-${{matrix.git-version}}
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
- name: Print git version
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
mkdir -p /tmp/code_coverage
|
||||
./scripts/run_integration_tests.sh
|
||||
- name: Upload code coverage artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: coverage-integration-${{ matrix.git-version }}-${{ github.run_id }}
|
||||
path: /tmp/code_coverage
|
||||
@@ -109,9 +109,9 @@ jobs:
|
||||
GOARCH: amd64
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
- name: Build linux binary
|
||||
@@ -136,9 +136,9 @@ jobs:
|
||||
GOARCH: amd64
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
- name: Check Vendor Directory
|
||||
@@ -162,13 +162,13 @@ jobs:
|
||||
GOFLAGS: -mod=vendor
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v8
|
||||
uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
# If you change this, make sure to also update scripts/golangci-lint-shim.sh
|
||||
version: v2.4.0
|
||||
@@ -182,15 +182,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
|
||||
- name: Download all coverage artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
path: /tmp/code_coverage
|
||||
|
||||
@@ -219,7 +219,7 @@ jobs:
|
||||
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} ))" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: "Checkout PR branch and all PR commits"
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
|
||||
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.issue.pull_request == null && startsWith(github.event.comment.body, '/close') }}
|
||||
steps:
|
||||
- uses: actions/github-script@v7
|
||||
- uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const trustedUsers = ['ChrisMcD1', 'jesseduffield', 'stefanhaller']
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Annotate locations with typos
|
||||
uses: codespell-project/codespell-problem-matcher@v1
|
||||
- name: Codespell
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Runs at 8:00 AM UTC on every Saturday
|
||||
# We'll check below if it's the first Saturday of the month, and fail if not
|
||||
- cron: '0 8 * * 6'
|
||||
# schedule:
|
||||
# # Runs at 8:00 AM UTC on every Saturday
|
||||
# # We'll check below if it's the first Saturday of the month, and fail if not
|
||||
# - cron: '0 8 * * 6'
|
||||
|
||||
# Allow manual triggering of the workflow
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
@@ -45,7 +46,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: jesseduffield/lazygit
|
||||
token: ${{ secrets.LAZYGIT_RELEASE_PAT }}
|
||||
@@ -146,7 +147,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.LAZYGIT_RELEASE_PAT }}
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: 1.25.x
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
if: ${{ github.repository == 'jesseduffield/lazygit' }}
|
||||
steps:
|
||||
- name: Checkout 🛎️
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Generate Sponsors 💖
|
||||
uses: JamesIves/github-sponsors-readme-action@v1.2.2
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
file: "README.md"
|
||||
|
||||
- name: Create Pull Request 🚀
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
commit-message: "README.md: Update Sponsors"
|
||||
title: "README.md: Update Sponsors"
|
||||
|
||||
@@ -713,6 +713,7 @@ keybinding:
|
||||
renameCommitWithEditor: R
|
||||
viewResetOptions: g
|
||||
markCommitAsFixup: f
|
||||
setFixupMessage: c
|
||||
createFixupCommit: F
|
||||
squashAboveCommits: S
|
||||
moveDownCommit: <c-j>
|
||||
@@ -1078,7 +1079,7 @@ services:
|
||||
Where:
|
||||
|
||||
- `gitDomain` stands for the domain used by git itself (i.e. the one present on clone URLs), e.g. `git.work.com`
|
||||
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab` or `gitea`
|
||||
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab`, `gitea` or `codeberg`
|
||||
- `webDomain` is the URL where your git service exposes a web interface and APIs, e.g. `gitservice.work.com`
|
||||
|
||||
## Predefined commit message prefix
|
||||
|
||||
@@ -192,6 +192,7 @@ The permitted option fields are:
|
||||
| name | The first part of the label | no |
|
||||
| description | The second part of the label | no |
|
||||
| value | the value that will be used in the command | yes |
|
||||
| key | Keybinding to invoke this menu option without needing to navigate to it. Can be a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | no |
|
||||
|
||||
If an option has no name the value will be displayed to the user in place of the name, so you're allowed to only include the value like so:
|
||||
|
||||
@@ -233,6 +234,34 @@ customCommands:
|
||||
description: 'branch for a release'
|
||||
```
|
||||
|
||||
Here's an example of supplying keybindings for menu options:
|
||||
|
||||
```yml
|
||||
customCommands:
|
||||
- key: 'a'
|
||||
command: 'echo {{.Form.BranchType | quote}}'
|
||||
context: 'commits'
|
||||
prompts:
|
||||
- type: 'menu'
|
||||
title: 'What kind of branch is it?'
|
||||
key: 'BranchType'
|
||||
options:
|
||||
- value: 'feature'
|
||||
name: 'feature branch'
|
||||
description: 'branch based off develop'
|
||||
key: 'f'
|
||||
- value: 'hotfix'
|
||||
name: 'hotfix branch'
|
||||
description: 'branch based off main for fast bug fixes'
|
||||
key: 'h'
|
||||
- value: 'release'
|
||||
name: 'release branch'
|
||||
description: 'branch for a release'
|
||||
key: 'r'
|
||||
```
|
||||
|
||||
In this example, pressing 'f', 'h', or 'r' will directly select the corresponding option without needing to navigate to it first.
|
||||
|
||||
### Menu-from-command
|
||||
|
||||
| _field_ | _description_ | _required_ |
|
||||
|
||||
@@ -31,6 +31,8 @@ git:
|
||||
|
||||
A cool feature of delta is --hyperlinks, which renders clickable links for the line numbers in the left margin, and lazygit supports these. To use them, set the `pager:` config to `delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"`; this allows you to click on an underlined line number in the diff to jump right to that same line in your editor.
|
||||
|
||||
Note that delta's `--navigate` option doesn't work in lazygit, for technical reasons.
|
||||
|
||||
## Diff-so-fancy
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -89,6 +89,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Reword | Reword the selected commit's message. |
|
||||
| `` R `` | Reword with editor | |
|
||||
| `` d `` | Drop | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -69,6 +69,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` b `` | bisectオプションを表示 | |
|
||||
| `` s `` | スカッシュ | 選択したコミットをその下のコミットにスカッシュします。スカッシュとは複数のコミットを1つにまとめる操作です。選択したコミットのメッセージが下のコミットに追加されます。 |
|
||||
| `` f `` | フィックスアップ | 選択したコミットをその下のコミットにマージします。フィックスアップはスカッシュと似ていますが、選択したコミットのメッセージは破棄され、下のコミットのメッセージのみが保持されます。 |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | メッセージ変更 | 選択したコミットのメッセージを変更します。 |
|
||||
| `` R `` | エディタでメッセージ変更 | |
|
||||
| `` d `` | 削除 | 選択したコミットを削除します。これはリベースを通じてブランチからコミットを削除します。コミットが後続のコミットが依存する変更を行っている場合、マージコンフリクトを解決する必要があるかもしれません。 |
|
||||
@@ -114,7 +115,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` <space> `` | パッチに含めるファイルを切り替え | ファイルがカスタムパッチに含まれるかどうかを切り替えます。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
|
||||
| `` a `` | すべてのファイルを切り替え | コミットのすべてのファイルをカスタムパッチに追加/削除します。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
|
||||
| `` <enter> `` | ファイルに入る / ディレクトリの折りたたみを切り替える | ファイルが選択されている場合、そのファイルに入ってカスタムパッチに個々の行を追加/削除できます。ディレクトリが選択されている場合、ディレクトリを切り替えます。 |
|
||||
| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` ` `` | ファイルツリービューを切り替え | ファイル表示をフラット表示とツリー表示で切り替えます。フラット表示はすべてのファイルパスを一覧で表示し、ツリー表示はディレクトリごとにファイルをグループ化します。<br><br>デフォルトは設定ファイル内の 'gui.showFileTree' キーで変更できます。 |
|
||||
| `` - `` | すべてのファイルを折りたたむ | ファイルツリー内のすべてのディレクトリを折りたたみます |
|
||||
| `` = `` | すべてのファイルを展開 | ファイルツリー内のすべてのディレクトリを展開します |
|
||||
| `` 0 `` | メインビューにフォーカス | |
|
||||
@@ -234,7 +235,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` d `` | 破棄 | 選択したファイルの変更を破棄するオプションを表示します。 |
|
||||
| `` g `` | アップストリームへのリセットオプションを表示 | |
|
||||
| `` D `` | リセット | 作業ツリーのリセットオプション(例:作業ツリーの完全破棄)を表示します。 |
|
||||
| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` ` `` | ファイルツリービューを切り替え | ファイル表示をフラット表示とツリー表示で切り替えます。フラット表示はすべてのファイルパスを一覧で表示し、ツリー表示はディレクトリごとにファイルをグループ化します。<br><br>デフォルトは設定ファイル内の 'gui.showFileTree' キーで変更できます。 |
|
||||
| `` <c-t> `` | 外部差分ツールを開く(git difftool) | |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` f `` | フェッチ | リモートから変更をフェッチします。 |
|
||||
|
||||
@@ -298,6 +298,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | Bisect 옵션 보기 | |
|
||||
| `` s `` | 스쿼시 | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 커밋메시지 변경 | Reword the selected commit's message. |
|
||||
| `` R `` | 에디터에서 커밋메시지 수정 | |
|
||||
| `` d `` | 커밋 삭제 | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -160,6 +160,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Hernoem commit | Reword the selected commit's message. |
|
||||
| `` R `` | Hernoem commit met editor | |
|
||||
| `` d `` | Verwijder commit | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -62,6 +62,7 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
|
||||
| `` b `` | Zobacz opcje bisect | |
|
||||
| `` s `` | Scal | Scal wybrany commit z commitami poniżej. Wiadomość wybranego commita zostanie dołączona do commita poniżej. |
|
||||
| `` f `` | Poprawka | Włącz wybrany commit do commita poniżej. Podobnie do fixup, ale wiadomość wybranego commita zostanie odrzucona. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Przeformułuj | Przeformułuj wiadomość wybranego commita. |
|
||||
| `` R `` | Przeformułuj za pomocą edytora | |
|
||||
| `` d `` | Usuń | Usuń wybrany commit. To usunie commit z gałęzi za pomocą rebazowania. Jeśli commit wprowadza zmiany, od których zależą późniejsze commity, być może będziesz musiał rozwiązać konflikty scalania. |
|
||||
|
||||
@@ -164,6 +164,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash o commit selecionado no commit abaixo dele. A mensagem do commit selecionado será anexada ao commit abaixo dele. |
|
||||
| `` f `` | Fixup | Faça o commit selecionado no commit abaixo dele. Semelhante para o squash, mas a mensagem do commit selecionado será descartada. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Reword | Repetir a mensagem de submissão selecionada. |
|
||||
| `` R `` | Republicar com o editor | |
|
||||
| `` d `` | Descartar | Solte o commit selecionado. Isso irá remover o commit do branch através de uma rebase. Se o commit faz com que as alterações em commits posteriores dependem, você pode precisar resolver conflitos de merge. |
|
||||
|
||||
@@ -170,6 +170,7 @@ _Связки клавиш_
|
||||
| `` b `` | Просмотреть параметры бинарного поиска | |
|
||||
| `` s `` | Объединить коммиты (Squash) | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Объединить несколько коммитов в один отбросив сообщение коммита (Fixup) | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Перефразировать коммит | Reword the selected commit's message. |
|
||||
| `` R `` | Переписать коммит с помощью редактора | |
|
||||
| `` d `` | Удалить коммит | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -14,25 +14,25 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` @ `` | 打开命令日志菜单 | 查看命令日志的选项,例如显示/隐藏命令日志以及聚焦命令日志 |
|
||||
| `` P `` | 推送 | 推送当前分支到它的上游。如果上游未配置,您可以在弹窗中配置上游分支。 |
|
||||
| `` p `` | 拉取 | 从当前分支的远程分支获取改动。如果上游未配置,您可以在弹窗中配置上游分支。 |
|
||||
| `` ) `` | 提高重命名相似度阈值 | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | 降低重命名相似度阈值 | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | 扩大差异视图中显示的上下文范围 | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | 缩小差异视图中显示的上下文范围 | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` ) `` | 提高重命名相似度阈值 | 提高将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
|
||||
| `` ( `` | 降低重命名相似度阈值 | 降低将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
|
||||
| `` } `` | 扩大差异视图中显示的上下文范围 | 增加差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
|
||||
| `` { `` | 缩小差异视图中显示的上下文范围 | 减少差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
|
||||
| `` : `` | 执行 Shell 命令 | 调出可输入shell命令执行的提示符。 |
|
||||
| `` <c-p> `` | 查看自定义补丁选项 | |
|
||||
| `` m `` | 查看合并/变基选项 | 查看当前合并或变基的中止、继续、跳过选项 |
|
||||
| `` R `` | 刷新 | 刷新git状态(即在后台上运行`git status`,`git branch`等命令以更新面板内容) 不会运行`git fetch` |
|
||||
| `` R `` | 刷新 | 刷新Git状态(即在后台运行`git status`、`git branch`等命令以更新面板内容)。此操作不会执行`git fetch`。 |
|
||||
| `` + `` | 下一屏模式(正常/半屏/全屏) | |
|
||||
| `` _ `` | 上一屏模式 | |
|
||||
| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers |
|
||||
| `` \| `` | 切换分页器 | 从已配置的分页器列表中选择下一个分页器 |
|
||||
| `` <esc> `` | 取消 | |
|
||||
| `` ? `` | 打开菜单 | |
|
||||
| `` <c-s> `` | 查看按路径过滤选项 | 查看用于过滤提交日志的选项,以便仅显示与过滤器匹配的提交。 |
|
||||
| `` W `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
|
||||
| `` <c-e> `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
|
||||
| `` q `` | 退出 | |
|
||||
| `` <c-z> `` | Suspend the application | |
|
||||
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` <c-z> `` | 挂起应用程序 | |
|
||||
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
|
||||
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||
|
||||
@@ -53,33 +53,6 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` ] `` | 下一个标签 | |
|
||||
| `` [ `` | 上一个标签 | |
|
||||
|
||||
## Input prompt
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <enter> `` | 确认 | |
|
||||
| `` <esc> `` | 关闭 | |
|
||||
|
||||
## Reflog
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` * `` | 选择当前分支的提交 | |
|
||||
| `` 0 `` | 聚焦主视图 | |
|
||||
| `` <enter> `` | 查看提交 | |
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 子提交
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -89,7 +62,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
@@ -124,6 +97,26 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` d `` | 删除 | 删除选定的工作树。这将删除工作树的目录以及 .git 目录中有关工作树的元数据。 |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 引用日志
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` * `` | 选择当前分支的提交 | |
|
||||
| `` 0 `` | 聚焦主视图 | |
|
||||
| `` <enter> `` | 查看提交 | |
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 提交
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -133,6 +126,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` b `` | 查看二分查找选项 | |
|
||||
| `` s `` | 压缩(Squash) | 将已选提交压缩到该提交之下。这些选定的提交的消息会附加到该提交的消息之下。 |
|
||||
| `` f `` | 修正 (fixup) | 将选定的提交合并到其下面的提交中。与压缩类似,但所选提交的消息将被丢弃。 |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 改写提交 | 重写所选提交的消息。 |
|
||||
| `` R `` | 使用编辑器重命名提交 | |
|
||||
| `` d `` | 删除提交 | 删除选中的提交。这将通过变基从分支中删除该提交,如果该提交修改的内容依赖于后续的提交,则需要解决合并冲突。 |
|
||||
@@ -154,7 +148,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
@@ -180,7 +174,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` c `` | 检出 | 检出文件 |
|
||||
| `` d `` | 删除 | 放弃对此文件的提交变更 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
|
||||
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` <space> `` | 补丁中包含的切换文件 | 切换文件是否包含在自定义补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
|
||||
| `` a `` | 操作所有文件 | 添加或删除所有提交中的文件到自定义的补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
|
||||
@@ -204,7 +198,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` A `` | 修补最后一次提交 | |
|
||||
| `` C `` | 使用 Git 编辑器提交变更 | |
|
||||
| `` <c-f> `` | 找到用于修复的基准提交 | 找到您当前变更所基于的提交,以便于修正/改进该提交。这样做可以省去您逐一查看分支提交来确定应该修正/改进哪个提交的麻烦。请参阅文档: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md> |
|
||||
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
|
||||
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` i `` | 忽略文件 | |
|
||||
| `` r `` | 刷新文件 | |
|
||||
@@ -217,7 +211,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` D `` | 重置 | 查看工作树的重置选项(例如:清除工作树)。 |
|
||||
| `` ` `` | 切换文件树视图 | 在平面布局和树布局之间切换文件视图。平面布局在单个列表中显示所有文件路径,树布局按目录分组文件。<br><br>可以在配置文件中使用 'gui.showFileTree' 键更改默认设置。 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
|
||||
| `` f `` | 抓取 | 从远程获取变更 |
|
||||
| `` - `` | 折叠全部文件 | 折叠文件树中的全部目录 |
|
||||
| `` = `` | 展开全部文件 | 展开文件树中的全部目录 |
|
||||
@@ -232,7 +226,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` i `` | 显示 git-flow 选项 | |
|
||||
| `` <space> `` | 检出 | 检出选中的项目 |
|
||||
| `` n `` | 新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` o `` | 创建拉取请求 | |
|
||||
| `` O `` | 创建拉取请求选项 | |
|
||||
| `` <c-y> `` | 复制拉取请求 URL 到剪贴板 | |
|
||||
@@ -241,7 +235,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` F `` | 强制检出 | 强制检出所选分支。这将在检出所选分支之前放弃工作目录中的所有本地更改。 |
|
||||
| `` d `` | 删除 | 查看本地/远程分支的删除选项 |
|
||||
| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 |
|
||||
| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. |
|
||||
| `` M `` | 合并到当前检出的分支 | 查看将选中项合并到当前分支的选项(正常合并,压缩合并) |
|
||||
| `` f `` | 从上游快进此分支 | 将当前分支直接移动到远程追踪分支的最新提交 |
|
||||
| `` T `` | 创建标签 | |
|
||||
| `` s `` | 排序 | |
|
||||
@@ -261,7 +255,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <left> `` | 选择上一个区块 | |
|
||||
| `` <right> `` | 选择下一个区块 | |
|
||||
| `` v `` | 切换拖动选择 | |
|
||||
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
|
||||
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
|
||||
| `` <c-o> `` | 复制选中文本到剪贴板 | |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
|
||||
@@ -290,7 +284,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
|
||||
| `` <esc> `` | Exit back to side panel | |
|
||||
| `` <esc> `` | 退出回到侧边面板 | |
|
||||
| `` / `` | 开始搜索 | |
|
||||
|
||||
## 正在合并
|
||||
@@ -306,7 +300,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` z `` | 撤销 | 撤消上次合并冲突解决 |
|
||||
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
|
||||
| `` <esc> `` | 返回文件面板 | |
|
||||
|
||||
## 正在暂存
|
||||
@@ -316,7 +310,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <left> `` | 选择上一个区块 | |
|
||||
| `` <right> `` | 选择下一个区块 | |
|
||||
| `` v `` | 切换拖动选择 | |
|
||||
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
|
||||
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
|
||||
| `` <c-o> `` | 复制选中文本到剪贴板 | |
|
||||
| `` <space> `` | 切换暂存状态 | 切换行暂存状态 |
|
||||
| `` d `` | 取消变更(git reset) | 当选择未暂存的变更时,使用git reset丢弃该变更。当选择已暂存的变更时,取消暂存该变更 |
|
||||
@@ -338,7 +332,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` mouse wheel down (fn+up) `` | 向下滚动 | |
|
||||
| `` mouse wheel up (fn+down) `` | 向上滚动 | |
|
||||
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
|
||||
| `` <esc> `` | Exit back to side panel | |
|
||||
| `` <esc> `` | 退出回到侧边面板 | |
|
||||
| `` / `` | 开始搜索 | |
|
||||
|
||||
## 状态
|
||||
@@ -382,6 +376,13 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 输入提示
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <enter> `` | 确认 | |
|
||||
| `` <esc> `` | 关闭 | |
|
||||
|
||||
## 远程
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -389,9 +390,9 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <enter> `` | 查看分支 | |
|
||||
| `` n `` | 添加新的远程仓库 | |
|
||||
| `` d `` | 删除 | 删除选中的远程。从远程跟踪远程分支的任何本地分支都不会受到影响。 |
|
||||
| `` e `` | 编辑 | 编辑远程仓库 |
|
||||
| `` e `` | 编辑(Edit) | 编辑远程仓库 |
|
||||
| `` f `` | 抓取 | 抓取远程仓库 |
|
||||
| `` F `` | Add fork remote | Quickly add a fork remote by replacing the owner in the origin URL and optionally check out a branch from new remote. |
|
||||
| `` F `` | 添加复刻远程仓库 | 通过替换 origin URL 中的所有者来快速添加复刻远程仓库,并可选择从新远程仓库检出分支。 |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 远程分支
|
||||
@@ -401,7 +402,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <c-o> `` | 复制分支名称到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 基于当前选中的远程分支检出一个新的本地分支,或者将远程分支作分离的HEAD。 |
|
||||
| `` n `` | 新分支 | |
|
||||
| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. |
|
||||
| `` M `` | 合并到当前检出的分支 | 查看将选中项合并到当前分支的选项(正常合并,压缩合并) |
|
||||
| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 |
|
||||
| `` d `` | 删除 | 从远程删除远程分支。 |
|
||||
| `` u `` | 设置为上游 | 设置为检出分支的上游 |
|
||||
|
||||
@@ -184,6 +184,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` b `` | 查看二分選項 | |
|
||||
| `` s `` | 壓縮 (Squash) | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | 修復 (Fixup) | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 改寫提交 | 改寫選中的提交訊息 |
|
||||
| `` R `` | 使用編輯器改寫提交 | |
|
||||
| `` d `` | 刪除提交 | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
+2
-1
@@ -713,6 +713,7 @@ keybinding:
|
||||
renameCommitWithEditor: R
|
||||
viewResetOptions: g
|
||||
markCommitAsFixup: f
|
||||
setFixupMessage: c
|
||||
createFixupCommit: F
|
||||
squashAboveCommits: S
|
||||
moveDownCommit: <c-j>
|
||||
@@ -1078,7 +1079,7 @@ services:
|
||||
Where:
|
||||
|
||||
- `gitDomain` stands for the domain used by git itself (i.e. the one present on clone URLs), e.g. `git.work.com`
|
||||
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab` or `gitea`
|
||||
- `provider` is one of `github`, `bitbucket`, `bitbucketServer`, `azuredevops`, `gitlab`, `gitea` or `codeberg`
|
||||
- `webDomain` is the URL where your git service exposes a web interface and APIs, e.g. `gitservice.work.com`
|
||||
|
||||
## Predefined commit message prefix
|
||||
|
||||
@@ -192,6 +192,7 @@ The permitted option fields are:
|
||||
| name | The first part of the label | no |
|
||||
| description | The second part of the label | no |
|
||||
| value | the value that will be used in the command | yes |
|
||||
| key | Keybinding to invoke this menu option without needing to navigate to it. Can be a single letter or one of the values from [here](https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings/Custom_Keybindings.md) | no |
|
||||
|
||||
If an option has no name the value will be displayed to the user in place of the name, so you're allowed to only include the value like so:
|
||||
|
||||
@@ -233,6 +234,34 @@ customCommands:
|
||||
description: 'branch for a release'
|
||||
```
|
||||
|
||||
Here's an example of supplying keybindings for menu options:
|
||||
|
||||
```yml
|
||||
customCommands:
|
||||
- key: 'a'
|
||||
command: 'echo {{.Form.BranchType | quote}}'
|
||||
context: 'commits'
|
||||
prompts:
|
||||
- type: 'menu'
|
||||
title: 'What kind of branch is it?'
|
||||
key: 'BranchType'
|
||||
options:
|
||||
- value: 'feature'
|
||||
name: 'feature branch'
|
||||
description: 'branch based off develop'
|
||||
key: 'f'
|
||||
- value: 'hotfix'
|
||||
name: 'hotfix branch'
|
||||
description: 'branch based off main for fast bug fixes'
|
||||
key: 'h'
|
||||
- value: 'release'
|
||||
name: 'release branch'
|
||||
description: 'branch for a release'
|
||||
key: 'r'
|
||||
```
|
||||
|
||||
In this example, pressing 'f', 'h', or 'r' will directly select the corresponding option without needing to navigate to it first.
|
||||
|
||||
### Menu-from-command
|
||||
|
||||
| _field_ | _description_ | _required_ |
|
||||
|
||||
@@ -31,6 +31,8 @@ git:
|
||||
|
||||
A cool feature of delta is --hyperlinks, which renders clickable links for the line numbers in the left margin, and lazygit supports these. To use them, set the `pager:` config to `delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}"`; this allows you to click on an underlined line number in the diff to jump right to that same line in your editor.
|
||||
|
||||
Note that delta's `--navigate` option doesn't work in lazygit, for technical reasons.
|
||||
|
||||
## Diff-so-fancy
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -89,6 +89,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Reword | Reword the selected commit's message. |
|
||||
| `` R `` | Reword with editor | |
|
||||
| `` d `` | Drop | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -69,6 +69,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` b `` | bisectオプションを表示 | |
|
||||
| `` s `` | スカッシュ | 選択したコミットをその下のコミットにスカッシュします。スカッシュとは複数のコミットを1つにまとめる操作です。選択したコミットのメッセージが下のコミットに追加されます。 |
|
||||
| `` f `` | フィックスアップ | 選択したコミットをその下のコミットにマージします。フィックスアップはスカッシュと似ていますが、選択したコミットのメッセージは破棄され、下のコミットのメッセージのみが保持されます。 |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | メッセージ変更 | 選択したコミットのメッセージを変更します。 |
|
||||
| `` R `` | エディタでメッセージ変更 | |
|
||||
| `` d `` | 削除 | 選択したコミットを削除します。これはリベースを通じてブランチからコミットを削除します。コミットが後続のコミットが依存する変更を行っている場合、マージコンフリクトを解決する必要があるかもしれません。 |
|
||||
@@ -114,7 +115,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` <space> `` | パッチに含めるファイルを切り替え | ファイルがカスタムパッチに含まれるかどうかを切り替えます。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
|
||||
| `` a `` | すべてのファイルを切り替え | コミットのすべてのファイルをカスタムパッチに追加/削除します。https://github.com/jesseduffield/lazygit#rebase-magic-custom-patchesを参照してください。 |
|
||||
| `` <enter> `` | ファイルに入る / ディレクトリの折りたたみを切り替える | ファイルが選択されている場合、そのファイルに入ってカスタムパッチに個々の行を追加/削除できます。ディレクトリが選択されている場合、ディレクトリを切り替えます。 |
|
||||
| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` ` `` | ファイルツリービューを切り替え | ファイル表示をフラット表示とツリー表示で切り替えます。フラット表示はすべてのファイルパスを一覧で表示し、ツリー表示はディレクトリごとにファイルをグループ化します。<br><br>デフォルトは設定ファイル内の 'gui.showFileTree' キーで変更できます。 |
|
||||
| `` - `` | すべてのファイルを折りたたむ | ファイルツリー内のすべてのディレクトリを折りたたみます |
|
||||
| `` = `` | すべてのファイルを展開 | ファイルツリー内のすべてのディレクトリを展開します |
|
||||
| `` 0 `` | メインビューにフォーカス | |
|
||||
@@ -234,7 +235,7 @@ _凡例:`<c-b>` はctrl+b、`<a-b>` はalt+b、`B` はshift+bを意味
|
||||
| `` d `` | 破棄 | 選択したファイルの変更を破棄するオプションを表示します。 |
|
||||
| `` g `` | アップストリームへのリセットオプションを表示 | |
|
||||
| `` D `` | リセット | 作業ツリーのリセットオプション(例:作業ツリーの完全破棄)を表示します。 |
|
||||
| `` ` `` | ファイルツリービューを切り替え | Toggle file view between flat and tree layout. Flat layout shows all file paths in a single list, tree layout groups files by directory.<br><br>The default can be changed in the config file with the key 'gui.showFileTree'. |
|
||||
| `` ` `` | ファイルツリービューを切り替え | ファイル表示をフラット表示とツリー表示で切り替えます。フラット表示はすべてのファイルパスを一覧で表示し、ツリー表示はディレクトリごとにファイルをグループ化します。<br><br>デフォルトは設定ファイル内の 'gui.showFileTree' キーで変更できます。 |
|
||||
| `` <c-t> `` | 外部差分ツールを開く(git difftool) | |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` f `` | フェッチ | リモートから変更をフェッチします。 |
|
||||
|
||||
@@ -298,6 +298,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | Bisect 옵션 보기 | |
|
||||
| `` s `` | 스쿼시 | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 커밋메시지 변경 | Reword the selected commit's message. |
|
||||
| `` R `` | 에디터에서 커밋메시지 수정 | |
|
||||
| `` d `` | 커밋 삭제 | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -160,6 +160,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Fixup | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Hernoem commit | Reword the selected commit's message. |
|
||||
| `` R `` | Hernoem commit met editor | |
|
||||
| `` d `` | Verwijder commit | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -62,6 +62,7 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
|
||||
| `` b `` | Zobacz opcje bisect | |
|
||||
| `` s `` | Scal | Scal wybrany commit z commitami poniżej. Wiadomość wybranego commita zostanie dołączona do commita poniżej. |
|
||||
| `` f `` | Poprawka | Włącz wybrany commit do commita poniżej. Podobnie do fixup, ale wiadomość wybranego commita zostanie odrzucona. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Przeformułuj | Przeformułuj wiadomość wybranego commita. |
|
||||
| `` R `` | Przeformułuj za pomocą edytora | |
|
||||
| `` d `` | Usuń | Usuń wybrany commit. To usunie commit z gałęzi za pomocą rebazowania. Jeśli commit wprowadza zmiany, od których zależą późniejsze commity, być może będziesz musiał rozwiązać konflikty scalania. |
|
||||
|
||||
@@ -164,6 +164,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
|
||||
| `` b `` | View bisect options | |
|
||||
| `` s `` | Squash | Squash o commit selecionado no commit abaixo dele. A mensagem do commit selecionado será anexada ao commit abaixo dele. |
|
||||
| `` f `` | Fixup | Faça o commit selecionado no commit abaixo dele. Semelhante para o squash, mas a mensagem do commit selecionado será descartada. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Reword | Repetir a mensagem de submissão selecionada. |
|
||||
| `` R `` | Republicar com o editor | |
|
||||
| `` d `` | Descartar | Solte o commit selecionado. Isso irá remover o commit do branch através de uma rebase. Se o commit faz com que as alterações em commits posteriores dependem, você pode precisar resolver conflitos de merge. |
|
||||
|
||||
@@ -170,6 +170,7 @@ _Связки клавиш_
|
||||
| `` b `` | Просмотреть параметры бинарного поиска | |
|
||||
| `` s `` | Объединить коммиты (Squash) | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | Объединить несколько коммитов в один отбросив сообщение коммита (Fixup) | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | Перефразировать коммит | Reword the selected commit's message. |
|
||||
| `` R `` | Переписать коммит с помощью редактора | |
|
||||
| `` d `` | Удалить коммит | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -14,25 +14,25 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` @ `` | 打开命令日志菜单 | 查看命令日志的选项,例如显示/隐藏命令日志以及聚焦命令日志 |
|
||||
| `` P `` | 推送 | 推送当前分支到它的上游。如果上游未配置,您可以在弹窗中配置上游分支。 |
|
||||
| `` p `` | 拉取 | 从当前分支的远程分支获取改动。如果上游未配置,您可以在弹窗中配置上游分支。 |
|
||||
| `` ) `` | 提高重命名相似度阈值 | Increase the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` ( `` | 降低重命名相似度阈值 | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename.<br><br>The default can be changed in the config file with the key 'git.renameSimilarityThreshold'. |
|
||||
| `` } `` | 扩大差异视图中显示的上下文范围 | Increase the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` { `` | 缩小差异视图中显示的上下文范围 | Decrease the amount of the context shown around changes in the diff view.<br><br>The default can be changed in the config file with the key 'git.diffContextSize'. |
|
||||
| `` ) `` | 提高重命名相似度阈值 | 提高将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
|
||||
| `` ( `` | 降低重命名相似度阈值 | 降低将删除和添加对视为重命名所需的相似度阈值。<br><br>默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。 |
|
||||
| `` } `` | 扩大差异视图中显示的上下文范围 | 增加差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
|
||||
| `` { `` | 缩小差异视图中显示的上下文范围 | 减少差异视图中变更周围显示的上下文量。<br><br>默认值可在配置文件中通过键 'git.diffContextSize' 更改。 |
|
||||
| `` : `` | 执行 Shell 命令 | 调出可输入shell命令执行的提示符。 |
|
||||
| `` <c-p> `` | 查看自定义补丁选项 | |
|
||||
| `` m `` | 查看合并/变基选项 | 查看当前合并或变基的中止、继续、跳过选项 |
|
||||
| `` R `` | 刷新 | 刷新git状态(即在后台上运行`git status`,`git branch`等命令以更新面板内容) 不会运行`git fetch` |
|
||||
| `` R `` | 刷新 | 刷新Git状态(即在后台运行`git status`、`git branch`等命令以更新面板内容)。此操作不会执行`git fetch`。 |
|
||||
| `` + `` | 下一屏模式(正常/半屏/全屏) | |
|
||||
| `` _ `` | 上一屏模式 | |
|
||||
| `` \| `` | Cycle pagers | Choose the next pager in the list of configured pagers |
|
||||
| `` \| `` | 切换分页器 | 从已配置的分页器列表中选择下一个分页器 |
|
||||
| `` <esc> `` | 取消 | |
|
||||
| `` ? `` | 打开菜单 | |
|
||||
| `` <c-s> `` | 查看按路径过滤选项 | 查看用于过滤提交日志的选项,以便仅显示与过滤器匹配的提交。 |
|
||||
| `` W `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
|
||||
| `` <c-e> `` | 打开 diff 菜单 | 查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。 |
|
||||
| `` q `` | 退出 | |
|
||||
| `` <c-z> `` | Suspend the application | |
|
||||
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | Toggle whether or not whitespace changes are shown in the diff view.<br><br>The default can be changed in the config file with the key 'git.ignoreWhitespaceInDiffView'. |
|
||||
| `` <c-z> `` | 挂起应用程序 | |
|
||||
| `` <c-w> `` | 切换是否在差异视图中显示空白字符差异 | 切换是否在差异视图中显示空白字符更改。<br><br>默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。 |
|
||||
| `` z `` | 撤销 | Reflog将用于确定运行哪个git命令来撤消最后一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||
| `` Z `` | 重做 | Reflog将用于确定运行哪个git命令来重做上一个git命令。这并不包括对工作树的更改,只考虑提交。 |
|
||||
|
||||
@@ -53,33 +53,6 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` ] `` | 下一个标签 | |
|
||||
| `` [ `` | 上一个标签 | |
|
||||
|
||||
## Input prompt
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <enter> `` | 确认 | |
|
||||
| `` <esc> `` | 关闭 | |
|
||||
|
||||
## Reflog
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` * `` | 选择当前分支的提交 | |
|
||||
| `` 0 `` | 聚焦主视图 | |
|
||||
| `` <enter> `` | 查看提交 | |
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 子提交
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -89,7 +62,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
@@ -124,6 +97,26 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` d `` | 删除 | 删除选定的工作树。这将删除工作树的目录以及 .git 目录中有关工作树的元数据。 |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 引用日志
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <c-o> `` | 复制提交哈希到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 检出所选择的提交作为分离HEAD。 |
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` * `` | 选择当前分支的提交 | |
|
||||
| `` 0 `` | 聚焦主视图 | |
|
||||
| `` <enter> `` | 查看提交 | |
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 提交
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -133,6 +126,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` b `` | 查看二分查找选项 | |
|
||||
| `` s `` | 压缩(Squash) | 将已选提交压缩到该提交之下。这些选定的提交的消息会附加到该提交的消息之下。 |
|
||||
| `` f `` | 修正 (fixup) | 将选定的提交合并到其下面的提交中。与压缩类似,但所选提交的消息将被丢弃。 |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 改写提交 | 重写所选提交的消息。 |
|
||||
| `` R `` | 使用编辑器重命名提交 | |
|
||||
| `` d `` | 删除提交 | 删除选中的提交。这将通过变基从分支中删除该提交,如果该提交修改的内容依赖于后续的提交,则需要解决合并冲突。 |
|
||||
@@ -154,7 +148,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` y `` | 复制提交属性到剪贴板 | 复制提交属性到剪贴板(如hash、URL、diff、消息、作者)。 |
|
||||
| `` o `` | 在浏览器中打开提交 | |
|
||||
| `` n `` | 从提交创建新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` g `` | 查看重置选项 | 查看重置选项 (soft/mixed/hard) 用于重置到选择项 |
|
||||
| `` C `` | 复制提交(拣选) | 标记提交为已复制。然后,在本地提交视图中,您可以按 `V` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `<esc>` 来取消选择。 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
@@ -180,7 +174,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` c `` | 检出 | 检出文件 |
|
||||
| `` d `` | 删除 | 放弃对此文件的提交变更 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
|
||||
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` <space> `` | 补丁中包含的切换文件 | 切换文件是否包含在自定义补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
|
||||
| `` a `` | 操作所有文件 | 添加或删除所有提交中的文件到自定义的补丁中。请参阅 https://github.com/jesseduffield/lazygit#rebase-magic-custom-patches。 |
|
||||
@@ -204,7 +198,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` A `` | 修补最后一次提交 | |
|
||||
| `` C `` | 使用 Git 编辑器提交变更 | |
|
||||
| `` <c-f> `` | 找到用于修复的基准提交 | 找到您当前变更所基于的提交,以便于修正/改进该提交。这样做可以省去您逐一查看分支提交来确定应该修正/改进哪个提交的麻烦。请参阅文档: <https://github.com/jesseduffield/lazygit/tree/master/docs/Fixup_Commits.md> |
|
||||
| `` e `` | 编辑 | 使用外部编辑器打开文件 |
|
||||
| `` e `` | 编辑(Edit) | 使用外部编辑器打开文件 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` i `` | 忽略文件 | |
|
||||
| `` r `` | 刷新文件 | |
|
||||
@@ -217,7 +211,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` D `` | 重置 | 查看工作树的重置选项(例如:清除工作树)。 |
|
||||
| `` ` `` | 切换文件树视图 | 在平面布局和树布局之间切换文件视图。平面布局在单个列表中显示所有文件路径,树布局按目录分组文件。<br><br>可以在配置文件中使用 'gui.showFileTree' 键更改默认设置。 |
|
||||
| `` <c-t> `` | 使用外部差异比较工具(git difftool) | |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
|
||||
| `` f `` | 抓取 | 从远程获取变更 |
|
||||
| `` - `` | 折叠全部文件 | 折叠文件树中的全部目录 |
|
||||
| `` = `` | 展开全部文件 | 展开文件树中的全部目录 |
|
||||
@@ -232,7 +226,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` i `` | 显示 git-flow 选项 | |
|
||||
| `` <space> `` | 检出 | 检出选中的项目 |
|
||||
| `` n `` | 新分支 | |
|
||||
| `` N `` | 移动提交至新分支 | Create a new branch and move the unpushed commits of the current branch to it. Useful if you meant to start new work and forgot to create a new branch first.<br><br>Note that this disregards the selection, the new branch is always created either from the main branch or stacked on top of the current branch (you get to choose which). |
|
||||
| `` N `` | 移动提交至新分支 | 创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。<br><br>请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。 |
|
||||
| `` o `` | 创建拉取请求 | |
|
||||
| `` O `` | 创建拉取请求选项 | |
|
||||
| `` <c-y> `` | 复制拉取请求 URL 到剪贴板 | |
|
||||
@@ -241,7 +235,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` F `` | 强制检出 | 强制检出所选分支。这将在检出所选分支之前放弃工作目录中的所有本地更改。 |
|
||||
| `` d `` | 删除 | 查看本地/远程分支的删除选项 |
|
||||
| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 |
|
||||
| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. |
|
||||
| `` M `` | 合并到当前检出的分支 | 查看将选中项合并到当前分支的选项(正常合并,压缩合并) |
|
||||
| `` f `` | 从上游快进此分支 | 将当前分支直接移动到远程追踪分支的最新提交 |
|
||||
| `` T `` | 创建标签 | |
|
||||
| `` s `` | 排序 | |
|
||||
@@ -261,7 +255,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <left> `` | 选择上一个区块 | |
|
||||
| `` <right> `` | 选择下一个区块 | |
|
||||
| `` v `` | 切换拖动选择 | |
|
||||
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
|
||||
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
|
||||
| `` <c-o> `` | 复制选中文本到剪贴板 | |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
|
||||
@@ -290,7 +284,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
|
||||
| `` <esc> `` | Exit back to side panel | |
|
||||
| `` <esc> `` | 退出回到侧边面板 | |
|
||||
| `` / `` | 开始搜索 | |
|
||||
|
||||
## 正在合并
|
||||
@@ -306,7 +300,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` z `` | 撤销 | 撤消上次合并冲突解决 |
|
||||
| `` e `` | 编辑文件 | 使用外部编辑器打开文件 |
|
||||
| `` o `` | 打开文件 | 使用默认程序打开该文件 |
|
||||
| `` M `` | View merge conflict options | View options for resolving merge conflicts. |
|
||||
| `` M `` | 查看合并冲突选项 | 查看用于解决合并冲突的选项。 |
|
||||
| `` <esc> `` | 返回文件面板 | |
|
||||
|
||||
## 正在暂存
|
||||
@@ -316,7 +310,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <left> `` | 选择上一个区块 | |
|
||||
| `` <right> `` | 选择下一个区块 | |
|
||||
| `` v `` | 切换拖动选择 | |
|
||||
| `` a `` | 切换代码块选择 | Toggle line-by-line vs. hunk selection mode. |
|
||||
| `` a `` | 切换代码块选择 | 切换逐行选择与代码块选择模式。 |
|
||||
| `` <c-o> `` | 复制选中文本到剪贴板 | |
|
||||
| `` <space> `` | 切换暂存状态 | 切换行暂存状态 |
|
||||
| `` d `` | 取消变更(git reset) | 当选择未暂存的变更时,使用git reset丢弃该变更。当选择已暂存的变更时,取消暂存该变更 |
|
||||
@@ -338,7 +332,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` mouse wheel down (fn+up) `` | 向下滚动 | |
|
||||
| `` mouse wheel up (fn+down) `` | 向上滚动 | |
|
||||
| `` <tab> `` | 切换到其他面板 | 切换到其他视图(已暂存/未暂存的变更) |
|
||||
| `` <esc> `` | Exit back to side panel | |
|
||||
| `` <esc> `` | 退出回到侧边面板 | |
|
||||
| `` / `` | 开始搜索 | |
|
||||
|
||||
## 状态
|
||||
@@ -382,6 +376,13 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` w `` | 查看工作区选项 | |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 输入提示
|
||||
|
||||
| Key | Action | Info |
|
||||
|-----|--------|-------------|
|
||||
| `` <enter> `` | 确认 | |
|
||||
| `` <esc> `` | 关闭 | |
|
||||
|
||||
## 远程
|
||||
|
||||
| Key | Action | Info |
|
||||
@@ -389,9 +390,9 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <enter> `` | 查看分支 | |
|
||||
| `` n `` | 添加新的远程仓库 | |
|
||||
| `` d `` | 删除 | 删除选中的远程。从远程跟踪远程分支的任何本地分支都不会受到影响。 |
|
||||
| `` e `` | 编辑 | 编辑远程仓库 |
|
||||
| `` e `` | 编辑(Edit) | 编辑远程仓库 |
|
||||
| `` f `` | 抓取 | 抓取远程仓库 |
|
||||
| `` F `` | Add fork remote | Quickly add a fork remote by replacing the owner in the origin URL and optionally check out a branch from new remote. |
|
||||
| `` F `` | 添加复刻远程仓库 | 通过替换 origin URL 中的所有者来快速添加复刻远程仓库,并可选择从新远程仓库检出分支。 |
|
||||
| `` / `` | 通过文本过滤当前视图 | |
|
||||
|
||||
## 远程分支
|
||||
@@ -401,7 +402,7 @@ _图例:`<c-b>` 意味着ctrl+b, `<a-b>意味着Alt+b, `B` 意味着shift+b_
|
||||
| `` <c-o> `` | 复制分支名称到剪贴板 | |
|
||||
| `` <space> `` | 检出 | 基于当前选中的远程分支检出一个新的本地分支,或者将远程分支作分离的HEAD。 |
|
||||
| `` n `` | 新分支 | |
|
||||
| `` M `` | 合并到当前检出的分支 | Merge selected branch into currently checked out branch. |
|
||||
| `` M `` | 合并到当前检出的分支 | 查看将选中项合并到当前分支的选项(正常合并,压缩合并) |
|
||||
| `` r `` | 变基 | 将检出的分支变基到所选的分支上。 |
|
||||
| `` d `` | 删除 | 从远程删除远程分支。 |
|
||||
| `` u `` | 设置为上游 | 设置为检出分支的上游 |
|
||||
|
||||
@@ -184,6 +184,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
|
||||
| `` b `` | 查看二分選項 | |
|
||||
| `` s `` | 壓縮 (Squash) | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
|
||||
| `` f `` | 修復 (Fixup) | Meld the selected commit into the commit below it. Similar to squash, but the selected commit's message will be discarded. |
|
||||
| `` c `` | Set fixup message | Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message. |
|
||||
| `` r `` | 改寫提交 | 改寫選中的提交訊息 |
|
||||
| `` R `` | 使用編輯器改寫提交 | |
|
||||
| `` d `` | 刪除提交 | Drop the selected commit. This will remove the commit from the branch via a rebase. If the commit makes changes that later commits depend on, you may need to resolve merge conflicts. |
|
||||
|
||||
@@ -12,21 +12,21 @@ require (
|
||||
github.com/aybabtme/humanlog v0.4.1
|
||||
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/gdamore/tcell/v2 v2.9.0
|
||||
github.com/gdamore/tcell/v2 v2.13.8
|
||||
github.com/go-errors/errors v1.5.1
|
||||
github.com/gookit/color v1.4.2
|
||||
github.com/integrii/flaggy v1.4.0
|
||||
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c
|
||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20251002151855-67e0e55ff42a
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20260128194906-9d8c3cdfac18
|
||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5
|
||||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
||||
github.com/karimkhaleel/jsonschema v0.0.0-20231001195015-d933f0d94ea3
|
||||
github.com/kyokomi/emoji/v2 v2.2.8
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0
|
||||
github.com/mattn/go-runewidth v0.0.19
|
||||
github.com/mgutz/str v1.2.0
|
||||
github.com/mitchellh/go-ps v1.0.0
|
||||
github.com/rivo/uniseg v0.4.7
|
||||
github.com/sahilm/fuzzy v0.1.0
|
||||
github.com/samber/lo v1.31.0
|
||||
github.com/sanity-io/litter v1.5.2
|
||||
@@ -38,8 +38,8 @@ require (
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
|
||||
golang.org/x/sync v0.18.0
|
||||
golang.org/x/sys v0.38.0
|
||||
golang.org/x/sync v0.19.0
|
||||
golang.org/x/sys v0.40.0
|
||||
gopkg.in/ozeidan/fuzzy-patricia.v3 v3.0.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
@@ -49,7 +49,6 @@ require (
|
||||
github.com/ProtonMail/go-crypto v1.1.6 // indirect
|
||||
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
@@ -79,8 +78,8 @@ require (
|
||||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
golang.org/x/crypto v0.45.0 // indirect
|
||||
golang.org/x/net v0.47.0 // indirect
|
||||
golang.org/x/term v0.37.0 // indirect
|
||||
golang.org/x/text v0.31.0 // indirect
|
||||
golang.org/x/term v0.39.0 // indirect
|
||||
golang.org/x/text v0.33.0 // indirect
|
||||
gopkg.in/fsnotify.v1 v1.4.7 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
|
||||
@@ -65,8 +65,6 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
|
||||
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
|
||||
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
|
||||
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
|
||||
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 h1:tuijfIjZyjZaHq9xDUh0tNitwXshJpbLkqMOJv4H3do=
|
||||
@@ -97,12 +95,10 @@ github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw=
|
||||
github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo=
|
||||
github.com/gdamore/tcell/v2 v2.8.0/go.mod h1:bj8ori1BG3OYMjmb3IklZVWfZUJ1UBQt9JXrOCOhGWw=
|
||||
github.com/gdamore/tcell/v2 v2.9.0 h1:N6t+eqK7/xwtRPwxzs1PXeRWnm0H9l02CrgJ7DLn1ys=
|
||||
github.com/gdamore/tcell/v2 v2.9.0/go.mod h1:8/ZoqM9rxzYphT9tH/9LnunhV9oPBqwS8WHGYm5nrmo=
|
||||
github.com/gdamore/tcell/v2 v2.13.8 h1:Mys/Kl5wfC/GcC5Cx4C2BIQH9dbnhnkPgS9/wF3RlfU=
|
||||
github.com/gdamore/tcell/v2 v2.13.8/go.mod h1:+Wfe208WDdB7INEtCsNrAN6O2m+wsTPk1RAovjaILlo=
|
||||
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
|
||||
github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=
|
||||
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
|
||||
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
|
||||
@@ -155,7 +151,6 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
@@ -194,8 +189,8 @@ github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c h1:tC2Paiis
|
||||
github.com/jesseduffield/generics v0.0.0-20250517122708-b0b4a53a6f5c/go.mod h1:F2fEBk0ddf6ixrBrJjY7phfQ3hL9rXG0uSjvwYe50bE=
|
||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd h1:ViKj6qth8FgcIWizn9KiACWwPemWSymx62OPN0tHT+Q=
|
||||
github.com/jesseduffield/go-git/v5 v5.14.1-0.20250407170251-e1a013310ccd/go.mod h1:lRhCiBr6XjQrvcQVa+UYsy/99d3wMXn/a0nSQlhnhlA=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20251002151855-67e0e55ff42a h1:z3NQvFXAWGT4B/MwQBZc+1ej8WJ/Nv35xngQRvwzPuI=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20251002151855-67e0e55ff42a/go.mod h1:sLIyZ2J42R6idGdtemZzsiR3xY5EF0KsvYEGh3dQv3s=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20260128194906-9d8c3cdfac18 h1:+Q17GqvNaGzuvIR1JCdIS0khVjMzdwrhXBBDxnsdN8Y=
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20260128194906-9d8c3cdfac18/go.mod h1:lQCd2TvvNXVKFBowy4A7xxZbUp+1KEiGs4j0Q5Zt9gQ=
|
||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5 h1:CDuQmfOjAtb1Gms6a1p5L2P8RhbLUq5t8aL7PiQd2uY=
|
||||
github.com/jesseduffield/lazycore v0.0.0-20221012050358-03d2e40243c5/go.mod h1:qxN4mHOAyeIDLP7IK7defgPClM/z1Kze8VVQiaEjzsQ=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
@@ -222,7 +217,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/kyokomi/emoji/v2 v2.2.8 h1:jcofPxjHWEkJtkIbcLHvZhxKgCPl6C7MyjTrD4KDqUE=
|
||||
github.com/kyokomi/emoji/v2 v2.2.8/go.mod h1:JUcn42DTdsXJo1SWanHh4HKDEyPaR5CqkmoirZZP9qE=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag=
|
||||
github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
@@ -236,9 +230,6 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
|
||||
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
|
||||
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/mgutz/str v1.2.0 h1:4IzWSdIz9qPQWLfKZ0rJcV0jcUDpxvP4JVZ4GXQyvSw=
|
||||
github.com/mgutz/str v1.2.0/go.mod h1:w1v0ofgLaJdoD0HpQ3fycxKD1WtxpjSo151pK/31q6w=
|
||||
github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
|
||||
@@ -258,8 +249,7 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
@@ -323,9 +313,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@@ -365,9 +352,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -402,10 +386,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
@@ -429,12 +409,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -482,24 +458,13 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
||||
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
|
||||
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
|
||||
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -509,13 +474,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
|
||||
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -568,8 +529,6 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
||||
@@ -199,6 +199,7 @@ func (self *ChangeTodoActionsInstruction) run(common *common.Common) error {
|
||||
return utils.TodoChange{
|
||||
Hash: c.Hash,
|
||||
NewAction: c.NewAction,
|
||||
Flag: c.Flag,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
type ChangeTodoAction struct {
|
||||
Hash string
|
||||
NewAction todo.TodoCommand
|
||||
Flag string
|
||||
}
|
||||
|
||||
func handleInteractiveRebase(common *common.Common, f func(path string) error) error {
|
||||
|
||||
@@ -154,7 +154,7 @@ func (self *BisectCommands) IsDone() (bool, []string, error) {
|
||||
candidates := []string{}
|
||||
|
||||
cmdArgs := NewGitCmd("rev-list").Arg(newHash).ToArgv()
|
||||
err := self.cmd.New(cmdArgs).RunAndProcessLines(func(line string) (bool, error) {
|
||||
err := self.cmd.New(cmdArgs).DontLog().RunAndProcessLines(func(line string) (bool, error) {
|
||||
hash := strings.TrimSpace(line)
|
||||
|
||||
if status, ok := info.statusMap[hash]; ok {
|
||||
|
||||
@@ -325,6 +325,7 @@ func (self *CommitLoader) getHydratedTodoCommits(hashPool *utils.StringPool, tod
|
||||
hydratedCommits = append(hydratedCommits, rebasingCommit)
|
||||
} else if commit := findFullCommit(rebasingCommit.Hash()); commit != nil {
|
||||
commit.Action = rebasingCommit.Action
|
||||
commit.ActionFlag = rebasingCommit.ActionFlag
|
||||
commit.Status = rebasingCommit.Status
|
||||
hydratedCommits = append(hydratedCommits, commit)
|
||||
}
|
||||
@@ -371,10 +372,11 @@ func (self *CommitLoader) getRebasingCommits(hashPool *utils.StringPool, addConf
|
||||
continue
|
||||
}
|
||||
commits = utils.Prepend(commits, models.NewCommit(hashPool, models.NewCommitOpts{
|
||||
Hash: t.Commit,
|
||||
Name: t.Msg,
|
||||
Status: models.StatusRebasing,
|
||||
Action: t.Command,
|
||||
Hash: t.Commit,
|
||||
Name: t.Msg,
|
||||
Status: models.StatusRebasing,
|
||||
Action: t.Command,
|
||||
ActionFlag: t.Flag,
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ func (self *RebaseCommands) MoveCommitsUp(commits []*models.Commit, startIdx int
|
||||
}).Run()
|
||||
}
|
||||
|
||||
func (self *RebaseCommands) InteractiveRebase(commits []*models.Commit, startIdx int, endIdx int, action todo.TodoCommand) error {
|
||||
func (self *RebaseCommands) InteractiveRebase(commits []*models.Commit, startIdx int, endIdx int, action todo.TodoCommand, flag string) error {
|
||||
baseIndex := endIdx + 1
|
||||
if action == todo.Squash || action == todo.Fixup {
|
||||
baseIndex++
|
||||
@@ -151,6 +151,7 @@ func (self *RebaseCommands) InteractiveRebase(commits []*models.Commit, startIdx
|
||||
return daemon.ChangeTodoAction{
|
||||
Hash: commit.Hash(),
|
||||
NewAction: action,
|
||||
Flag: flag,
|
||||
}, !commit.IsMerge()
|
||||
})
|
||||
|
||||
@@ -334,11 +335,12 @@ func todoFromCommit(commit *models.Commit) utils.Todo {
|
||||
}
|
||||
|
||||
// Sets the action for the given commits in the git-rebase-todo file
|
||||
func (self *RebaseCommands) EditRebaseTodo(commits []*models.Commit, action todo.TodoCommand) error {
|
||||
func (self *RebaseCommands) EditRebaseTodo(commits []*models.Commit, action todo.TodoCommand, flag string) error {
|
||||
commitsWithAction := lo.Map(commits, func(commit *models.Commit, _ int) utils.TodoChange {
|
||||
return utils.TodoChange{
|
||||
Hash: commit.Hash(),
|
||||
NewAction: action,
|
||||
Flag: flag,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -85,6 +85,6 @@ func (self *RemoteCommands) GetRemoteURL(remoteName string) (string, error) {
|
||||
Arg("--get-url", remoteName).
|
||||
ToArgv()
|
||||
|
||||
url, err := self.cmd.New(cmdArgs).RunWithOutput()
|
||||
url, err := self.cmd.New(cmdArgs).DontLog().RunWithOutput()
|
||||
return strings.TrimSpace(url), err
|
||||
}
|
||||
|
||||
@@ -233,10 +233,10 @@ func (self *WorkingTreeCommands) DiscardUnstagedFileChanges(file *models.File) e
|
||||
return self.cmd.New(cmdArgs).Run()
|
||||
}
|
||||
|
||||
// Escapes special characters in a filename for gitignore and exclude files
|
||||
// Escapes special characters in a filename for gitignore and exclude files, and prepends `/`
|
||||
func escapeFilename(filename string) string {
|
||||
re := regexp.MustCompile(`^[!#]|[\[\]*]`)
|
||||
return re.ReplaceAllString(filename, `\${0}`)
|
||||
return "/" + re.ReplaceAllString(filename, `\${0}`)
|
||||
}
|
||||
|
||||
// Ignore adds a file to the gitignore for the repo
|
||||
|
||||
@@ -75,6 +75,15 @@ var giteaServiceDef = ServiceDefinition{
|
||||
repoURLTemplate: defaultRepoURLTemplate,
|
||||
}
|
||||
|
||||
var codebergServiceDef = ServiceDefinition{
|
||||
provider: "codeberg",
|
||||
pullRequestURLIntoDefaultBranch: "/compare/{{.From}}",
|
||||
pullRequestURLIntoTargetBranch: "/compare/{{.To}}...{{.From}}",
|
||||
commitURL: "/commit/{{.CommitHash}}",
|
||||
regexStrings: defaultUrlRegexStrings,
|
||||
repoURLTemplate: defaultRepoURLTemplate,
|
||||
}
|
||||
|
||||
var serviceDefinitions = []ServiceDefinition{
|
||||
githubServiceDef,
|
||||
bitbucketServiceDef,
|
||||
@@ -82,6 +91,7 @@ var serviceDefinitions = []ServiceDefinition{
|
||||
azdoServiceDef,
|
||||
bitbucketServerServiceDef,
|
||||
giteaServiceDef,
|
||||
codebergServiceDef,
|
||||
}
|
||||
|
||||
var defaultServiceDomains = []ServiceDomain{
|
||||
@@ -110,4 +120,9 @@ var defaultServiceDomains = []ServiceDomain{
|
||||
gitDomain: "try.gitea.io",
|
||||
webDomain: "try.gitea.io",
|
||||
},
|
||||
{
|
||||
serviceDefinition: codebergServiceDef,
|
||||
gitDomain: "codeberg.org",
|
||||
webDomain: "codeberg.org",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -421,6 +421,44 @@ func TestGetPullRequestURL(t *testing.T) {
|
||||
assert.Equal(t, "https://mycompany.gitea.io/myproject/myrepo/compare/dev...feature%2Fnew", url)
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "Opens a link to new pull request on Codeberg (SSH)",
|
||||
from: "feature/new",
|
||||
remoteUrl: "git@codeberg.org:johndoe/myrepo.git",
|
||||
test: func(url string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://codeberg.org/johndoe/myrepo/compare/feature%2Fnew", url)
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "Opens a link to new pull request on Codeberg (SSH) with specific target",
|
||||
from: "feature/new",
|
||||
to: "dev",
|
||||
remoteUrl: "git@codeberg.org:johndoe/myrepo.git",
|
||||
test: func(url string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://codeberg.org/johndoe/myrepo/compare/dev...feature%2Fnew", url)
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "Opens a link to new pull request on Codeberg (HTTP)",
|
||||
from: "feature/new",
|
||||
remoteUrl: "https://codeberg.org/johndoe/myrepo.git",
|
||||
test: func(url string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://codeberg.org/johndoe/myrepo/compare/feature%2Fnew", url)
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "Opens a link to new pull request on Codeberg (HTTP) with specific target",
|
||||
from: "feature/new",
|
||||
to: "dev",
|
||||
remoteUrl: "https://codeberg.org/johndoe/myrepo.git",
|
||||
test: func(url string, err error) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://codeberg.org/johndoe/myrepo/compare/dev...feature%2Fnew", url)
|
||||
},
|
||||
},
|
||||
{
|
||||
testName: "Throws an error if git service is unsupported",
|
||||
from: "feature/divide-operation",
|
||||
@@ -505,7 +543,7 @@ func TestGetPullRequestURL(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "https://bitbucket.org/johndoe/social_network/pull-requests/new?source=feature%2Fprofile-page&t=1", url)
|
||||
},
|
||||
expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab, azuredevops, bitbucketServer, gitea"},
|
||||
expectedLoggedErrors: []string{"Unknown git service type: 'noservice'. Expected one of github, bitbucket, gitlab, azuredevops, bitbucketServer, gitea, codeberg"},
|
||||
},
|
||||
{
|
||||
testName: "Escapes reserved URL characters in from branch name",
|
||||
|
||||
@@ -60,6 +60,7 @@ type Commit struct {
|
||||
|
||||
Status CommitStatus
|
||||
Action todo.TodoCommand
|
||||
ActionFlag string // e.g. "-C" for fixup -C
|
||||
Divergence Divergence // set to DivergenceNone unless we are showing the divergence view
|
||||
}
|
||||
|
||||
@@ -68,6 +69,7 @@ type NewCommitOpts struct {
|
||||
Name string
|
||||
Status CommitStatus
|
||||
Action todo.TodoCommand
|
||||
ActionFlag string
|
||||
Tags []string
|
||||
ExtraInfo string
|
||||
AuthorName string
|
||||
@@ -83,6 +85,7 @@ func NewCommit(hashPool *utils.StringPool, opts NewCommitOpts) *Commit {
|
||||
Name: opts.Name,
|
||||
Status: opts.Status,
|
||||
Action: opts.Action,
|
||||
ActionFlag: opts.ActionFlag,
|
||||
Tags: opts.Tags,
|
||||
ExtraInfo: opts.ExtraInfo,
|
||||
AuthorName: opts.AuthorName,
|
||||
|
||||
@@ -60,6 +60,10 @@ func getPreset(shell string, osConfig *OSConfig, guessDefaultEditor func() strin
|
||||
nvimRemoteEditTemplate = `begin; if test -z "$NVIM"; nvim -- {{filename}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{filename}}; end; end`
|
||||
nvimRemoteEditAtLineTemplate = `begin; if test -z "$NVIM"; nvim +{{line}} -- {{filename}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{filename}}; nvim --server "$NVIM" --remote-send ":{{line}}<CR>"; end; end`
|
||||
nvimRemoteOpenDirInEditorTemplate = `begin; if test -z "$NVIM"; nvim -- {{dir}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{dir}}; end; end`
|
||||
} else if strings.HasSuffix(shell, "nu") || strings.HasSuffix(shell, "nushell") || os.Getenv("NU_VERSION") != "" {
|
||||
nvimRemoteEditTemplate = `if ($env | get -i NVIM | is-empty) { nvim -- {{filename}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{filename}} }`
|
||||
nvimRemoteEditAtLineTemplate = `if ($env | get -i NVIM | is-empty) { nvim +{{line}} -- {{filename}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{filename}}; nvim --server $env.NVIM --remote-send ":{{line}}<CR>" }`
|
||||
nvimRemoteOpenDirInEditorTemplate = `if ($env | get -i NVIM | is-empty) { nvim -- {{dir}} } else { nvim --server $env.NVIM --remote-send "q"; nvim --server $env.NVIM --remote-tab {{dir}} }`
|
||||
} else {
|
||||
nvimRemoteEditTemplate = `[ -z "$NVIM" ] && (nvim -- {{filename}}) || (nvim --server "$NVIM" --remote-send "q" && nvim --server "$NVIM" --remote-tab {{filename}})`
|
||||
nvimRemoteEditAtLineTemplate = `[ -z "$NVIM" ] && (nvim +{{line}} -- {{filename}}) || (nvim --server "$NVIM" --remote-send "q" && nvim --server "$NVIM" --remote-tab {{filename}} && nvim --server "$NVIM" --remote-send ":{{line}}<CR>")`
|
||||
|
||||
@@ -551,6 +551,7 @@ type KeybindingCommitsConfig struct {
|
||||
RenameCommitWithEditor string `yaml:"renameCommitWithEditor"`
|
||||
ViewResetOptions string `yaml:"viewResetOptions"`
|
||||
MarkCommitAsFixup string `yaml:"markCommitAsFixup"`
|
||||
SetFixupMessage string `yaml:"setFixupMessage"`
|
||||
CreateFixupCommit string `yaml:"createFixupCommit"`
|
||||
SquashAboveCommits string `yaml:"squashAboveCommits"`
|
||||
MoveDownCommit string `yaml:"moveDownCommit"`
|
||||
@@ -733,6 +734,8 @@ type CustomCommandMenuOption struct {
|
||||
Description string `yaml:"description"`
|
||||
// The value that will be used in the command
|
||||
Value string `yaml:"value" jsonschema:"example=feature,minLength=1"`
|
||||
// Keybinding to invoke this menu option without needing to navigate to it
|
||||
Key string `yaml:"key"`
|
||||
}
|
||||
|
||||
type CustomIconsConfig struct {
|
||||
@@ -1006,6 +1009,7 @@ func GetDefaultConfig() *UserConfig {
|
||||
RenameCommitWithEditor: "R",
|
||||
ViewResetOptions: "g",
|
||||
MarkCommitAsFixup: "f",
|
||||
SetFixupMessage: "c",
|
||||
CreateFixupCommit: "F",
|
||||
SquashAboveCommits: "S",
|
||||
MoveDownCommit: "<c-j>",
|
||||
|
||||
@@ -136,6 +136,12 @@ func validateCustomCommands(customCommands []CustomCommand) error {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
for _, prompt := range customCommand.Prompts {
|
||||
if err := validateCustomCommandPrompt(prompt); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateEnum("customCommand.output", customCommand.Output,
|
||||
[]string{"", "none", "terminal", "log", "logWithPty", "popup"}); err != nil {
|
||||
return err
|
||||
@@ -144,3 +150,14 @@ func validateCustomCommands(customCommands []CustomCommand) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateCustomCommandPrompt(prompt CustomCommandPrompt) error {
|
||||
for _, option := range prompt.Options {
|
||||
if !isValidKeybindingKey(option.Key) {
|
||||
return fmt.Errorf("Unrecognized key '%s' for custom command prompt option. For permitted values see %s",
|
||||
option.Key, constants.Links.Docs.CustomKeybindings)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -176,6 +176,31 @@ func TestUserConfigValidate_enums(t *testing.T) {
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Custom command keybinding in prompt menu",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.CustomCommands = []CustomCommand{
|
||||
{
|
||||
Key: "X",
|
||||
Description: "My Custom Commands",
|
||||
Prompts: []CustomCommandPrompt{
|
||||
{
|
||||
Options: []CustomCommandMenuOption{
|
||||
{Key: value},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "", valid: true},
|
||||
{value: "<disabled>", valid: true},
|
||||
{value: "q", valid: true},
|
||||
{value: "<c-c>", valid: true},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Custom command output",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ func (self *ContextMgr) Activate(c types.Context, opts types.OnFocusOpts) {
|
||||
|
||||
v.Visible = true
|
||||
|
||||
self.gui.c.GocuiGui().Cursor = v.Editable && v.Mask == 0
|
||||
self.gui.c.GocuiGui().Cursor = v.Editable && v.Mask == ""
|
||||
|
||||
c.HandleFocus(opts)
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ func NewCommitFilesContext(c *ContextCommon) *CommitFilesContext {
|
||||
},
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(ctx.OnSearchSelect))
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(ctx.OnSearchSelect)
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
@@ -21,12 +21,23 @@ type ListContextTrait struct {
|
||||
// If this is true, we only render the visible lines of the list. Useful for lists that can
|
||||
// get very long, because it can save a lot of memory
|
||||
renderOnlyVisibleLines bool
|
||||
// If renderOnlyVisibleLines is true, needRerenderVisibleLines indicates whether we need to
|
||||
// rerender the visible lines e.g. because the scroll position changed
|
||||
needRerenderVisibleLines bool
|
||||
|
||||
// true if we're inside the OnSearchSelect call; in that case we don't want to update the search
|
||||
// result index.
|
||||
inOnSearchSelect bool
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) IsListContext() {}
|
||||
|
||||
func (self *ListContextTrait) FocusLine() {
|
||||
self.Context.FocusLine()
|
||||
func (self *ListContextTrait) FocusLine(scrollIntoView bool) {
|
||||
self.Context.FocusLine(scrollIntoView)
|
||||
|
||||
// Need to capture this in a local variable because by the time the AfterLayout function runs,
|
||||
// the field will have been reset to false already
|
||||
inOnSearchSelect := self.inOnSearchSelect
|
||||
|
||||
// Doing this at the end of the layout function because we need the view to be
|
||||
// resized before we focus the line, otherwise if we're in accordion mode
|
||||
@@ -36,7 +47,10 @@ func (self *ListContextTrait) FocusLine() {
|
||||
oldOrigin, _ := self.GetViewTrait().ViewPortYBounds()
|
||||
|
||||
self.GetViewTrait().FocusPoint(
|
||||
self.ModelIndexToViewIndex(self.list.GetSelectedLineIdx()))
|
||||
self.ModelIndexToViewIndex(self.list.GetSelectedLineIdx()), scrollIntoView)
|
||||
if !inOnSearchSelect {
|
||||
self.GetView().SetNearestSearchPosition()
|
||||
}
|
||||
|
||||
selectRangeIndex, isSelectingRange := self.list.GetRangeStartIdx()
|
||||
if isSelectingRange {
|
||||
@@ -50,8 +64,8 @@ func (self *ListContextTrait) FocusLine() {
|
||||
self.refreshViewport()
|
||||
} else if self.renderOnlyVisibleLines {
|
||||
newOrigin, _ := self.GetViewTrait().ViewPortYBounds()
|
||||
if oldOrigin != newOrigin {
|
||||
self.HandleRender()
|
||||
if oldOrigin != newOrigin || self.needRerenderVisibleLines {
|
||||
self.refreshViewport()
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -75,7 +89,7 @@ func formatListFooter(selectedLineIdx int, length int) string {
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) HandleFocus(opts types.OnFocusOpts) {
|
||||
self.FocusLine()
|
||||
self.FocusLine(opts.ScrollSelectionIntoView)
|
||||
|
||||
self.GetViewTrait().SetHighlight(self.list.Len() > 0)
|
||||
|
||||
@@ -102,10 +116,10 @@ func (self *ListContextTrait) HandleRender() {
|
||||
if self.getNonModelItems != nil {
|
||||
totalLength += len(self.getNonModelItems())
|
||||
}
|
||||
self.GetViewTrait().SetContentLineCount(totalLength)
|
||||
startIdx, length := self.GetViewTrait().ViewPortYBounds()
|
||||
content := self.renderLines(startIdx, startIdx+length)
|
||||
self.GetViewTrait().SetViewPortContentAndClearEverythingElse(content)
|
||||
self.GetViewTrait().SetViewPortContentAndClearEverythingElse(totalLength, content)
|
||||
self.needRerenderVisibleLines = false
|
||||
} else {
|
||||
content := self.renderLines(-1, -1)
|
||||
self.GetViewTrait().SetContent(content)
|
||||
@@ -114,10 +128,11 @@ func (self *ListContextTrait) HandleRender() {
|
||||
self.setFooter()
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) OnSearchSelect(selectedLineIdx int) error {
|
||||
func (self *ListContextTrait) OnSearchSelect(selectedLineIdx int) {
|
||||
self.GetList().SetSelection(self.ViewIndexToModelIndex(selectedLineIdx))
|
||||
self.inOnSearchSelect = true
|
||||
self.HandleFocus(types.OnFocusOpts{})
|
||||
return nil
|
||||
self.inOnSearchSelect = false
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool {
|
||||
@@ -142,6 +157,10 @@ func (self *ListContextTrait) RenderOnlyVisibleLines() bool {
|
||||
return self.renderOnlyVisibleLines
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) SetNeedRerenderVisibleLines() {
|
||||
self.needRerenderVisibleLines = true
|
||||
}
|
||||
|
||||
func (self *ListContextTrait) TotalContentHeight() int {
|
||||
result := self.list.Len()
|
||||
if self.getNonModelItems != nil {
|
||||
|
||||
@@ -134,7 +134,8 @@ func NewLocalCommitsContext(c *ContextCommon) *LocalCommitsContext {
|
||||
},
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(ctx.OnSearchSelect))
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(ctx.OnSearchSelect)
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ func NewMainContext(
|
||||
SearchTrait: NewSearchTrait(c),
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(func(int) error { return nil }))
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(func(int) {})
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ type MenuViewModel struct {
|
||||
promptLines []string
|
||||
columnAlignment []utils.Alignment
|
||||
allowFilteringKeybindings bool
|
||||
keybindingsTakePrecedence bool
|
||||
*FilteredListViewModel[*types.MenuItem]
|
||||
}
|
||||
|
||||
@@ -117,6 +118,10 @@ func (self *MenuViewModel) SetAllowFilteringKeybindings(allow bool) {
|
||||
self.allowFilteringKeybindings = allow
|
||||
}
|
||||
|
||||
func (self *MenuViewModel) SetKeybindingsTakePrecedence(value bool) {
|
||||
self.keybindingsTakePrecedence = value
|
||||
}
|
||||
|
||||
// TODO: move into presentation package
|
||||
func (self *MenuViewModel) GetDisplayStrings(_ int, _ int) [][]string {
|
||||
menuItems := self.FilteredListViewModel.GetItems()
|
||||
@@ -205,10 +210,19 @@ func (self *MenuContext) GetKeybindings(opts types.KeybindingsOpts) []*types.Bin
|
||||
}
|
||||
})
|
||||
|
||||
// appending because that means the menu item bindings have lower precedence.
|
||||
// So if a basic binding is to escape from the menu, we want that to still be
|
||||
// what happens when you press escape. This matters when we're showing the menu
|
||||
// for all keybindings of say the files context.
|
||||
if self.keybindingsTakePrecedence {
|
||||
// This is used for all normal menus except the keybindings menu. In this case we want the
|
||||
// bindings of the menu items to have higher precedence than the builtin bindings; this
|
||||
// allows assigning a keybinding to a menu item that overrides a non-essential binding such
|
||||
// as 'j', 'k', 'H', 'L', etc. This is safe to do because the essential bindings such as
|
||||
// confirm and return have already been removed from the menu items in this case.
|
||||
return append(menuItemBindings, basicBindings...)
|
||||
}
|
||||
|
||||
// For the keybindings menu we didn't remove the essential bindings from the menu items, because
|
||||
// it is important to see all bindings (as a cheat sheet for what the keys are when the menu is
|
||||
// not open). Therefore we want the essential bindings to have higher precedence than the menu
|
||||
// item bindings.
|
||||
return append(basicBindings, menuItemBindings...)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ type PatchExplorerContext struct {
|
||||
getIncludedLineIndices func() []int
|
||||
c *ContextCommon
|
||||
mutex deadlock.Mutex
|
||||
|
||||
// true if we're inside the OnSelectItem callback; in that case we don't want to update the
|
||||
// search result index.
|
||||
inOnSelectItemCallback bool
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -49,14 +53,14 @@ func NewPatchExplorerContext(
|
||||
SearchTrait: NewSearchTrait(c),
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(
|
||||
func(selectedLineIdx int) error {
|
||||
ctx.GetMutex().Lock()
|
||||
defer ctx.GetMutex().Unlock()
|
||||
ctx.NavigateTo(selectedLineIdx)
|
||||
return nil
|
||||
}),
|
||||
)
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(func(selectedLineIdx int) {
|
||||
ctx.GetMutex().Lock()
|
||||
defer ctx.GetMutex().Unlock()
|
||||
ctx.inOnSelectItemCallback = true
|
||||
ctx.NavigateTo(selectedLineIdx)
|
||||
ctx.inOnSelectItemCallback = false
|
||||
})
|
||||
|
||||
ctx.SetHandleRenderFunc(ctx.OnViewWidthChanged)
|
||||
|
||||
@@ -113,6 +117,10 @@ func (self *PatchExplorerContext) FocusSelection() {
|
||||
// As far as the view is concerned, we are always selecting a range
|
||||
view.SetRangeSelectStart(startIdx)
|
||||
view.SetCursorY(endIdx - newOriginY)
|
||||
|
||||
if !self.inOnSelectItemCallback {
|
||||
view.SetNearestSearchPosition()
|
||||
}
|
||||
}
|
||||
|
||||
func (self *PatchExplorerContext) GetContentToRender() string {
|
||||
|
||||
@@ -26,9 +26,14 @@ func NewReflogCommitsContext(c *ContextCommon) *ReflogCommitsContext {
|
||||
},
|
||||
)
|
||||
|
||||
getDisplayStrings := func(_ int, _ int) [][]string {
|
||||
getDisplayStrings := func(startIdx int, endIdx int) [][]string {
|
||||
commits := viewModel.GetItems()
|
||||
if startIdx >= len(commits) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return presentation.GetReflogCommitListDisplayStrings(
|
||||
viewModel.GetItems(),
|
||||
commits[startIdx:endIdx],
|
||||
c.State().GetRepoState().GetScreenMode() != types.SCREEN_NORMAL,
|
||||
c.Modes().CherryPicking.SelectedHashSet(),
|
||||
c.Modes().Diffing.Ref,
|
||||
@@ -43,18 +48,20 @@ func NewReflogCommitsContext(c *ContextCommon) *ReflogCommitsContext {
|
||||
FilteredListViewModel: viewModel,
|
||||
ListContextTrait: &ListContextTrait{
|
||||
Context: NewSimpleContext(NewBaseContext(NewBaseContextOpts{
|
||||
View: c.Views().ReflogCommits,
|
||||
WindowName: "commits",
|
||||
Key: REFLOG_COMMITS_CONTEXT_KEY,
|
||||
Kind: types.SIDE_CONTEXT,
|
||||
Focusable: true,
|
||||
NeedsRerenderOnWidthChange: types.NEEDS_RERENDER_ON_WIDTH_CHANGE_WHEN_SCREEN_MODE_CHANGES,
|
||||
View: c.Views().ReflogCommits,
|
||||
WindowName: "commits",
|
||||
Key: REFLOG_COMMITS_CONTEXT_KEY,
|
||||
Kind: types.SIDE_CONTEXT,
|
||||
Focusable: true,
|
||||
NeedsRerenderOnWidthChange: types.NEEDS_RERENDER_ON_WIDTH_CHANGE_WHEN_SCREEN_MODE_CHANGES,
|
||||
NeedsRerenderOnHeightChange: true,
|
||||
})),
|
||||
ListRenderer: ListRenderer{
|
||||
list: viewModel,
|
||||
getDisplayStrings: getDisplayStrings,
|
||||
},
|
||||
c: c,
|
||||
c: c,
|
||||
renderOnlyVisibleLines: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,20 +36,6 @@ func (self *SearchTrait) ClearSearchString() {
|
||||
// used for type switch
|
||||
func (self *SearchTrait) IsSearchableContext() {}
|
||||
|
||||
func (self *SearchTrait) onSelectItemWrapper(innerFunc func(int) error) func(int, int, int) error {
|
||||
return func(selectedLineIdx int, index int, total int) error {
|
||||
self.RenderSearchStatus(index, total)
|
||||
|
||||
if total != 0 {
|
||||
if err := innerFunc(selectedLineIdx); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SearchTrait) RenderSearchStatus(index int, total int) {
|
||||
keybindingConfig := self.c.UserConfig().Keybinding
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ func (self *SimpleContext) HandleFocusLost(opts types.OnFocusLostOpts) {
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SimpleContext) FocusLine() {
|
||||
func (self *SimpleContext) FocusLine(scrollIntoView bool) {
|
||||
}
|
||||
|
||||
func (self *SimpleContext) HandleRender() {
|
||||
|
||||
@@ -134,7 +134,8 @@ func NewSubCommitsContext(
|
||||
},
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(ctx.OnSearchSelect))
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(ctx.OnSearchSelect)
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ func NewViewTrait(view *gocui.View) *ViewTrait {
|
||||
return &ViewTrait{view: view}
|
||||
}
|
||||
|
||||
func (self *ViewTrait) FocusPoint(yIdx int) {
|
||||
self.view.FocusPoint(self.view.OriginX(), yIdx)
|
||||
func (self *ViewTrait) FocusPoint(yIdx int, scrollIntoView bool) {
|
||||
self.view.FocusPoint(self.view.OriginX(), yIdx, scrollIntoView)
|
||||
}
|
||||
|
||||
func (self *ViewTrait) SetRangeSelectStart(yIdx int) {
|
||||
@@ -34,13 +34,9 @@ func (self *ViewTrait) SetViewPortContent(content string) {
|
||||
self.view.OverwriteLines(y, content)
|
||||
}
|
||||
|
||||
func (self *ViewTrait) SetViewPortContentAndClearEverythingElse(content string) {
|
||||
func (self *ViewTrait) SetViewPortContentAndClearEverythingElse(lineCount int, content string) {
|
||||
_, y := self.view.Origin()
|
||||
self.view.OverwriteLinesAndClearEverythingElse(y, content)
|
||||
}
|
||||
|
||||
func (self *ViewTrait) SetContentLineCount(lineCount int) {
|
||||
self.view.SetContentLineCount(lineCount)
|
||||
self.view.OverwriteLinesAndClearEverythingElse(lineCount, y, content)
|
||||
}
|
||||
|
||||
func (self *ViewTrait) SetContent(content string) {
|
||||
|
||||
@@ -56,7 +56,8 @@ func NewWorkingTreeContext(c *ContextCommon) *WorkingTreeContext {
|
||||
},
|
||||
}
|
||||
|
||||
ctx.GetView().SetOnSelectItem(ctx.SearchTrait.onSelectItemWrapper(ctx.OnSearchSelect))
|
||||
ctx.GetView().SetRenderSearchStatus(ctx.SearchTrait.RenderSearchStatus)
|
||||
ctx.GetView().SetOnSelectItem(ctx.OnSearchSelect)
|
||||
|
||||
return ctx
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
@@ -130,14 +129,6 @@ func (self *BasicCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
|
||||
GetDisabledReason: self.require(self.canSelectCommitsOfCurrentBranch),
|
||||
Description: self.c.Tr.SelectCommitsOfCurrentBranch,
|
||||
},
|
||||
// Putting this at the bottom of the list so that it has the lowest priority,
|
||||
// meaning that if the user has configured another keybinding to the same key
|
||||
// then that will take precedence.
|
||||
{
|
||||
// Hardcoding this key because it's not configurable
|
||||
Key: opts.GetKey("c"),
|
||||
Handler: self.handleOldCherryPickKey,
|
||||
},
|
||||
}
|
||||
|
||||
return bindings
|
||||
@@ -382,16 +373,6 @@ func (self *BasicCommitsController) canCopyCommits(selectedCommits []*models.Com
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *BasicCommitsController) handleOldCherryPickKey() error {
|
||||
msg := utils.ResolvePlaceholderString(self.c.Tr.OldCherryPickKeyWarning,
|
||||
map[string]string{
|
||||
"copy": keybindings.Label(self.c.UserConfig().Keybinding.Commits.CherryPickCopy),
|
||||
"paste": keybindings.Label(self.c.UserConfig().Keybinding.Commits.PasteCommits),
|
||||
})
|
||||
|
||||
return errors.New(msg)
|
||||
}
|
||||
|
||||
func (self *BasicCommitsController) openDiffTool(commit *models.Commit) error {
|
||||
to := commit.RefName()
|
||||
from, reverse := self.c.Modes().Diffing.GetFromAndReverseArgsForDiff(commit.ParentRefName())
|
||||
|
||||
@@ -531,7 +531,7 @@ func (self *BranchesController) createNewBranchWithName(newBranchName string) er
|
||||
return err
|
||||
}
|
||||
|
||||
self.context().SetSelection(0)
|
||||
self.c.Helpers().Refs.SelectFirstBranchAndFirstCommit()
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, KeepBranchSelectionIndex: true})
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/patch"
|
||||
"github.com/jesseduffield/lazygit/pkg/constants"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/filetree"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
@@ -283,6 +284,12 @@ func (self *CommitFilesController) openCopyMenu() error {
|
||||
}
|
||||
|
||||
func (self *CommitFilesController) checkout(node *filetree.CommitFileNode) error {
|
||||
hasModifiedFiles := helpers.AnyTrackedFilesInPathExceptSubmodules(node.GetPath(),
|
||||
self.c.Model().Files, self.c.Model().Submodules)
|
||||
if hasModifiedFiles {
|
||||
return errors.New(self.c.Tr.CannotCheckoutWithModifiedFilesErr)
|
||||
}
|
||||
|
||||
self.c.LogAction(self.c.Tr.Actions.CheckoutFile)
|
||||
_, to := self.context().GetFromAndToForDiff()
|
||||
if err := self.c.Git().WorkingTree.CheckoutFile(to, node.GetPath()); err != nil {
|
||||
|
||||
@@ -585,7 +585,7 @@ func (self *FilesController) handleNonInlineConflict(file *models.File) error {
|
||||
OnPress: func() error {
|
||||
return handle(self.c.Git().WorkingTree.StageFile, self.c.Tr.Actions.ResolveConflictByKeepingFile)
|
||||
},
|
||||
Key: 'p',
|
||||
Key: 'k',
|
||||
}
|
||||
deleteItem := &types.MenuItem{
|
||||
Label: self.c.Tr.MergeConflictDeleteFile,
|
||||
|
||||
@@ -101,7 +101,7 @@ func (self *CherryPickHelper) Paste() error {
|
||||
// below the selection.
|
||||
if commit := self.c.Contexts().LocalCommits.GetSelected(); commit != nil && !commit.IsTODO() {
|
||||
self.c.Contexts().LocalCommits.MoveSelection(len(cherryPickedCommits))
|
||||
self.c.Contexts().LocalCommits.FocusLine()
|
||||
self.c.Contexts().LocalCommits.FocusLine(true)
|
||||
}
|
||||
|
||||
// If we're in the cherry-picking state at this point, it must
|
||||
|
||||
@@ -61,28 +61,25 @@ func (self *CommitsHelper) JoinCommitMessageAndUnwrappedDescription() string {
|
||||
}
|
||||
|
||||
func TryRemoveHardLineBreaks(message string, autoWrapWidth int) string {
|
||||
messageRunes := []rune(message)
|
||||
lastHardLineStart := 0
|
||||
for i, r := range messageRunes {
|
||||
if r == '\n' {
|
||||
result := message
|
||||
for i, b := range message {
|
||||
if b == '\n' {
|
||||
// Try to make this a soft linebreak by turning it into a space, and
|
||||
// checking whether it still wraps to the same result then.
|
||||
messageRunes[i] = ' '
|
||||
str := message[lastHardLineStart:i] + " " + message[i+1:]
|
||||
softLineBreakIndices := gocui.AutoWrapContent(str, autoWrapWidth)
|
||||
|
||||
_, cursorMapping := gocui.AutoWrapContent(messageRunes[lastHardLineStart:], autoWrapWidth)
|
||||
|
||||
// Look at the cursorMapping to check whether auto-wrapping inserted
|
||||
// a line break. If it did, there will be a cursorMapping entry with
|
||||
// Orig pointing to the position after the inserted line break.
|
||||
if len(cursorMapping) == 0 || cursorMapping[0].Orig != i-lastHardLineStart+1 {
|
||||
// It didn't, so change it back to a newline
|
||||
messageRunes[i] = '\n'
|
||||
// See if auto-wrapping inserted a soft line break:
|
||||
if len(softLineBreakIndices) > 0 && softLineBreakIndices[0] == i-lastHardLineStart+1 {
|
||||
// It did, so change it to a space in the result.
|
||||
result = result[:i] + " " + result[i+1:]
|
||||
}
|
||||
lastHardLineStart = i + 1
|
||||
}
|
||||
}
|
||||
|
||||
return string(messageRunes)
|
||||
return result
|
||||
}
|
||||
|
||||
func (self *CommitsHelper) SwitchToEditor() error {
|
||||
|
||||
@@ -125,10 +125,10 @@ func (self *ConfirmationHelper) getPopupPanelDimensionsAux(panelWidth int, panel
|
||||
height/2 + panelHeight/2
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) getPopupPanelWidth() int {
|
||||
func (self *ConfirmationHelper) getPopupPanelWidth(maxWidth int) int {
|
||||
width, _ := self.c.GocuiGui().Size()
|
||||
// we want a minimum width up to a point, then we do it based on ratio.
|
||||
panelWidth := 4 * width / 7
|
||||
// we want a minimum width up to a point, then we do it based on ratio, but only up to the given max width
|
||||
panelWidth := min(4*width/7, maxWidth)
|
||||
minWidth := 80
|
||||
if panelWidth < minWidth {
|
||||
panelWidth = min(width-2, minWidth)
|
||||
@@ -152,7 +152,7 @@ func (self *ConfirmationHelper) preparePromptPanel(
|
||||
) {
|
||||
self.c.Views().Prompt.Title = opts.Title
|
||||
self.c.Views().Prompt.FgColor = theme.GocuiDefaultTextColor
|
||||
self.c.Views().Prompt.Mask = runeForMask(opts.Mask)
|
||||
self.c.Views().Prompt.Mask = characterForMask(opts.Mask)
|
||||
self.c.Views().Prompt.SetOrigin(0, 0)
|
||||
|
||||
textArea := self.c.Views().Prompt.TextArea
|
||||
@@ -173,11 +173,11 @@ func (self *ConfirmationHelper) preparePromptPanel(
|
||||
}
|
||||
}
|
||||
|
||||
func runeForMask(mask bool) rune {
|
||||
func characterForMask(mask bool) string {
|
||||
if mask {
|
||||
return '*'
|
||||
return "*"
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) CreatePopupPanel(ctx goContext.Context, opts types.CreatePopupPanelOpts) {
|
||||
@@ -328,7 +328,7 @@ func (self *ConfirmationHelper) resizeMenu(parentPopupContext types.Context) {
|
||||
// resize the window
|
||||
itemCount := self.c.Contexts().Menu.UnfilteredLen()
|
||||
offset := 3
|
||||
panelWidth := self.getPopupPanelWidth()
|
||||
panelWidth := self.getPopupPanelWidth(90)
|
||||
contentWidth := panelWidth - 2 // minus 2 for the frame
|
||||
promptLinesCount := self.layoutMenuPrompt(contentWidth)
|
||||
x0, y0, x1, y1 := self.getPopupPanelDimensionsForContentHeight(panelWidth, itemCount+offset+promptLinesCount, parentPopupContext)
|
||||
@@ -375,7 +375,7 @@ func (self *ConfirmationHelper) layoutMenuPrompt(contentWidth int) int {
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) resizeConfirmationPanel(parentPopupContext types.Context) {
|
||||
panelWidth := self.getPopupPanelWidth()
|
||||
panelWidth := self.getPopupPanelWidth(80)
|
||||
contentWidth := panelWidth - 2 // minus 2 for the frame
|
||||
confirmationView := self.c.Views().Confirmation
|
||||
prompt := confirmationView.Buffer()
|
||||
@@ -389,7 +389,7 @@ func (self *ConfirmationHelper) resizePromptPanel(parentPopupContext types.Conte
|
||||
if self.c.Views().Suggestions.Visible {
|
||||
suggestionsViewHeight = 11
|
||||
}
|
||||
panelWidth := self.getPopupPanelWidth()
|
||||
panelWidth := self.getPopupPanelWidth(80)
|
||||
contentWidth := panelWidth - 2 // minus 2 for the frame
|
||||
promptView := self.c.Views().Prompt
|
||||
prompt := promptView.TextArea.GetContent()
|
||||
@@ -403,7 +403,13 @@ func (self *ConfirmationHelper) resizePromptPanel(parentPopupContext types.Conte
|
||||
}
|
||||
|
||||
func (self *ConfirmationHelper) ResizeCommitMessagePanels(parentPopupContext types.Context) {
|
||||
panelWidth := self.getPopupPanelWidth()
|
||||
maxWidth := 100
|
||||
if self.c.UserConfig().Git.Commit.AutoWrapCommitMessage {
|
||||
// Adding some extra space to make it very obvious that we're wrapping the commit message
|
||||
// for real, not just soft-wrapping for display at the window width.
|
||||
maxWidth = self.c.UserConfig().Git.Commit.AutoWrapWidth + 25
|
||||
}
|
||||
panelWidth := self.getPopupPanelWidth(maxWidth)
|
||||
content := self.c.Views().CommitDescription.TextArea.GetContent()
|
||||
summaryViewHeight := 3
|
||||
panelHeight := getMessageHeight(false, true, content, panelWidth, self.c.Views().CommitDescription.TabWidth)
|
||||
|
||||
@@ -110,20 +110,24 @@ func (self *FixupHelper) HandleFindBaseCommitForFixupPress() error {
|
||||
return errors.New(self.c.Tr.BaseCommitIsAlreadyOnMainBranch)
|
||||
}
|
||||
|
||||
if len(hashGroups[NOT_MERGED]) > 1 {
|
||||
// If there are multiple commits that could be the base commit, list
|
||||
foundCommits := getCommitsForHashes(commits, hashGroups[NOT_MERGED])
|
||||
// If there are multiple commits that could be the base commit, remove all
|
||||
// those that are fixups for the last one.
|
||||
foundCommits = removeFixupCommits(foundCommits)
|
||||
|
||||
if len(foundCommits) > 1 {
|
||||
// If there are still multiple commits that could be the base commit, list
|
||||
// them in the error message. But only the candidates from the current
|
||||
// branch, not including any that are already merged.
|
||||
subjects := self.getHashesAndSubjects(commits, hashGroups[NOT_MERGED])
|
||||
subjects := getHashesAndSubjects(foundCommits)
|
||||
message := lo.Ternary(hasStagedChanges,
|
||||
self.c.Tr.MultipleBaseCommitsFoundStaged,
|
||||
self.c.Tr.MultipleBaseCommitsFoundUnstaged)
|
||||
return fmt.Errorf("%s\n\n%s", message, subjects)
|
||||
}
|
||||
|
||||
// At this point we know that the NOT_MERGED bucket has exactly one commit,
|
||||
// and that's the one we want to select.
|
||||
_, index, _ := self.findCommit(commits, hashGroups[NOT_MERGED][0])
|
||||
// Now we know that foundCommits has exactly one commit, so find its index
|
||||
_, index, _ := self.findCommit(commits, foundCommits[0].Hash())
|
||||
|
||||
return self.c.ConfirmIf(warnAboutAddedLines, types.ConfirmOpts{
|
||||
Title: self.c.Tr.FindBaseCommitForFixup,
|
||||
@@ -137,29 +141,59 @@ func (self *FixupHelper) HandleFindBaseCommitForFixupPress() error {
|
||||
}
|
||||
|
||||
self.c.Contexts().LocalCommits.SetSelection(index)
|
||||
self.c.Contexts().LocalCommits.FocusLine(true)
|
||||
self.c.Context().Push(self.c.Contexts().LocalCommits, types.OnFocusOpts{})
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (self *FixupHelper) getHashesAndSubjects(commits []*models.Commit, hashes []string) string {
|
||||
func getCommitsForHashes(commits []*models.Commit, hashes []string) []*models.Commit {
|
||||
// This is called only for the NOT_MERGED commits, and we know that all of them are contained in
|
||||
// the commits slice.
|
||||
commitsSet := set.NewFromSlice(hashes)
|
||||
subjects := make([]string, 0, len(hashes))
|
||||
result := make([]*models.Commit, 0, len(hashes))
|
||||
for _, c := range commits {
|
||||
if commitsSet.Includes(c.Hash()) {
|
||||
subjects = append(subjects, fmt.Sprintf("%s %s", c.ShortRefName(), c.Name))
|
||||
result = append(result, c)
|
||||
commitsSet.Remove(c.Hash())
|
||||
if commitsSet.Len() == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func getHashesAndSubjects(commits []*models.Commit) string {
|
||||
subjects := lo.Map(commits, func(c *models.Commit, _ int) string {
|
||||
return fmt.Sprintf("%s %s", c.ShortRefName(), c.Name)
|
||||
})
|
||||
return strings.Join(subjects, "\n")
|
||||
}
|
||||
|
||||
func removeFixupCommits(commits []*models.Commit) []*models.Commit {
|
||||
if len(commits) <= 1 {
|
||||
return commits
|
||||
}
|
||||
|
||||
// If the last found commit is itself a fixup, don't eliminate anything.
|
||||
baseSubject, lastIsFixup := IsFixupCommit(commits[len(commits)-1].Name)
|
||||
if lastIsFixup {
|
||||
return commits
|
||||
}
|
||||
|
||||
// need to go backwards because we are mutating the slice as we go
|
||||
for i := len(commits) - 2; i >= 0; i-- {
|
||||
subject, isFixup := IsFixupCommit(commits[i].Name)
|
||||
if isFixup && subject == baseSubject {
|
||||
commits = utils.Remove(commits, i)
|
||||
}
|
||||
}
|
||||
|
||||
return commits
|
||||
}
|
||||
|
||||
func (self *FixupHelper) getDiff() (string, bool, error) {
|
||||
args := []string{"-U0", "--ignore-submodules=all", "HEAD", "--"}
|
||||
|
||||
@@ -349,3 +383,30 @@ func (self *FixupHelper) findCommit(commits []*models.Commit, hash string) (*mod
|
||||
return commit.Hash() == hash
|
||||
})
|
||||
}
|
||||
|
||||
// Check whether the given subject line is the subject of a fixup commit, and
|
||||
// returns (trimmedSubject, true) if so (where trimmedSubject is the subject
|
||||
// with all fixup prefixes removed), or (subject, false) if not.
|
||||
func IsFixupCommit(subject string) (string, bool) {
|
||||
prefixes := []string{"fixup! ", "squash! ", "amend! "}
|
||||
trimPrefix := func(s string) (string, bool) {
|
||||
for _, prefix := range prefixes {
|
||||
if trimmedSubject, ok := strings.CutPrefix(s, prefix); ok {
|
||||
return trimmedSubject, true
|
||||
}
|
||||
}
|
||||
return s, false
|
||||
}
|
||||
|
||||
if subject, wasTrimmed := trimPrefix(subject); wasTrimmed {
|
||||
for {
|
||||
// handle repeated prefixes like "fixup! amend! fixup! Subject"
|
||||
if subject, wasTrimmed = trimPrefix(subject); !wasTrimmed {
|
||||
break
|
||||
}
|
||||
}
|
||||
return subject, true
|
||||
}
|
||||
|
||||
return subject, false
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package helpers
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/samber/lo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -155,3 +158,184 @@ index 9ce8efb33..0632e41b0 100644
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestFixupHelper_IsFixupCommit(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
subject string
|
||||
expectedTrimmedSubject string
|
||||
expectedIsFixup bool
|
||||
}{
|
||||
{
|
||||
subject: "Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
{
|
||||
subject: "fixup Bla",
|
||||
expectedTrimmedSubject: "fixup Bla",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
{
|
||||
subject: "fixup! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "fixup! fixup! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "amend! squash! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "fixup!",
|
||||
expectedTrimmedSubject: "fixup!",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
}
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.subject, func(t *testing.T) {
|
||||
trimmedSubject, isFixupCommit := IsFixupCommit(s.subject)
|
||||
assert.Equal(t, s.expectedTrimmedSubject, trimmedSubject)
|
||||
assert.Equal(t, s.expectedIsFixup, isFixupCommit)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestFixupHelper_removeFixupCommits(t *testing.T) {
|
||||
hashPool := &utils.StringPool{}
|
||||
|
||||
type commitDesc struct {
|
||||
Hash string
|
||||
Name string
|
||||
}
|
||||
|
||||
scenarios := []struct {
|
||||
name string
|
||||
commits []commitDesc
|
||||
expectedResult []commitDesc
|
||||
}{
|
||||
{
|
||||
name: "empty list",
|
||||
commits: []commitDesc{},
|
||||
expectedResult: []commitDesc{},
|
||||
},
|
||||
{
|
||||
name: "single commit",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"abc123", "Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "two unrelated commits",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "First feature"},
|
||||
{"def456", "Second feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"abc123", "First feature"},
|
||||
{"def456", "Second feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fixup commit for last commit",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "fixup! Some feature"},
|
||||
{"def456", "Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"def456", "Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "amend and squash commits for last commit",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "squash! Some feature"},
|
||||
{"def456", "amend! Some feature"},
|
||||
{"ghi789", "Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"ghi789", "Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fixup commit for different commit",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "fixup! Other feature"},
|
||||
{"def456", "Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"abc123", "fixup! Other feature"},
|
||||
{"def456", "Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "last commit is a fixup itself",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "fixup! Some feature"},
|
||||
{"def456", "fixup! Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"abc123", "fixup! Some feature"},
|
||||
{"def456", "fixup! Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "nested fixup commit",
|
||||
commits: []commitDesc{
|
||||
{"abc123", "fixup! fixup! Some feature"},
|
||||
{"def456", "amend! squash! fixup! Some feature"},
|
||||
{"ghi789", "Some feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{"ghi789", "Some feature"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "fixup commits mixed with unrelated commits",
|
||||
commits: []commitDesc{
|
||||
{Hash: "abc123", Name: "fixup! Base commit"},
|
||||
{Hash: "def456", Name: "Unrelated commit"},
|
||||
{Hash: "ghi789", Name: "fixup! Base commit"},
|
||||
{Hash: "jkl012", Name: "Base commit"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{Hash: "def456", Name: "Unrelated commit"},
|
||||
{Hash: "jkl012", Name: "Base commit"},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "only fixup commits for last commit removed, others preserved",
|
||||
commits: []commitDesc{
|
||||
{Hash: "abc123", Name: "fixup! First feature"},
|
||||
{Hash: "def456", Name: "fixup! Second feature"},
|
||||
{Hash: "ghi789", Name: "Second feature"},
|
||||
{Hash: "jkl012", Name: "First feature"},
|
||||
},
|
||||
expectedResult: []commitDesc{
|
||||
{Hash: "def456", Name: "fixup! Second feature"},
|
||||
{Hash: "ghi789", Name: "Second feature"},
|
||||
{Hash: "jkl012", Name: "First feature"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
makeCommitFromDesc := func(desc commitDesc, _ int) *models.Commit {
|
||||
return models.NewCommit(hashPool, models.NewCommitOpts{Hash: desc.Hash, Name: desc.Name})
|
||||
}
|
||||
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.name, func(t *testing.T) {
|
||||
commits := lo.Map(s.commits, makeCommitFromDesc)
|
||||
result := removeFixupCommits(commits)
|
||||
expectedCommits := lo.Map(s.expectedResult, makeCommitFromDesc)
|
||||
assert.Equal(t, expectedCommits, result)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,15 @@ func NewRefsHelper(
|
||||
}
|
||||
}
|
||||
|
||||
func (self *RefsHelper) SelectFirstBranchAndFirstCommit() {
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.c.Contexts().ReflogCommits.SetSelection(0)
|
||||
self.c.Contexts().LocalCommits.SetSelection(0)
|
||||
self.c.Contexts().Branches.GetView().SetOriginY(0)
|
||||
self.c.Contexts().ReflogCommits.GetView().SetOriginY(0)
|
||||
self.c.Contexts().LocalCommits.GetView().SetOriginY(0)
|
||||
}
|
||||
|
||||
func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions) error {
|
||||
waitingStatus := options.WaitingStatus
|
||||
if waitingStatus == "" {
|
||||
@@ -40,9 +49,8 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions
|
||||
cmdOptions := git_commands.CheckoutOptions{Force: false, EnvVars: options.EnvVars}
|
||||
|
||||
refresh := func() {
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.c.Contexts().ReflogCommits.SetSelection(0)
|
||||
self.c.Contexts().LocalCommits.SetSelection(0)
|
||||
self.SelectFirstBranchAndFirstCommit()
|
||||
|
||||
// loading a heap of commits is slow so we limit them whenever doing a reset
|
||||
self.c.Contexts().LocalCommits.SetLimitCommits(true)
|
||||
|
||||
@@ -348,8 +356,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest
|
||||
self.c.Context().Push(self.c.Contexts().Branches, types.OnFocusOpts{})
|
||||
}
|
||||
|
||||
self.c.Contexts().LocalCommits.SetSelection(0)
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.SelectFirstBranchAndFirstCommit()
|
||||
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI, KeepBranchSelectionIndex: true})
|
||||
}
|
||||
@@ -504,8 +511,7 @@ func (self *RefsHelper) moveCommitsToNewBranchStackedOnCurrentBranch(newBranchNa
|
||||
}
|
||||
}
|
||||
|
||||
self.c.Contexts().LocalCommits.SetSelection(0)
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.SelectFirstBranchAndFirstCommit()
|
||||
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI, KeepBranchSelectionIndex: true})
|
||||
return nil
|
||||
@@ -543,8 +549,7 @@ func (self *RefsHelper) moveCommitsToNewBranchOffOfMainBranch(newBranchName stri
|
||||
}
|
||||
}
|
||||
|
||||
self.c.Contexts().LocalCommits.SetSelection(0)
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.SelectFirstBranchAndFirstCommit()
|
||||
|
||||
self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI, KeepBranchSelectionIndex: true})
|
||||
return nil
|
||||
|
||||
@@ -108,20 +108,15 @@ func (self *SearchHelper) Confirm() error {
|
||||
return self.CancelPrompt()
|
||||
}
|
||||
|
||||
var err error
|
||||
switch state.SearchType() {
|
||||
case types.SearchTypeFilter:
|
||||
self.ConfirmFilter()
|
||||
case types.SearchTypeSearch:
|
||||
err = self.ConfirmSearch()
|
||||
self.ConfirmSearch()
|
||||
case types.SearchTypeNone:
|
||||
self.c.Context().Pop()
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return self.c.ResetKeybindings()
|
||||
}
|
||||
|
||||
@@ -144,13 +139,13 @@ func (self *SearchHelper) ConfirmFilter() {
|
||||
self.c.Context().Pop()
|
||||
}
|
||||
|
||||
func (self *SearchHelper) ConfirmSearch() error {
|
||||
func (self *SearchHelper) ConfirmSearch() {
|
||||
state := self.searchState()
|
||||
|
||||
context, ok := state.Context.(types.ISearchableContext)
|
||||
if !ok {
|
||||
self.c.Log.Warnf("Context %s is searchable", state.Context.GetKey())
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
searchString := self.promptContent()
|
||||
@@ -161,7 +156,7 @@ func (self *SearchHelper) ConfirmSearch() error {
|
||||
|
||||
self.c.Context().Pop()
|
||||
|
||||
return context.GetView().Search(searchString, modelSearchResults(context))
|
||||
context.GetView().Search(searchString, modelSearchResults(context))
|
||||
}
|
||||
|
||||
func modelSearchResults(context types.ISearchableContext) []gocui.SearchPosition {
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
@@ -71,6 +72,23 @@ func AnyTrackedFilesExceptSubmodules(files []*models.File, submoduleConfigs []*m
|
||||
return lo.SomeBy(files, func(f *models.File) bool { return f.Tracked && !f.IsSubmodule(submoduleConfigs) })
|
||||
}
|
||||
|
||||
func isContainedInPath(candidate string, path string) bool {
|
||||
return (
|
||||
// If the path is the repo root (appears as "/" in the UI), then all candidates are contained in it
|
||||
path == "." ||
|
||||
// Exact match; will only be true for files
|
||||
candidate == path ||
|
||||
// Match for files within a directory. We need to match the trailing slash to avoid
|
||||
// matching files with longer names.
|
||||
strings.HasPrefix(candidate, path+"/"))
|
||||
}
|
||||
|
||||
func AnyTrackedFilesInPathExceptSubmodules(path string, files []*models.File, submoduleConfigs []*models.SubmoduleConfig) bool {
|
||||
return lo.SomeBy(files, func(f *models.File) bool {
|
||||
return f.Tracked && isContainedInPath(f.GetPath(), path) && !f.IsSubmodule(submoduleConfigs)
|
||||
})
|
||||
}
|
||||
|
||||
func (self *WorkingTreeHelper) IsWorkingTreeDirtyExceptSubmodules() bool {
|
||||
return IsWorkingTreeDirtyExceptSubmodules(self.c.Model().Files, self.c.Model().Submodules)
|
||||
}
|
||||
@@ -90,18 +108,10 @@ func (self *WorkingTreeHelper) FileForSubmodule(submodule *models.SubmoduleConfi
|
||||
}
|
||||
|
||||
func (self *WorkingTreeHelper) OpenMergeTool() error {
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
Title: self.c.Tr.MergeToolTitle,
|
||||
Prompt: self.c.Tr.MergeToolPrompt,
|
||||
HandleConfirm: func() error {
|
||||
self.c.LogAction(self.c.Tr.Actions.OpenMergeTool)
|
||||
return self.c.RunSubprocessAndRefresh(
|
||||
self.c.Git().WorkingTree.OpenMergeToolCmdObj(),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
return nil
|
||||
self.c.LogAction(self.c.Tr.Actions.OpenMergeTool)
|
||||
return self.c.RunSubprocessAndRefresh(
|
||||
self.c.Git().WorkingTree.OpenMergeToolCmdObj(),
|
||||
)
|
||||
}
|
||||
|
||||
func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string, forceSkipHooks bool) error {
|
||||
|
||||
@@ -104,6 +104,7 @@ func (self *ListController) handleLineChangeAux(f func(int), change int) error {
|
||||
// doing this check so that if we're holding the up key at the start of the list
|
||||
// we're not constantly re-rendering the main view.
|
||||
cursorMoved := before != after
|
||||
originYBefore := self.context.GetView().OriginY()
|
||||
if cursorMoved {
|
||||
switch change {
|
||||
case -1:
|
||||
@@ -116,7 +117,21 @@ func (self *ListController) handleLineChangeAux(f func(int), change int) error {
|
||||
}
|
||||
|
||||
if cursorMoved || rangeBefore != rangeAfter {
|
||||
self.context.HandleFocus(types.OnFocusOpts{})
|
||||
if originYBefore != self.context.GetView().OriginY() {
|
||||
// Since we already scrolled the view above, the normal mechanism that
|
||||
// ListContextTrait.FocusLine uses for deciding whether rerendering is needed won't
|
||||
// work. It is based on checking whether the origin was changed by the call to
|
||||
// FocusPoint in that function, but since we scrolled the view directly above, the
|
||||
// origin has already been updated. So we must tell it explicitly to rerender.
|
||||
self.context.SetNeedRerenderVisibleLines()
|
||||
}
|
||||
|
||||
self.context.HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
} else {
|
||||
// If the selection did not change (because, for example, we are at the top of the list and
|
||||
// press up), we still want to ensure that the selection is visible. This is useful after
|
||||
// scrolling the selection out of view with the mouse.
|
||||
self.context.FocusLine(true)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -173,6 +188,15 @@ func (self *ListController) handlePageChange(delta int) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Since we already scrolled the view above, the normal mechanism that
|
||||
// ListContextTrait.FocusLine uses for deciding whether rerendering is needed won't work. It is
|
||||
// based on checking whether the origin was changed by the call to FocusPoint in that function,
|
||||
// but since we scrolled the view directly above, the origin has already been updated. So we
|
||||
// must tell it explicitly to rerender.
|
||||
self.context.SetNeedRerenderVisibleLines()
|
||||
|
||||
// Since we are maintaining the scroll position ourselves above, there's no point in passing
|
||||
// ScrollSelectionIntoView=true here.
|
||||
self.context.HandleFocus(types.OnFocusOpts{})
|
||||
|
||||
return nil
|
||||
|
||||
@@ -82,6 +82,15 @@ func (self *LocalCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
|
||||
Tooltip: self.c.Tr.FixupTooltip,
|
||||
DisplayOnScreen: true,
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.SetFixupMessage),
|
||||
Handler: self.withItem(self.setFixupMessage),
|
||||
GetDisabledReason: self.require(
|
||||
self.singleItemSelected(self.canSetFixupMessage),
|
||||
),
|
||||
Description: self.c.Tr.SetFixupMessage,
|
||||
Tooltip: self.c.Tr.SetFixupMessageTooltip,
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.RenameCommit),
|
||||
Handler: self.withItem(self.reword),
|
||||
@@ -321,20 +330,71 @@ func (self *LocalCommitsController) fixup(selectedCommits []*models.Commit, star
|
||||
return self.updateTodos(todo.Fixup, selectedCommits)
|
||||
}
|
||||
|
||||
self.c.Confirm(types.ConfirmOpts{
|
||||
Title: self.c.Tr.Fixup,
|
||||
Prompt: self.c.Tr.SureFixupThisCommit,
|
||||
HandleConfirm: func() error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.FixingStatus, func(gocui.Task) error {
|
||||
self.c.LogAction(self.c.Tr.Actions.FixupCommit)
|
||||
return self.interactiveRebase(todo.Fixup, startIdx, endIdx)
|
||||
})
|
||||
return self.c.Menu(types.CreateMenuOptions{
|
||||
Title: self.c.Tr.Fixup,
|
||||
Items: []*types.MenuItem{
|
||||
{
|
||||
Label: self.c.Tr.Fixup,
|
||||
Key: 'f',
|
||||
OnPress: func() error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.FixingStatus, func(gocui.Task) error {
|
||||
self.c.LogAction(self.c.Tr.Actions.FixupCommit)
|
||||
return self.interactiveRebase(todo.Fixup, startIdx, endIdx)
|
||||
})
|
||||
},
|
||||
Tooltip: self.c.Tr.FixupTooltip,
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.FixupKeepMessage,
|
||||
Key: 'c',
|
||||
OnPress: func() error {
|
||||
return self.c.WithWaitingStatus(self.c.Tr.FixingStatus, func(gocui.Task) error {
|
||||
self.c.LogAction(self.c.Tr.Actions.FixupCommitKeepMessage)
|
||||
return self.interactiveRebaseWithFlag(todo.Fixup, startIdx, endIdx, "-C")
|
||||
})
|
||||
},
|
||||
Tooltip: self.c.Tr.FixupKeepMessageTooltip,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) canSetFixupMessage(commit *models.Commit) *types.DisabledReason {
|
||||
if !self.isRebasing() {
|
||||
return &types.DisabledReason{Text: self.c.Tr.NotMidRebase}
|
||||
}
|
||||
|
||||
if commit.Action != todo.Fixup {
|
||||
return &types.DisabledReason{Text: self.c.Tr.MustSelectFixupCommit}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) setFixupMessage(commit *models.Commit) error {
|
||||
return self.c.Menu(types.CreateMenuOptions{
|
||||
Title: self.c.Tr.SetFixupMessage,
|
||||
Items: []*types.MenuItem{
|
||||
{
|
||||
Label: self.c.Tr.FixupDiscardMessage,
|
||||
Key: 'f',
|
||||
OnPress: func() error {
|
||||
return self.updateTodosWithFlag(todo.Fixup, []*models.Commit{commit}, "")
|
||||
},
|
||||
Tooltip: self.c.Tr.FixupDiscardMessageTooltip,
|
||||
},
|
||||
{
|
||||
Label: self.c.Tr.FixupKeepMessage,
|
||||
Key: 'c',
|
||||
OnPress: func() error {
|
||||
return self.updateTodosWithFlag(todo.Fixup, []*models.Commit{commit}, "-C")
|
||||
},
|
||||
Tooltip: self.c.Tr.FixupKeepMessageTooltip,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) reword(commit *models.Commit) error {
|
||||
commitIdx := self.context().GetSelectedLineIdx()
|
||||
if self.c.Git().Config.NeedsGpgSubprocessForCommit() && !self.isHeadCommit(commitIdx) {
|
||||
@@ -505,7 +565,7 @@ func (self *LocalCommitsController) edit(selectedCommits []*models.Commit, start
|
||||
commits := self.c.Model().Commits
|
||||
if !commits[endIdx].IsMerge() {
|
||||
selectionRangeAndMode := self.getSelectionRangeAndMode()
|
||||
err := self.c.Git().Rebase.InteractiveRebase(commits, startIdx, endIdx, todo.Edit)
|
||||
err := self.c.Git().Rebase.InteractiveRebase(commits, startIdx, endIdx, todo.Edit, "")
|
||||
return self.c.Helpers().MergeAndRebase.CheckMergeOrRebaseWithRefreshOptions(
|
||||
err,
|
||||
types.RefreshOptions{
|
||||
@@ -611,13 +671,17 @@ func (self *LocalCommitsController) pick(selectedCommits []*models.Commit) error
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) interactiveRebase(action todo.TodoCommand, startIdx int, endIdx int) error {
|
||||
return self.interactiveRebaseWithFlag(action, startIdx, endIdx, "")
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) interactiveRebaseWithFlag(action todo.TodoCommand, startIdx int, endIdx int, flag string) error {
|
||||
// When performing an action that will remove the selected commits, we need to select the
|
||||
// next commit down (which will end up at the start index after the action is performed)
|
||||
if action == todo.Drop || action == todo.Fixup || action == todo.Squash {
|
||||
self.context().SetSelection(startIdx)
|
||||
}
|
||||
|
||||
err := self.c.Git().Rebase.InteractiveRebase(self.c.Model().Commits, startIdx, endIdx, action)
|
||||
err := self.c.Git().Rebase.InteractiveRebase(self.c.Model().Commits, startIdx, endIdx, action, flag)
|
||||
|
||||
return self.c.Helpers().MergeAndRebase.CheckMergeOrRebase(err)
|
||||
}
|
||||
@@ -626,7 +690,11 @@ func (self *LocalCommitsController) interactiveRebase(action todo.TodoCommand, s
|
||||
// commit meaning you are trying to edit the todo file rather than actually
|
||||
// begin a rebase. It then updates the todo file with that action
|
||||
func (self *LocalCommitsController) updateTodos(action todo.TodoCommand, selectedCommits []*models.Commit) error {
|
||||
if err := self.c.Git().Rebase.EditRebaseTodo(selectedCommits, action); err != nil {
|
||||
return self.updateTodosWithFlag(action, selectedCommits, "")
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) updateTodosWithFlag(action todo.TodoCommand, selectedCommits []*models.Commit, flag string) error {
|
||||
if err := self.c.Git().Rebase.EditRebaseTodo(selectedCommits, action, flag); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -670,6 +738,7 @@ func (self *LocalCommitsController) moveDown(selectedCommits []*models.Commit, s
|
||||
return err
|
||||
}
|
||||
self.context().MoveSelection(1)
|
||||
self.context().HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
|
||||
self.c.Refresh(types.RefreshOptions{
|
||||
Mode: types.SYNC, Scope: []types.RefreshableView{types.REBASE_COMMITS},
|
||||
@@ -682,6 +751,7 @@ func (self *LocalCommitsController) moveDown(selectedCommits []*models.Commit, s
|
||||
err := self.c.Git().Rebase.MoveCommitsDown(self.c.Model().Commits, startIdx, endIdx)
|
||||
if err == nil {
|
||||
self.context().MoveSelection(1)
|
||||
self.context().HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
}
|
||||
return self.c.Helpers().MergeAndRebase.CheckMergeOrRebaseWithRefreshOptions(
|
||||
err, types.RefreshOptions{Mode: types.SYNC})
|
||||
@@ -694,6 +764,7 @@ func (self *LocalCommitsController) moveUp(selectedCommits []*models.Commit, sta
|
||||
return err
|
||||
}
|
||||
self.context().MoveSelection(-1)
|
||||
self.context().HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
|
||||
self.c.Refresh(types.RefreshOptions{
|
||||
Mode: types.SYNC, Scope: []types.RefreshableView{types.REBASE_COMMITS},
|
||||
@@ -706,6 +777,7 @@ func (self *LocalCommitsController) moveUp(selectedCommits []*models.Commit, sta
|
||||
err := self.c.Git().Rebase.MoveCommitsUp(self.c.Model().Commits, startIdx, endIdx)
|
||||
if err == nil {
|
||||
self.context().MoveSelection(-1)
|
||||
self.context().HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
}
|
||||
return self.c.Helpers().MergeAndRebase.CheckMergeOrRebaseWithRefreshOptions(
|
||||
err, types.RefreshOptions{Mode: types.SYNC})
|
||||
@@ -869,7 +941,7 @@ func (self *LocalCommitsController) revert(commits []*models.Commit, start, end
|
||||
return err
|
||||
}
|
||||
self.context().MoveSelection(len(commits))
|
||||
self.context().FocusLine()
|
||||
self.context().HandleFocus(types.OnFocusOpts{ScrollSelectionIntoView: true})
|
||||
|
||||
if mustStash {
|
||||
if err := self.c.Git().Stash.Pop(0); err != nil {
|
||||
@@ -1096,7 +1168,7 @@ func countSquashableCommitsAbove(commits []*models.Commit, selectedIdx int, reba
|
||||
// For each commit _above_ the selection, ...
|
||||
for i, commit := range commits[0:selectedIdx] {
|
||||
// ... see if it is a fixup commit, and get the base subject it applies to
|
||||
if baseSubject, isFixup := isFixupCommit(commit.Name); isFixup {
|
||||
if baseSubject, isFixup := helpers.IsFixupCommit(commit.Name); isFixup {
|
||||
// Then, for each commit after the fixup, up to and including the
|
||||
// rebase start commit, see if we find the base commit
|
||||
for _, baseCommit := range commits[i+1 : rebaseStartIdx+1] {
|
||||
@@ -1109,33 +1181,6 @@ func countSquashableCommitsAbove(commits []*models.Commit, selectedIdx int, reba
|
||||
return result
|
||||
}
|
||||
|
||||
// Check whether the given subject line is the subject of a fixup commit, and
|
||||
// returns (trimmedSubject, true) if so (where trimmedSubject is the subject
|
||||
// with all fixup prefixes removed), or (subject, false) if not.
|
||||
func isFixupCommit(subject string) (string, bool) {
|
||||
prefixes := []string{"fixup! ", "squash! ", "amend! "}
|
||||
trimPrefix := func(s string) (string, bool) {
|
||||
for _, prefix := range prefixes {
|
||||
if trimmedSubject, ok := strings.CutPrefix(s, prefix); ok {
|
||||
return trimmedSubject, true
|
||||
}
|
||||
}
|
||||
return s, false
|
||||
}
|
||||
|
||||
if subject, wasTrimmed := trimPrefix(subject); wasTrimmed {
|
||||
for {
|
||||
// handle repeated prefixes like "fixup! amend! fixup! Subject"
|
||||
if subject, wasTrimmed = trimPrefix(subject); !wasTrimmed {
|
||||
break
|
||||
}
|
||||
}
|
||||
return subject, true
|
||||
}
|
||||
|
||||
return subject, false
|
||||
}
|
||||
|
||||
func (self *LocalCommitsController) createTag(commit *models.Commit) error {
|
||||
return self.c.Helpers().Tags.OpenCreateTagPrompt(commit.Hash(), func() {})
|
||||
}
|
||||
|
||||
@@ -93,49 +93,3 @@ func Test_countSquashableCommitsAbove(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_isFixupCommit(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
subject string
|
||||
expectedTrimmedSubject string
|
||||
expectedIsFixup bool
|
||||
}{
|
||||
{
|
||||
subject: "Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
{
|
||||
subject: "fixup Bla",
|
||||
expectedTrimmedSubject: "fixup Bla",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
{
|
||||
subject: "fixup! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "fixup! fixup! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "amend! squash! Bla",
|
||||
expectedTrimmedSubject: "Bla",
|
||||
expectedIsFixup: true,
|
||||
},
|
||||
{
|
||||
subject: "fixup!",
|
||||
expectedTrimmedSubject: "fixup!",
|
||||
expectedIsFixup: false,
|
||||
},
|
||||
}
|
||||
for _, s := range scenarios {
|
||||
t.Run(s.subject, func(t *testing.T) {
|
||||
trimmedSubject, isFixupCommit := isFixupCommit(s.subject)
|
||||
assert.Equal(t, s.expectedTrimmedSubject, trimmedSubject)
|
||||
assert.Equal(t, s.expectedIsFixup, isFixupCommit)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,12 +46,12 @@ func (self *OptionsMenuAction) Call() error {
|
||||
appendBindings(navigation, &types.MenuSection{Title: self.c.Tr.KeybindingsMenuSectionNavigation, Column: 1})
|
||||
|
||||
return self.c.Menu(types.CreateMenuOptions{
|
||||
Title: self.c.Tr.Keybindings,
|
||||
Items: menuItems,
|
||||
HideCancel: true,
|
||||
ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft},
|
||||
AllowFilteringKeybindings: true,
|
||||
KeepConfirmKeybindings: true,
|
||||
Title: self.c.Tr.Keybindings,
|
||||
Items: menuItems,
|
||||
HideCancel: true,
|
||||
ColumnAlignment: []utils.Alignment{utils.AlignRight, utils.AlignLeft},
|
||||
AllowFilteringKeybindings: true,
|
||||
KeepConflictingKeybindings: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ func (self *RemotesController) fetchAndCheckout(remote *models.Remote, branchNam
|
||||
err = self.c.Git().Branch.New(branchName, remote.Name+"/"+branchName)
|
||||
if err == nil {
|
||||
self.c.Context().Push(self.c.Contexts().Branches, types.OnFocusOpts{})
|
||||
self.c.Contexts().Branches.SetSelection(0)
|
||||
self.c.Helpers().Refs.SelectFirstBranchAndFirstCommit()
|
||||
refreshOptions.KeepBranchSelectionIndex = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ func (self *StashController) handleRenameStashEntry(stashEntry *models.StashEntr
|
||||
return err
|
||||
}
|
||||
self.context().SetSelection(0) // Select the renamed stash
|
||||
self.context().FocusLine()
|
||||
self.context().FocusLine(true)
|
||||
self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{types.STASH}})
|
||||
return nil
|
||||
},
|
||||
|
||||
+10
-53
@@ -1,79 +1,36 @@
|
||||
package gui
|
||||
|
||||
import (
|
||||
"unicode"
|
||||
|
||||
"github.com/jesseduffield/gocui"
|
||||
)
|
||||
|
||||
func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch rune, mod gocui.Modifier, allowMultiline bool) bool {
|
||||
switch {
|
||||
case (key == gocui.KeyBackspace || key == gocui.KeyBackspace2) && (mod&gocui.ModAlt) != 0,
|
||||
key == gocui.KeyCtrlW:
|
||||
textArea.BackSpaceWord()
|
||||
case key == gocui.KeyBackspace || key == gocui.KeyBackspace2:
|
||||
textArea.BackSpaceChar()
|
||||
case key == gocui.KeyCtrlD || key == gocui.KeyDelete:
|
||||
textArea.DeleteChar()
|
||||
case key == gocui.KeyArrowDown:
|
||||
textArea.MoveCursorDown()
|
||||
case key == gocui.KeyArrowUp:
|
||||
textArea.MoveCursorUp()
|
||||
case (key == gocui.KeyArrowLeft || ch == 'b') && (mod&gocui.ModAlt) != 0:
|
||||
textArea.MoveLeftWord()
|
||||
case key == gocui.KeyArrowLeft || key == gocui.KeyCtrlB:
|
||||
textArea.MoveCursorLeft()
|
||||
case (key == gocui.KeyArrowRight || ch == 'f') && (mod&gocui.ModAlt) != 0:
|
||||
textArea.MoveRightWord()
|
||||
case key == gocui.KeyArrowRight || key == gocui.KeyCtrlF:
|
||||
textArea.MoveCursorRight()
|
||||
case key == gocui.KeyEnter:
|
||||
if allowMultiline {
|
||||
textArea.TypeRune('\n')
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
case key == gocui.KeySpace:
|
||||
textArea.TypeRune(' ')
|
||||
case key == gocui.KeyInsert:
|
||||
textArea.ToggleOverwrite()
|
||||
case key == gocui.KeyCtrlU:
|
||||
textArea.DeleteToStartOfLine()
|
||||
case key == gocui.KeyCtrlK:
|
||||
textArea.DeleteToEndOfLine()
|
||||
case key == gocui.KeyCtrlA || key == gocui.KeyHome:
|
||||
textArea.GoToStartOfLine()
|
||||
case key == gocui.KeyCtrlE || key == gocui.KeyEnd:
|
||||
textArea.GoToEndOfLine()
|
||||
case key == gocui.KeyCtrlY:
|
||||
textArea.Yank()
|
||||
|
||||
case unicode.IsPrint(ch):
|
||||
textArea.TypeRune(ch)
|
||||
default:
|
||||
return false
|
||||
func (gui *Gui) handleEditorKeypress(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier, allowMultiline bool) bool {
|
||||
if key == gocui.KeyEnter && allowMultiline {
|
||||
v.TextArea.TypeCharacter("\n")
|
||||
v.RenderTextArea()
|
||||
return true
|
||||
}
|
||||
|
||||
return true
|
||||
return gocui.DefaultEditor.Edit(v, key, ch, mod)
|
||||
}
|
||||
|
||||
// we've just copy+pasted the editor from gocui to here so that we can also re-
|
||||
// render the commit message length on each keypress
|
||||
func (gui *Gui) commitMessageEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool {
|
||||
matched := gui.handleEditorKeypress(v.TextArea, key, ch, mod, false)
|
||||
matched := gui.handleEditorKeypress(v, key, ch, mod, false)
|
||||
v.RenderTextArea()
|
||||
gui.c.Contexts().CommitMessage.RenderSubtitle()
|
||||
return matched
|
||||
}
|
||||
|
||||
func (gui *Gui) commitDescriptionEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool {
|
||||
matched := gui.handleEditorKeypress(v.TextArea, key, ch, mod, true)
|
||||
matched := gui.handleEditorKeypress(v, key, ch, mod, true)
|
||||
v.RenderTextArea()
|
||||
return matched
|
||||
}
|
||||
|
||||
func (gui *Gui) promptEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool {
|
||||
matched := gui.handleEditorKeypress(v.TextArea, key, ch, mod, false)
|
||||
matched := gui.handleEditorKeypress(v, key, ch, mod, false)
|
||||
|
||||
v.RenderTextArea()
|
||||
|
||||
@@ -90,7 +47,7 @@ func (gui *Gui) promptEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Mo
|
||||
}
|
||||
|
||||
func (gui *Gui) searchEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool {
|
||||
matched := gui.handleEditorKeypress(v.TextArea, key, ch, mod, false)
|
||||
matched := gui.handleEditorKeypress(v, key, ch, mod, false)
|
||||
v.RenderTextArea()
|
||||
|
||||
searchString := v.TextArea.GetContent()
|
||||
|
||||
@@ -14,6 +14,7 @@ func (gui *Gui) handleCreateExtrasMenuPanel() error {
|
||||
Items: []*types.MenuItem{
|
||||
{
|
||||
Label: gui.c.Tr.ToggleShowCommandLog,
|
||||
Key: 't',
|
||||
OnPress: func() error {
|
||||
currentContext := gui.c.Context().CurrentStatic()
|
||||
if gui.c.State().GetShowExtrasWindow() && currentContext.GetKey() == context.COMMAND_LOG_CONTEXT_KEY {
|
||||
@@ -28,6 +29,7 @@ func (gui *Gui) handleCreateExtrasMenuPanel() error {
|
||||
},
|
||||
{
|
||||
Label: gui.c.Tr.FocusCommandLog,
|
||||
Key: 'f',
|
||||
OnPress: gui.handleFocusCommandLog,
|
||||
},
|
||||
},
|
||||
|
||||
+13
-3
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
// note: items option is mutated by this function
|
||||
@@ -21,7 +22,13 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
|
||||
}
|
||||
|
||||
maxColumnSize := 1
|
||||
confirmKey := keybindings.GetKey(gui.c.UserConfig().Keybinding.Universal.ConfirmMenu)
|
||||
|
||||
essentialKeys := []types.Key{
|
||||
keybindings.GetKey(gui.c.UserConfig().Keybinding.Universal.ConfirmMenu),
|
||||
keybindings.GetKey(gui.c.UserConfig().Keybinding.Universal.Return),
|
||||
keybindings.GetKey(gui.c.UserConfig().Keybinding.Universal.PrevItem),
|
||||
keybindings.GetKey(gui.c.UserConfig().Keybinding.Universal.NextItem),
|
||||
}
|
||||
|
||||
for _, item := range opts.Items {
|
||||
if item.LabelColumns == nil {
|
||||
@@ -34,8 +41,8 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
|
||||
|
||||
maxColumnSize = max(maxColumnSize, len(item.LabelColumns))
|
||||
|
||||
// Remove all item keybindings that are the same as the confirm binding
|
||||
if item.Key == confirmKey && !opts.KeepConfirmKeybindings {
|
||||
// Remove all item keybindings that are the same as one of the essential bindings
|
||||
if !opts.KeepConflictingKeybindings && lo.Contains(essentialKeys, item.Key) {
|
||||
item.Key = nil
|
||||
}
|
||||
}
|
||||
@@ -51,8 +58,11 @@ func (gui *Gui) createMenu(opts types.CreateMenuOptions) error {
|
||||
gui.State.Contexts.Menu.SetMenuItems(opts.Items, opts.ColumnAlignment)
|
||||
gui.State.Contexts.Menu.SetPrompt(opts.Prompt)
|
||||
gui.State.Contexts.Menu.SetAllowFilteringKeybindings(opts.AllowFilteringKeybindings)
|
||||
gui.State.Contexts.Menu.SetKeybindingsTakePrecedence(!opts.KeepConflictingKeybindings)
|
||||
gui.State.Contexts.Menu.SetSelection(0)
|
||||
|
||||
gui.Views.Menu.SetOriginY(0)
|
||||
|
||||
gui.Views.Menu.Title = opts.Title
|
||||
gui.Views.Menu.FgColor = theme.GocuiDefaultTextColor
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/lucasb-eyer/go-colorful"
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/rivo/uniseg"
|
||||
)
|
||||
|
||||
type authorNameCacheKey struct {
|
||||
@@ -114,9 +114,9 @@ func getInitials(authorName string) string {
|
||||
return authorName
|
||||
}
|
||||
|
||||
firstRune := getFirstRune(authorName)
|
||||
if runewidth.RuneWidth(firstRune) > 1 {
|
||||
return string(firstRune)
|
||||
firstChar, _, width, _ := uniseg.FirstGraphemeClusterInString(authorName, -1)
|
||||
if width > 1 {
|
||||
return firstChar
|
||||
}
|
||||
|
||||
split := strings.Split(authorName, " ")
|
||||
@@ -127,15 +127,6 @@ func getInitials(authorName string) string {
|
||||
return utils.LimitStr(split[0], 1) + utils.LimitStr(split[1], 1)
|
||||
}
|
||||
|
||||
func getFirstRune(str string) rune {
|
||||
// just using the loop for the sake of getting the first rune
|
||||
for _, r := range str {
|
||||
return r
|
||||
}
|
||||
// should never land here
|
||||
return 0
|
||||
}
|
||||
|
||||
func SetCustomAuthors(customAuthorColors map[string]string) {
|
||||
authorStyleCache = utils.SetCustomColors(customAuthorColors)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/i18n"
|
||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
@@ -95,7 +94,7 @@ func getBranchDisplayStrings(
|
||||
if utils.StringWidth(displayName) > max(availableWidth, 3) {
|
||||
// Never shorten the branch name to less then 3 characters
|
||||
len := max(availableWidth, 4)
|
||||
displayName = runewidth.Truncate(displayName, len, "…")
|
||||
displayName = utils.TruncateWithEllipsis(displayName, len)
|
||||
}
|
||||
coloredName := nameTextStyle.Sprint(displayName)
|
||||
if checkedOutByWorkTree {
|
||||
|
||||
@@ -385,7 +385,12 @@ func displayCommit(
|
||||
|
||||
actionString := ""
|
||||
if commit.Action != models.ActionNone {
|
||||
actionString = actionColorMap(commit.Action, commit.Status).Sprint(commit.Action.String())
|
||||
actionStr := commit.Action.String()
|
||||
// Only show the flag for fixup commands (where -C changes the meaning)
|
||||
if commit.ActionFlag != "" && commit.Action == todo.Fixup {
|
||||
actionStr += " " + commit.ActionFlag
|
||||
}
|
||||
actionString = actionColorMap(commit.Action, commit.Status).Sprint(actionStr)
|
||||
}
|
||||
|
||||
tagString := ""
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/jesseduffield/gocui"
|
||||
"github.com/jesseduffield/lazygit/pkg/config"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/style"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
@@ -203,6 +204,7 @@ func (self *HandlerCreator) menuPrompt(prompt *config.CustomCommandPrompt, wrapp
|
||||
OnPress: func() error {
|
||||
return wrappedF(option.Value)
|
||||
},
|
||||
Key: keybindings.GetKey(option.Key),
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ func (self *Resolver) resolveMenuOption(option *config.CustomCommandMenuOption,
|
||||
Name: name,
|
||||
Description: description,
|
||||
Value: value,
|
||||
Key: option.Key,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -150,13 +150,13 @@ const (
|
||||
)
|
||||
|
||||
type CreateMenuOptions struct {
|
||||
Title string
|
||||
Prompt string // a message that will be displayed above the menu options
|
||||
Items []*MenuItem
|
||||
HideCancel bool
|
||||
ColumnAlignment []utils.Alignment
|
||||
AllowFilteringKeybindings bool
|
||||
KeepConfirmKeybindings bool // if true, the keybindings that match the confirm binding will not be removed from menu items
|
||||
Title string
|
||||
Prompt string // a message that will be displayed above the menu options
|
||||
Items []*MenuItem
|
||||
HideCancel bool
|
||||
ColumnAlignment []utils.Alignment
|
||||
AllowFilteringKeybindings bool
|
||||
KeepConflictingKeybindings bool // if true, the keybindings that match essential bindings such as confirm or return will not be removed from menu items
|
||||
}
|
||||
|
||||
type CreatePopupPanelOpts struct {
|
||||
|
||||
@@ -109,7 +109,7 @@ type Context interface {
|
||||
|
||||
HandleFocus(opts OnFocusOpts)
|
||||
HandleFocusLost(opts OnFocusLostOpts)
|
||||
FocusLine()
|
||||
FocusLine(scrollIntoView bool)
|
||||
HandleRender()
|
||||
HandleRenderToMain()
|
||||
}
|
||||
@@ -182,6 +182,7 @@ type IListContext interface {
|
||||
IsListContext() // used for type switch
|
||||
RangeSelectEnabled() bool
|
||||
RenderOnlyVisibleLines() bool
|
||||
SetNeedRerenderVisibleLines()
|
||||
|
||||
IndexForGotoBottom() int
|
||||
}
|
||||
@@ -201,12 +202,11 @@ type IPatchExplorerContext interface {
|
||||
}
|
||||
|
||||
type IViewTrait interface {
|
||||
FocusPoint(yIdx int)
|
||||
FocusPoint(yIdx int, scrollIntoView bool)
|
||||
SetRangeSelectStart(yIdx int)
|
||||
CancelRangeSelect()
|
||||
SetViewPortContent(content string)
|
||||
SetViewPortContentAndClearEverythingElse(content string)
|
||||
SetContentLineCount(lineCount int)
|
||||
SetViewPortContentAndClearEverythingElse(lineCount int, content string)
|
||||
SetContent(content string)
|
||||
SetFooter(value string)
|
||||
SetOriginX(value int)
|
||||
@@ -221,8 +221,9 @@ type IViewTrait interface {
|
||||
}
|
||||
|
||||
type OnFocusOpts struct {
|
||||
ClickedWindowName string
|
||||
ClickedViewLineIdx int
|
||||
ClickedWindowName string
|
||||
ClickedViewLineIdx int
|
||||
ScrollSelectionIntoView bool
|
||||
}
|
||||
|
||||
type OnFocusLostOpts struct {
|
||||
|
||||
@@ -140,7 +140,7 @@ func (gui *Gui) postRefreshUpdate(c types.Context) {
|
||||
// non-focused views to ensure that an inactive selection is painted
|
||||
// correctly, and that integration tests see the up to date selection
|
||||
// state.
|
||||
c.FocusLine()
|
||||
c.FocusLine(false)
|
||||
|
||||
currentCtx := gui.State.ContextMgr.Current()
|
||||
if currentCtx.GetKey() == context.NORMAL_MAIN_CONTEXT_KEY || currentCtx.GetKey() == context.NORMAL_SECONDARY_CONTEXT_KEY {
|
||||
|
||||
@@ -102,7 +102,6 @@ func (gui *Gui) createAllViews() error {
|
||||
|
||||
for _, view := range []*gocui.View{gui.Views.Main, gui.Views.Secondary, gui.Views.Staging, gui.Views.StagingSecondary, gui.Views.PatchBuilding, gui.Views.PatchBuildingSecondary, gui.Views.MergeConflicts} {
|
||||
view.Wrap = true
|
||||
view.IgnoreCarriageReturns = true
|
||||
view.UnderlineHyperLinksOnlyOnHover = true
|
||||
view.AutoRenderHyperLinks = true
|
||||
}
|
||||
|
||||
+22
-10
@@ -164,7 +164,12 @@ type TranslationSet struct {
|
||||
CannotSquashOrFixupMergeCommit string
|
||||
Fixup string
|
||||
FixupTooltip string
|
||||
SureFixupThisCommit string
|
||||
FixupKeepMessage string
|
||||
FixupKeepMessageTooltip string
|
||||
SetFixupMessage string
|
||||
SetFixupMessageTooltip string
|
||||
FixupDiscardMessage string
|
||||
FixupDiscardMessageTooltip string
|
||||
SureSquashThisCommit string
|
||||
Squash string
|
||||
PickCommitTooltip string
|
||||
@@ -247,8 +252,6 @@ type TranslationSet struct {
|
||||
UpdateFailedErr string
|
||||
ConfirmQuitDuringUpdateTitle string
|
||||
ConfirmQuitDuringUpdate string
|
||||
MergeToolTitle string
|
||||
MergeToolPrompt string
|
||||
IntroPopupMessage string
|
||||
NonReloadableConfigWarningTitle string
|
||||
NonReloadableConfigWarning string
|
||||
@@ -318,6 +321,8 @@ type TranslationSet struct {
|
||||
ViewRevertOptions string
|
||||
NotMergingOrRebasing string
|
||||
AlreadyRebasing string
|
||||
NotMidRebase string
|
||||
MustSelectFixupCommit string
|
||||
RecentRepos string
|
||||
MergeOptionsTitle string
|
||||
RebaseOptionsTitle string
|
||||
@@ -427,6 +432,7 @@ type TranslationSet struct {
|
||||
ViewItemFiles string
|
||||
CommitFilesTitle string
|
||||
CheckoutCommitFileTooltip string
|
||||
CannotCheckoutWithModifiedFilesErr string
|
||||
CanOnlyDiscardFromLocalCommits string
|
||||
Remove string
|
||||
DiscardOldFileChangeTooltip string
|
||||
@@ -898,7 +904,6 @@ type TranslationSet struct {
|
||||
SelectedItemIsNotABranch string
|
||||
SelectedItemDoesNotHaveFiles string
|
||||
MultiSelectNotSupportedForSubmodules string
|
||||
OldCherryPickKeyWarning string
|
||||
CommandDoesNotSupportOpeningInEditor string
|
||||
CustomCommands string
|
||||
NoApplicableCommandsInThisContext string
|
||||
@@ -967,6 +972,7 @@ type Actions struct {
|
||||
CheckoutFile string
|
||||
SquashCommitDown string
|
||||
FixupCommit string
|
||||
FixupCommitKeepMessage string
|
||||
RewordCommit string
|
||||
DropCommit string
|
||||
EditCommit string
|
||||
@@ -1261,7 +1267,12 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
CannotSquashOrFixupFirstCommit: "There's no commit below to squash into",
|
||||
CannotSquashOrFixupMergeCommit: "Cannot squash or fixup a merge commit",
|
||||
Fixup: "Fixup",
|
||||
SureFixupThisCommit: "Are you sure you want to 'fixup' the selected commit(s) into the commit below?",
|
||||
FixupKeepMessage: "Fixup and use this commit's message",
|
||||
FixupKeepMessageTooltip: "Squash the selected commit into the commit below, using this commit's message, discarding the message of the commit below.",
|
||||
SetFixupMessage: "Set fixup message",
|
||||
SetFixupMessageTooltip: "Set the message option for the fixup commit. The -C option means to use this commit's message instead of the target commit's message.",
|
||||
FixupDiscardMessage: "Fixup and discard this commit's message",
|
||||
FixupDiscardMessageTooltip: "Squash the selected commit into the commit below, discarding this commit's message.",
|
||||
SureSquashThisCommit: "Are you sure you want to squash the selected commit(s) into the commit below?",
|
||||
Squash: "Squash",
|
||||
PickCommitTooltip: "Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase.",
|
||||
@@ -1343,8 +1354,6 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
UpdateFailedErr: "Update failed: {{.errMessage}}",
|
||||
ConfirmQuitDuringUpdateTitle: "Currently updating",
|
||||
ConfirmQuitDuringUpdate: "An update is in progress. Are you sure you want to quit?",
|
||||
MergeToolTitle: "Merge tool",
|
||||
MergeToolPrompt: "Are you sure you want to open `git mergetool`?",
|
||||
IntroPopupMessage: englishIntroPopupMessage,
|
||||
NonReloadableConfigWarningTitle: "Config changed",
|
||||
NonReloadableConfigWarning: englishNonReloadableConfigWarning,
|
||||
@@ -1415,6 +1424,8 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
ViewRevertOptions: "View revert options",
|
||||
NotMergingOrRebasing: "You are currently neither rebasing nor merging",
|
||||
AlreadyRebasing: "Can't perform this action during a rebase",
|
||||
NotMidRebase: "This action only works during an interactive rebase",
|
||||
MustSelectFixupCommit: "This action only works on fixup commits",
|
||||
RecentRepos: "Recent repositories",
|
||||
MergeOptionsTitle: "Merge options",
|
||||
RebaseOptionsTitle: "Rebase options",
|
||||
@@ -1529,6 +1540,7 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
ViewItemFiles: "View files",
|
||||
CommitFilesTitle: "Commit files",
|
||||
CheckoutCommitFileTooltip: "Checkout file. This replaces the file in your working tree with the version from the selected commit.",
|
||||
CannotCheckoutWithModifiedFilesErr: "You have local modifications for the file(s) you are trying to check out. You need to stash or discard these first.",
|
||||
CanOnlyDiscardFromLocalCommits: "Changes can only be discarded from local commits",
|
||||
Remove: "Remove",
|
||||
DiscardOldFileChangeTooltip: "Discard this commit's changes to this file. This runs an interactive rebase in the background, so you may get a merge conflict if a later commit also changes this file.",
|
||||
@@ -1995,7 +2007,6 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
SelectedItemIsNotABranch: "Selected item is not a branch",
|
||||
SelectedItemDoesNotHaveFiles: "Selected item does not have files to view",
|
||||
MultiSelectNotSupportedForSubmodules: "Multiselection not supported for submodules",
|
||||
OldCherryPickKeyWarning: "The 'c' key is no longer the default key for copying commits to cherry pick. Please use `{{.copy}}` instead (and `{{.paste}}` to paste). The reason for this change is that the 'v' key for selecting a range of lines when staging is now also used for selecting a range of lines in any list view, meaning that we needed to find a new key for pasting commits, and if we're going to now use `{{.paste}}` for pasting commits, we may as well use `{{.copy}}` for copying them. If you want to configure the keybindings to get the old behaviour, set the following in your config:\n\nkeybinding:\n universal:\n toggleRangeSelect: <something other than v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'",
|
||||
CommandDoesNotSupportOpeningInEditor: "This command doesn't support switching to the editor",
|
||||
CustomCommands: "Custom commands",
|
||||
NoApplicableCommandsInThisContext: "(No applicable commands in this context)",
|
||||
@@ -2027,6 +2038,7 @@ func EnglishTranslationSet() *TranslationSet {
|
||||
CheckoutFile: "Checkout file",
|
||||
SquashCommitDown: "Squash commit down",
|
||||
FixupCommit: "Fixup commit",
|
||||
FixupCommitKeepMessage: "Fixup commit (keep message)",
|
||||
RewordCommit: "Reword commit",
|
||||
DropCommit: "Drop commit",
|
||||
EditCommit: "Edit commit",
|
||||
@@ -2214,9 +2226,9 @@ gui:
|
||||
keybinding:
|
||||
universal:
|
||||
suspendApp: <disabled>
|
||||
redo: <c-z>
|
||||
redo: <c-z>
|
||||
|
||||
- The 'git.paging.useConfig' option has been removed. If you were relying on it to configure your pager, you'll have to explicitly set the pager again using the git.paging.pager' option.
|
||||
- The 'git.paging.useConfig' option has been removed. If you were relying on it to configure your pager, you'll have to explicitly set the pager again using the 'git.paging.pager' option.
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"ToggleStagedAll": "すべてステージ",
|
||||
"ToggleStagedAllTooltip": "ワーキングツリー内のすべてのファイルのステージ/アンステージを切り替えます。",
|
||||
"ToggleTreeView": "ファイルツリービューを切り替え",
|
||||
"ToggleTreeViewTooltip": "ファイル表示をフラット表示とツリー表示で切り替えます。フラット表示はすべてのファイルパスを一覧で表示し、ツリー表示はディレクトリごとにファイルをグループ化します。\n\nデフォルトは設定ファイル内の 'gui.showFileTree' キーで変更できます。",
|
||||
"OpenDiffTool": "外部差分ツールを開く(git difftool)",
|
||||
"OpenMergeTool": "外部マージツールを開く",
|
||||
"Refresh": "更新",
|
||||
@@ -144,7 +145,6 @@
|
||||
"CannotSquashOrFixupMergeCommit": "マージコミットをスカッシュまたはフィックスアップすることはできません",
|
||||
"Fixup": "フィックスアップ",
|
||||
"FixupTooltip": "選択したコミットをその下のコミットにマージします。フィックスアップはスカッシュと似ていますが、選択したコミットのメッセージは破棄され、下のコミットのメッセージのみが保持されます。",
|
||||
"SureFixupThisCommit": "選択したコミットを下のコミットに'フィックスアップ'してもよろしいですか?",
|
||||
"SureSquashThisCommit": "選択したコミットを下のコミットにスカッシュしてもよろしいですか?",
|
||||
"Squash": "スカッシュ",
|
||||
"PickCommitTooltip": "選択したコミットをピックするようにマークします(リベース中)。これは、リベースを続行すると、コミットが保持されることを意味します。",
|
||||
@@ -227,8 +227,6 @@
|
||||
"UpdateFailedErr": "更新に失敗しました: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "現在更新中です",
|
||||
"ConfirmQuitDuringUpdate": "更新が進行中です。本当に終了してよろしいですか?",
|
||||
"MergeToolTitle": "マージツール",
|
||||
"MergeToolPrompt": "`git mergetool`を開いてもよろしいですか?",
|
||||
"NonReloadableConfigWarningTitle": "設定が変更されました",
|
||||
"NonReloadableConfigWarning": "以下の設定が変更されましたが、変更はすぐには反映されません。変更を反映するには、lazygitを終了して再起動してください:\n\n{{configs}}",
|
||||
"GitconfigParseErr": "引用符で囲まれていない'\\'文字が存在するため、Gogitがgitconfigファイルの解析に失敗しました。これらを削除することで問題が解決するはずです。",
|
||||
@@ -816,7 +814,6 @@
|
||||
"SelectedItemIsNotABranch": "選択された項目はブランチではありません",
|
||||
"SelectedItemDoesNotHaveFiles": "選択された項目には表示するファイルがありません",
|
||||
"MultiSelectNotSupportedForSubmodules": "サブモジュールでは複数選択はサポートされていません",
|
||||
"OldCherryPickKeyWarning": "'c'キーは現在、コミットのコピー(チェリーピック)のデフォルトキーではなくなりました。代わりに`{{.copy}}`キーを使用してコピーし、`{{.paste}}`キーでペーストしてください。\n\nこの変更理由は以下の通りです:\n- 以前は'v'キーがステージング時の行選択にのみ使用されていましたが、現在はすべてのリストビューで範囲選択に使われています\n- そのため、コミットペースト用の新しいキーが必要になり、`{{.paste}}`をペーストに使うなら、`{{.copy}}`をコピーに使う方が直感的です\n\n以前の動作に戻したい場合は、設定ファイルに以下を追加してください:\n\nkeybinding:\n universal:\n toggleRangeSelect: <v以外の何か>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'",
|
||||
"CommandDoesNotSupportOpeningInEditor": "このコマンドはエディタへの切り替えをサポートしていません",
|
||||
"CustomCommands": "カスタムコマンド",
|
||||
"NoApplicableCommandsInThisContext": "(このコンテキストでは適用可能なコマンドはありません)",
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
"CloseCancel": "닫기/취소",
|
||||
"Confirm": "확인",
|
||||
"Quit": "종료",
|
||||
"SureFixupThisCommit": "Are you sure you want to 'fixup' this commit? It will be merged into the commit below",
|
||||
"SureSquashThisCommit": "Are you sure you want to squash this commit into the commit below?",
|
||||
"Squash": "스쿼시",
|
||||
"PickCommitTooltip": "Pick commit (when mid-rebase)",
|
||||
@@ -122,8 +121,6 @@
|
||||
"UpdateFailedErr": "업데이트 실패: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "현재 업데이트 중입니다.",
|
||||
"ConfirmQuitDuringUpdate": "현재 업데이트를 진행 중입니다.종료하시겠습니까?",
|
||||
"MergeToolTitle": "병합 도구",
|
||||
"MergeToolPrompt": "정말로 `git mergetool`을 여시겠습니까?",
|
||||
"GitconfigParseErr": "따옴표로 묶이지 않은 '\\' 문자가 있어서 Gogit이 gitconfig 파일을 분석하지 못했습니다. 이를 제거하면 문제가 해결됩니다.",
|
||||
"EditFile": "파일 편집",
|
||||
"OpenFile": "파일 닫기",
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
"Close": "Sluiten",
|
||||
"CloseCancel": "Sluiten",
|
||||
"Confirm": "Bevestig",
|
||||
"SureFixupThisCommit": "Weet je zeker dat je fixup wil uitvoeren op deze commit? De commit hieronder zol worden squashed in deze",
|
||||
"SureSquashThisCommit": "Weet je zeker dat je deze commit wil samenvoegen met de commit hieronder?",
|
||||
"PickCommitTooltip": "Kies commit (wanneer midden in rebase)",
|
||||
"Reword": "Hernoem commit",
|
||||
|
||||
@@ -100,7 +100,6 @@
|
||||
"CannotSquashOrFixupFirstCommit": "Nie ma commita poniżej do scalenia",
|
||||
"Fixup": "Poprawka",
|
||||
"FixupTooltip": "Włącz wybrany commit do commita poniżej. Podobnie do fixup, ale wiadomość wybranego commita zostanie odrzucona.",
|
||||
"SureFixupThisCommit": "Czy na pewno chcesz 'poprawić' wybrane commit(y) do commita poniżej?",
|
||||
"SureSquashThisCommit": "Czy na pewno chcesz scalić wybrane commit(y) do commita poniżej?",
|
||||
"Squash": "Scal",
|
||||
"PickCommitTooltip": "Oznacz wybrany commit do wybrania (podczas rebazowania). Oznacza to, że commit zostanie zachowany po kontynuacji rebazowania.",
|
||||
@@ -178,8 +177,6 @@
|
||||
"UpdateFailedErr": "Aktualizacja nie powiodła się: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "Aktualizacja w toku",
|
||||
"ConfirmQuitDuringUpdate": "Aktualizacja jest w toku. Czy na pewno chcesz wyjść?",
|
||||
"MergeToolTitle": "Narzędzie scalania",
|
||||
"MergeToolPrompt": "Czy na pewno chcesz otworzyć `git mergetool`?",
|
||||
"GitconfigParseErr": "Gogit nie mógł przetworzyć pliku gitconfig z powodu obecności niezacytowanych znaków '\\'. Usunięcie ich powinno rozwiązać problem.",
|
||||
"EditFile": "Edytuj plik",
|
||||
"EditFileTooltip": "Otwórz plik w zewnętrznym edytorze.",
|
||||
@@ -670,7 +667,6 @@
|
||||
"NoItemSelected": "Nie wybrano elementu",
|
||||
"SelectedItemIsNotABranch": "Wybrany element nie jest branch'em",
|
||||
"SelectedItemDoesNotHaveFiles": "Wybrany element nie ma plików do wyświetlenia",
|
||||
"OldCherryPickKeyWarning": "Klawisz 'c' nie jest już domyślnym klawiszem do kopiowania commitów do cherry pick. Proszę użyj `{{.copy}}` zamiast tego (i `{{.paste}}` aby wkleić). Powodem tej zmiany jest to, że klawisz 'v' do wybierania zakresu linii podczas stagingu jest teraz używany również do wybierania zakresu linii w każdym widoku listy, co oznacza, że musieliśmy znaleźć nowy klawisz do wklejania commitów, i jeśli zamierzamy teraz używać `{{.paste}}` do wklejania commitów, możemy równie dobrze użyć `{{.copy}}` do ich kopiowania. Jeśli chcesz skonfigurować klawisze, aby uzyskać stare zachowanie, ustaw następujące w swojej konfiguracji:\n\nkeybinding:\n universal:\n toggleRangeSelect: <coś innego niż v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'",
|
||||
"Actions": {
|
||||
"CheckoutCommit": "Przełącz commit",
|
||||
"CheckoutTag": "Przełącz tag",
|
||||
|
||||
@@ -137,7 +137,6 @@
|
||||
"CannotSquashOrFixupMergeCommit": "Não é possível squash ou corrigir um commit de merge",
|
||||
"Fixup": "Fixup",
|
||||
"FixupTooltip": "Faça o commit selecionado no commit abaixo dele. Semelhante para o squash, mas a mensagem do commit selecionado será descartada.",
|
||||
"SureFixupThisCommit": "Tem certeza que deseja 'corrigir' o(s) commit(s) selecionado(s) no commit abaixo?",
|
||||
"SureSquashThisCommit": "Tem certeza que deseja esmagar o(s) commit(s) selecionado(s) no commit abaixo?",
|
||||
"Squash": "Squash",
|
||||
"PickCommitTooltip": "Marque o commit selecionado para ser escolhido (quando meados da base). Isso significa que o commit será mantido ao continuar o rebase.",
|
||||
@@ -219,8 +218,6 @@
|
||||
"UpdateFailedErr": "Falha na atualização: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "Atualmente atualizando",
|
||||
"ConfirmQuitDuringUpdate": "Uma atualização está em andamento. Tem certeza que deseja sair?",
|
||||
"MergeToolTitle": "Ferramenta de mesclagem",
|
||||
"MergeToolPrompt": "Tem certeza de que deseja abrir o `git mergetool`?",
|
||||
"NonReloadableConfigWarningTitle": "Configuração alterada",
|
||||
"NonReloadableConfigWarning": "As seguintes configurações foram alteradas, mas a mudança não tem efeito imediatamente. Encerre e reinicie o lazygit para que as mudanças tenham efeito:\n\n{{configs}}",
|
||||
"GitconfigParseErr": "Gogit falhou ao analisar seu arquivo gitconfig devido à presença de caracteres '\\' não citados. Removendo-os deve corrigir o problema.",
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
"Quit": "Выйти",
|
||||
"CannotSquashOrFixupFirstCommit": "Ниже нет коммита, который можно было бы объединить",
|
||||
"Fixup": "Объединить несколько коммитов в один отбросив сообщение коммита (Fixup) ",
|
||||
"SureFixupThisCommit": "Вы уверены, что хотите объединить несколько коммитов, отбросив сообщение коммита? Он будет объединён с коммитом ниже",
|
||||
"SureSquashThisCommit": "Вы уверены, что хотите объединить несколько коммитов в нижний коммит?",
|
||||
"Squash": "Объединить коммиты (Squash)",
|
||||
"PickCommitTooltip": "Выбрать коммит (в середине перебазирования)",
|
||||
@@ -122,8 +121,6 @@
|
||||
"UpdateFailedErr": "Не удалось обновить: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "Идёт Обновление",
|
||||
"ConfirmQuitDuringUpdate": "Выполняется обновление. Вы уверены, что хотите выйти?",
|
||||
"MergeToolTitle": "Инструмент слияния",
|
||||
"MergeToolPrompt": "Вы уверены, что хотите открыть `git mergetool`?",
|
||||
"GitconfigParseErr": "Gogit не удалось проанализировать ваш файл gitconfig из-за наличия символов «\\» без кавычек. Их удаление должно решить проблему.",
|
||||
"EditFile": "Редактировать файл",
|
||||
"OpenFile": "Открыть файл",
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
"OpenDiffTool": "使用外部差异比较工具(git difftool)",
|
||||
"OpenMergeTool": "打开外部合并工具(git mergetool)",
|
||||
"Refresh": "刷新",
|
||||
"RefreshTooltip": "刷新git状态(即在后台上运行`git status`,`git branch`等命令以更新面板内容) 不会运行`git fetch`",
|
||||
"RefreshTooltip": "刷新Git状态(即在后台运行`git status`、`git branch`等命令以更新面板内容)。此操作不会执行`git fetch`。",
|
||||
"Push": "推送",
|
||||
"Pull": "拉取",
|
||||
"PushTooltip": "推送当前分支到它的上游。如果上游未配置,您可以在弹窗中配置上游分支。",
|
||||
@@ -132,8 +132,15 @@
|
||||
"NewBranch": "新分支",
|
||||
"NewBranchFromStashTooltip": "从选定的贮藏项创建一个新分支。这是通过 git 检查创建贮藏项的提交,从该提交创建一个新分支,然后将贮藏项作为附加提交应用到新分支来实现的。",
|
||||
"MoveCommitsToNewBranch": "移动提交至新分支",
|
||||
"MoveCommitsToNewBranchTooltip": "创建一个新分支,并将当前分支未推送的提交移动到该分支。如果您打算开始新工作但忘记先创建新分支,这会很有用。\n\n请注意,此操作忽略选择,新分支总是从主分支创建或堆叠在当前分支之上(您可以选择哪种方式)。",
|
||||
"MoveCommitsToNewBranchFromMainPrompt": "这将把所有未推送的提交移动到一个新分支(基于 {{.baseBranchName}})。然后,它会将当前分支硬重置到其上游分支。您要继续吗?",
|
||||
"MoveCommitsToNewBranchMenuPrompt": "这将把所有未推送的提交移动到一个新分支。这个新分支可以从主分支({{.baseBranchName}})创建,也可以堆叠在当前分支之上。您希望选择哪种方式?",
|
||||
"MoveCommitsToNewBranchFromBaseItem": "从基础分支创建新分支 (%s)",
|
||||
"MoveCommitsToNewBranchStackedItem": "堆叠在当前分支上的新分支 (%s)",
|
||||
"CannotMoveCommitsFromDetachedHead": "无法从分离头移动提交",
|
||||
"CannotMoveCommitsNoUpstream": "无法从没有上游分支的分支中移动提交",
|
||||
"CannotMoveCommitsBehindUpstream": "无法移动落后于其上游分支的分支的提交",
|
||||
"CannotMoveCommitsNoUnpushedCommits": "没有未推送的提交可以移动到新分支",
|
||||
"NoBranchesThisRepo": "此仓库中没有分支",
|
||||
"CommitWithoutMessageErr": "您必须编写提交消息才能进行提交",
|
||||
"Close": "关闭",
|
||||
@@ -145,12 +152,11 @@
|
||||
"CannotSquashOrFixupMergeCommit": "无法对合并提交进行压缩或修正",
|
||||
"Fixup": "修正 (fixup)",
|
||||
"FixupTooltip": "将选定的提交合并到其下面的提交中。与压缩类似,但所选提交的消息将被丢弃。",
|
||||
"SureFixupThisCommit": "您确定要“修正”此提交吗?它将合并到下面的提交中",
|
||||
"SureSquashThisCommit": "您确定要将这个提交压缩到下面的提交中吗?",
|
||||
"Squash": "压缩(Squash)",
|
||||
"PickCommitTooltip": "标记选中的提交为 picked(变基过程中)。这意味该提交将在后续的变基中保留。",
|
||||
"Pick": "拣选(Pick)",
|
||||
"Edit": "编辑",
|
||||
"Edit": "编辑(Edit)",
|
||||
"Revert": "撤销(Revert)",
|
||||
"RevertCommitTooltip": "为所选提交创建还原提交,这会反向应用所选提交的更改。",
|
||||
"Reword": "改写提交",
|
||||
@@ -228,8 +234,7 @@
|
||||
"UpdateFailedErr": "更新失败: {{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "当前正在更新中...",
|
||||
"ConfirmQuitDuringUpdate": "当前正在更新中,您确定要退出吗?",
|
||||
"MergeToolTitle": "合并工具",
|
||||
"MergeToolPrompt": "确定要打开 `git mergetool` 吗?",
|
||||
"IntroPopupMessage": "\n感谢使用 lazygit!您真是太棒了。有三件事想与您分享:\n\n 1) 如果您想了解 lazygit 的功能,请观看此视频:\n https://youtu.be/CPLdltN7wgE\n\n 2) 请务必阅读最新的发布说明:\n https://github.com/jesseduffield/lazygit/releases\n\n 3) 如果您在使用 git,那您就是程序员!在您的帮助下,我们可以让\n lazygit 变得更好,所以考虑成为贡献者,加入我们的乐趣吧:\n https://github.com/jesseduffield/lazygit\n 或者仅仅给仓库点个星,分享这份喜爱!\n\n 4) 如果 lazygit 让您的生活更轻松,您可以通过点击\n 右下角的捐赠按钮来表达感谢。捐赠不会获得优先支持,\n 但我们非常感激。\n\n按 {{confirmationKey}} 键开始。\n",
|
||||
"NonReloadableConfigWarningTitle": "配置已更改",
|
||||
"NonReloadableConfigWarning": "以下配置设置已更改,但更改不会立即生效。请退出并重新启动lazygit以使更改生效:\n\n{{configs}}",
|
||||
"GitconfigParseErr": "由于存在未加引号的'\\'字符,因此 Gogit 无法解析您的 gitconfig 文件。删除它们应该可以解决问题。",
|
||||
@@ -243,9 +248,16 @@
|
||||
"RefreshFiles": "刷新文件",
|
||||
"FocusMainView": "聚焦主视图",
|
||||
"Merge": "合并到当前检出的分支",
|
||||
"MergeBranchTooltip": "Merge selected branch into currently checked out branch.",
|
||||
"MergeBranchTooltip": "查看将选中项合并到当前分支的选项(正常合并,压缩合并)",
|
||||
"RegularMergeFastForward": "常规合并(快进)",
|
||||
"RegularMergeFastForwardTooltip": "将 '{{.checkedOutBranch}}' 快进到 '{{.selectedBranch}}',不创建合并提交。",
|
||||
"CannotFastForwardMerge": "无法将 '{{.checkedOutBranch}}' 快进到 '{{.selectedBranch}}'",
|
||||
"RegularMergeNonFastForward": "常规合并(带合并提交)",
|
||||
"RegularMergeNonFastForwardTooltip": "将 '{{.selectedBranch}}' 合并到 '{{.checkedOutBranch}}',创建一个合并提交。",
|
||||
"SquashMergeUncommitted": "压缩合并并保持未提交状态",
|
||||
"SquashMergeUncommittedTooltip": "将 '{{.selectedBranch}}' 压缩合并到工作树中。",
|
||||
"SquashMergeCommitted": "压缩合并,然后提交",
|
||||
"SquashMergeCommittedTooltip": "将 '{{.selectedBranch}}' 压缩合并到 '{{.checkedOutBranch}}' 作为一次提交。",
|
||||
"ConfirmQuit": "您确定要退出吗?",
|
||||
"SwitchRepo": "切换到最近的仓库",
|
||||
"AllBranchesLogGraph": "显示/循环所有分支日志",
|
||||
@@ -265,6 +277,10 @@
|
||||
"DiscardSelection": "取消变更(git reset)",
|
||||
"DiscardSelectionTooltip": "当选择未暂存的变更时,使用git reset丢弃该变更。当选择已暂存的变更时,取消暂存该变更",
|
||||
"ToggleSelectHunk": "切换代码块选择",
|
||||
"SelectHunk": "选择代码块",
|
||||
"SelectLineByLine": "逐行选择",
|
||||
"ToggleSelectHunkTooltip": "切换逐行选择与代码块选择模式。",
|
||||
"HunkStagingHint": "代码块选择模式现在是暂存区的默认模式。如果您想暂存单行,请按 '%s' 切换到逐行模式。\n\n如果您希望默认使用逐行模式(像早期 lazygit 版本那样),请将\n\ngui:\n useHunkModeInStagingView: false\n\n添加到您的 lazygit 配置中。",
|
||||
"ToggleSelectionForPatch": "添加/移除 行到补丁",
|
||||
"EditHunk": "编辑代码块",
|
||||
"EditHunkTooltip": "在外部编辑器中编辑选中的代码块",
|
||||
@@ -283,16 +299,20 @@
|
||||
"ViewMergeRebaseOptionsTooltip": "查看当前合并或变基的中止、继续、跳过选项",
|
||||
"ViewMergeOptions": "查看合并选项",
|
||||
"ViewRebaseOptions": "查看变基选项",
|
||||
"ViewCherryPickOptions": "查看拣选选项",
|
||||
"ViewRevertOptions": "查看撤销选项",
|
||||
"NotMergingOrRebasing": "您目前既不进行变基也不进行合并",
|
||||
"AlreadyRebasing": "在变基时无法执行此操作",
|
||||
"RecentRepos": "最近的仓库",
|
||||
"MergeOptionsTitle": "合并选项",
|
||||
"RebaseOptionsTitle": "变基选项",
|
||||
"CherryPickOptionsTitle": "拣选选项",
|
||||
"RevertOptionsTitle": "撤销选项",
|
||||
"CommitSummaryTitle": "提交信息",
|
||||
"CommitDescriptionTitle": "提交信息说明",
|
||||
"CommitDescriptionSubTitle": "按 {{.togglePanelKeyBinding}} 键切换焦点, {{.commitMenuKeybinding}} 打开菜单",
|
||||
"CommitDescriptionFooter": "按 {{.confirmInEditorKeybinding}} 提交",
|
||||
"CommitDescriptionFooterTwoBindings": "按 {{.confirmInEditorKeybinding1}} 或 {{.confirmInEditorKeybinding2}} 提交",
|
||||
"CommitHooksDisabledSubTitle": "(钩子已禁用)",
|
||||
"LocalBranchesTitle": "本地分支",
|
||||
"SearchTitle": "搜索",
|
||||
@@ -304,7 +324,8 @@
|
||||
"PatchBuildingTitle": "构建补丁中",
|
||||
"InformationTitle": "信息",
|
||||
"SecondaryTitle": "次要",
|
||||
"ReflogCommitsTitle": "Reflog",
|
||||
"ReflogCommitsTitle": "引用日志",
|
||||
"ConflictsResolved": "所有合并冲突已解决。继续 %s 吗?",
|
||||
"Continue": "继续",
|
||||
"UnstagedFilesAfterConflictsResolved": "冲突解决后文件已被修改。是否自动暂存并继续?",
|
||||
"RebasingTitle": "变基 '{{.checkedOutBranch}}'",
|
||||
@@ -321,10 +342,15 @@
|
||||
"PullRequestNoUpstream": "没有设置上游的分支无法执行拉取请求",
|
||||
"ErrorOccurred": "发生错误!请在以下位置创建 issue",
|
||||
"ConflictLabel": "冲突",
|
||||
"PendingRebaseTodosSectionHeader": "待处理变基任务",
|
||||
"PendingCherryPicksSectionHeader": "待处理拣选",
|
||||
"PendingRevertsSectionHeader": "待处理还原",
|
||||
"CommitsSectionHeader": "提交",
|
||||
"YouDied": "您死了!",
|
||||
"RewordNotSupported": "当前不支持交互式重新基准化时的重新措词提交",
|
||||
"ChangingThisActionIsNotAllowed": "不允许更改这类变基待办项目",
|
||||
"NotAllowedMidCherryPickOrRevert": "在拣选或还原过程中不允许此操作",
|
||||
"PickIsOnlyAllowedDuringRebase": "此操作仅在变基过程中允许",
|
||||
"DroppingMergeRequiresSingleSelection": "删除合并提交需要单个选中项",
|
||||
"CherryPickCopy": "复制提交(拣选)",
|
||||
"CherryPickCopyTooltip": "标记提交为已复制。然后,在本地提交视图中,您可以按 `{{.paste}}` (Cherry-Pick) 将已复制的提交粘贴到已检出的分支中。任何时候都可以按 `{{.escape}}` 来取消选择。",
|
||||
@@ -344,6 +370,8 @@
|
||||
"ScrollUp": "向上滚动",
|
||||
"ScrollUpMainWindow": "向上滚动主面板",
|
||||
"ScrollDownMainWindow": "向下滚动主面板",
|
||||
"SuspendApp": "挂起应用程序",
|
||||
"CannotSuspendApp": "Windows 不支持挂起应用程序",
|
||||
"AmendCommitTitle": "修补(amend)提交",
|
||||
"AmendCommitPrompt": "您确定要使用暂存文件来修补此提交吗?",
|
||||
"AmendCommitWithConflictsMenuPrompt": "警告:您即将使用已解决的冲突来修正上一个已完成的提交。此时这样做很可能并非您所期望的。更可能的情况是,您只是想继续执行变基操作。\n\n您仍然想要修正前一个提交吗?",
|
||||
@@ -365,6 +393,8 @@
|
||||
"MergingStatus": "合并中...",
|
||||
"LowercaseRebasingStatus": "变基中...",
|
||||
"LowercaseMergingStatus": "合并中...",
|
||||
"LowercaseCherryPickingStatus": "拣选中",
|
||||
"LowercaseRevertingStatus": "还原中",
|
||||
"AmendingStatus": "正在修补",
|
||||
"CherryPickingStatus": "正在拣选",
|
||||
"UndoingStatus": "正在撤销",
|
||||
@@ -374,6 +404,7 @@
|
||||
"RewordingStatus": "修改提交信息",
|
||||
"RevertingStatus": "还原中...",
|
||||
"CreatingFixupCommitStatus": "正在创建一个修复提交",
|
||||
"MovingCommitsToNewBranchStatus": "正在将提交移动到新分支",
|
||||
"CommitFiles": "提交文件",
|
||||
"SubCommitsDynamicTitle": "提交 (%s)",
|
||||
"CommitFilesDynamicTitle": "比较文件差异 (%s)",
|
||||
@@ -381,18 +412,26 @@
|
||||
"ViewItemFiles": "查看提交的文件",
|
||||
"CommitFilesTitle": "提交文件",
|
||||
"CheckoutCommitFileTooltip": "检出文件",
|
||||
"CannotCheckoutWithModifiedFilesErr": "您已有对您试图签出的文件作出的本地修改。您需要先保存或丢弃这些文件。",
|
||||
"CanOnlyDiscardFromLocalCommits": "只能从本地提交中丢弃更改",
|
||||
"Remove": "删除",
|
||||
"DiscardOldFileChangeTooltip": "放弃对此文件的提交变更",
|
||||
"DiscardFileChangesTitle": "放弃文件变更",
|
||||
"DiscardFileChangesPrompt": "您确定要舍弃此提交对该文件的变更吗?如果此文件是在此提交中创建的,它将被删除",
|
||||
"DisabledForGPG": "使用GPG的用户无法使用此功能。\n\n如果您正在使用密码代理(如gpg-agent)以避免每次签名时输入密码,可以通过在lazygit配置文件中添加\n\ngit:\n overrideGpg: true\n\n来启用此功能。",
|
||||
"CreateRepo": "不在 git 仓库中。创建一个新的 git 仓库吗?(y/N): ",
|
||||
"BareRepo": "您已经尝试在空仓库中打开Lazygit,但是Lazygit还不支持空仓库。打开最近的仓库吗?(y / n) ",
|
||||
"InitialBranch": "分支名称? (git的默认值为空): ",
|
||||
"NoRecentRepositories": "必须在git存储库中打开lazygit。没有有效的最近存储库。即将退出...",
|
||||
"IncorrectNotARepository": "'notARepository'的值不正确。它应该是“prompt”,“create”,“skip”或“quit”中的一个。",
|
||||
"AutoStashTitle": "自动存储?",
|
||||
"AutoStashPrompt": "您必须隐藏并弹出变更以使变更生效。自动执行?(enter/esc)",
|
||||
"AutoStashForUndo": "正在自动储藏更改以便撤销到 %s",
|
||||
"AutoStashForCheckout": "正在自动储藏更改以便检出 %s",
|
||||
"AutoStashForNewBranch": "正在自动储藏更改以便创建新分支 %s",
|
||||
"AutoStashForMovingPatchToIndex": "正在自动储藏更改以便将自定义补丁从 %s 移动到暂存区",
|
||||
"AutoStashForCherryPicking": "正在自动储藏更改以便拣选提交",
|
||||
"AutoStashForReverting": "正在自动储藏更改以便还原提交",
|
||||
"Discard": "查看'放弃变更'选项",
|
||||
"DiscardChangesTitle": "放弃变更",
|
||||
"DiscardFileChangesTooltip": "查看选中文件的放弃变更选项",
|
||||
@@ -435,6 +474,7 @@
|
||||
"ResetSoftTooltip": "将 HEAD 重置为所选提交,并将当前提交和所选提交之间的更改保留为已暂存更改。",
|
||||
"ResetMixedTooltip": "将 HEAD 重置为所选提交,并将当前提交和所选提交之间的更改保留为未暂存的更改。",
|
||||
"ResetHardTooltip": "将 HEAD 重置为所选提交,并丢弃当前提交和所选提交之间的所有更改,以及工作树中的所有当前修改。",
|
||||
"ResetHardConfirmation": "您确定要执行硬重置吗?这将丢弃所有未提交的更改(包括已暂存和未暂存的),且无法撤销。",
|
||||
"PressEnterToReturn": "按下 Enter 键返回 lazygit",
|
||||
"ViewStashOptions": "查看贮藏选项",
|
||||
"ViewStashOptionsTooltip": "查看贮藏选项(例如:贮藏所有、贮藏已暂存变更、贮藏未暂存变更)",
|
||||
@@ -442,7 +482,7 @@
|
||||
"StashTooltip": "贮藏所有变更.若要使用其他贮藏变体,请使用查看贮藏选项快捷键",
|
||||
"StashAllChanges": "将所有变更加入贮藏",
|
||||
"StashStagedChanges": "贮藏已暂存变更",
|
||||
"StashAllChangesKeepIndex": "将已暂存的变更加入贮藏",
|
||||
"StashAllChangesKeepIndex": "贮藏所有更改并保留暂存区",
|
||||
"StashUnstagedChanges": "贮藏未暂存变更",
|
||||
"StashIncludeUntrackedChanges": "贮藏所有变更,包括未跟踪的文件",
|
||||
"StashOptions": "贮藏选项",
|
||||
@@ -465,11 +505,17 @@
|
||||
"EnterCommitFile": "输入文件以将所选行添加到补丁中(或切换目录折叠)",
|
||||
"EnterCommitFileTooltip": "如果已选择一个文件,则Enter进入该文件,以便您可以向自定义补丁添加/删除单独的行。如果选择了目录,则切换目录。",
|
||||
"ExitCustomPatchBuilder": "退出逐行模式",
|
||||
"ExitFocusedMainView": "退出回到侧边面板",
|
||||
"EnterUpstream": "以这种格式输入上游:'<远程仓库> <分支名称>'",
|
||||
"InvalidUpstream": "上游格式无效,格式应当为:'<remote> <branchname>'",
|
||||
"NewRemote": "添加新的远程仓库",
|
||||
"NewRemoteName": "新远程仓库名称:",
|
||||
"NewRemoteUrl": "新远程仓库 URL:",
|
||||
"AddForkRemote": "添加复刻远程仓库",
|
||||
"AddForkRemoteUsername": "复刻所有者(用户名/组织)。使用 用户名:分支 来检出分支",
|
||||
"AddForkRemoteTooltip": "通过替换 origin URL 中的所有者来快速添加复刻远程仓库,并可选择从新远程仓库检出分支。",
|
||||
"IncompatibleForkAlreadyExistsError": "远程仓库 {{.remoteName}} 已存在且 URL 不同",
|
||||
"NoOriginRemote": "此操作需要 'origin' 远程仓库",
|
||||
"ViewBranches": "查看分支",
|
||||
"EditRemoteName": "输入远程仓库 {{.remoteName}} 的新名称:",
|
||||
"EditRemoteUrl": "输入远程仓库 {{.remoteName}} 的新 URL:",
|
||||
@@ -533,6 +579,9 @@
|
||||
"ViewResetToUpstreamOptions": "查看上游重置选项",
|
||||
"NextScreenMode": "下一屏模式(正常/半屏/全屏)",
|
||||
"PrevScreenMode": "上一屏模式",
|
||||
"CyclePagers": "切换分页器",
|
||||
"CyclePagersTooltip": "从已配置的分页器列表中选择下一个分页器",
|
||||
"CyclePagersDisabledReason": "未配置其他分页器",
|
||||
"StartSearch": "开始搜索",
|
||||
"StartFilter": "通过文本过滤当前视图",
|
||||
"Keybindings": "按键绑定",
|
||||
@@ -551,6 +600,7 @@
|
||||
"RenameBranchWarning": "该分支正在跟踪远程仓库。此操作将仅会重命名本地分支名称,而不会重命名远程分支的名称。确定继续?",
|
||||
"OpenKeybindingsMenu": "打开菜单",
|
||||
"ResetCherryPick": "重置已拣选(复制)的提交",
|
||||
"ResetCherryPickShort": "重置已复制的提交",
|
||||
"NextTab": "下一个标签",
|
||||
"PrevTab": "上一个标签",
|
||||
"CantUndoWhileRebasing": "进行基础调整时无法撤消",
|
||||
@@ -558,6 +608,8 @@
|
||||
"MustStashWarning": "将补丁拉出到索引中需要存储和取消存储所做的变更。如果出现问题,您将可以从存储中访问文件。继续?",
|
||||
"MustStashTitle": "必须保存进度",
|
||||
"ConfirmationTitle": "确认面板",
|
||||
"PromptTitle": "输入提示",
|
||||
"PromptInputCannotBeEmptyToast": "不允许输入为空",
|
||||
"PrevPage": "上一页",
|
||||
"NextPage": "下一页",
|
||||
"GotoTop": "滚动到顶部",
|
||||
@@ -584,6 +636,7 @@
|
||||
"SwapDiff": "反向 diff",
|
||||
"ViewDiffingOptions": "打开 diff 菜单",
|
||||
"ViewDiffingOptionsTooltip": "查看与比较两个引用相关的选项,例如与选定的 ref 进行比较,输入要比较的 ref,然后反转比较方向。",
|
||||
"CancelDiffingMode": "取消差异比较模式",
|
||||
"OpenCommandLogMenu": "打开命令日志菜单",
|
||||
"OpenCommandLogMenuTooltip": "查看命令日志的选项,例如显示/隐藏命令日志以及聚焦命令日志",
|
||||
"ShowingGitDiff": "显示输出:",
|
||||
@@ -616,10 +669,12 @@
|
||||
"CreateNewBranchFromCommit": "从提交创建新分支",
|
||||
"BuildingPatch": "正在构建补丁",
|
||||
"ViewCommits": "查看提交",
|
||||
"MinGitVersionError": "Git 版本必须至少为 %s。请升级您的 Git 版本。",
|
||||
"RunningCustomCommandStatus": "正在运行自定义命令",
|
||||
"SubmoduleStashAndReset": "存放未提交的子模块变更和更新",
|
||||
"AndResetSubmodules": "和重置子模块",
|
||||
"EnterSubmoduleTooltip": "输入子模块",
|
||||
"BackToParentRepo": "返回父仓库",
|
||||
"Enter": "进入",
|
||||
"CopySubmoduleNameToClipboard": "复制子模块名称到剪贴板",
|
||||
"RemoveSubmodule": "删除子模块",
|
||||
@@ -648,6 +703,7 @@
|
||||
"BulkSubmoduleOptions": "批量子模块选项",
|
||||
"RunningCommand": "运行命令",
|
||||
"SubCommitsTitle": "子提交",
|
||||
"ExitSubview": "退出子视图",
|
||||
"SubmodulesTitle": "子模块",
|
||||
"NavigationTitle": "列表面板导航",
|
||||
"SuggestionsCheatsheetTitle": "意见建议",
|
||||
@@ -665,6 +721,7 @@
|
||||
"CommitHasNoTags": "提交没有标签",
|
||||
"CommitHasNoMessageBody": "提交没有信息正文",
|
||||
"PatchCopiedToClipboard": "补丁已复制到剪贴板",
|
||||
"MessageCopiedToClipboard": "消息已复制到剪贴板",
|
||||
"CopiedToClipboard": "已复制到剪贴板",
|
||||
"ErrCannotEditDirectory": "无法编辑目录:您只能编辑单个文件",
|
||||
"ErrCannotCopyContentOfDirectory": "无法复制目录内容:只能复制单个文件的内容",
|
||||
@@ -677,13 +734,18 @@
|
||||
"CommandLogHeader": "您可以通过按 '%s' 隐藏或集中显示该面板,或使用 `gui.showCommandLog: false`\n将其永久隐藏在您的配置中",
|
||||
"RandomTip": "随机小提示",
|
||||
"ToggleWhitespaceInDiffView": "切换是否在差异视图中显示空白字符差异",
|
||||
"ToggleWhitespaceInDiffViewTooltip": "切换是否在差异视图中显示空白字符更改。\n\n默认值可在配置文件中通过键 'git.ignoreWhitespaceInDiffView' 更改。",
|
||||
"IgnoreWhitespaceDiffViewSubTitle": "(忽略空白)",
|
||||
"IgnoreWhitespaceNotSupportedHere": "该视图不支持忽略空白",
|
||||
"IncreaseContextInDiffView": "扩大差异视图中显示的上下文范围",
|
||||
"IncreaseContextInDiffViewTooltip": "增加差异视图中变更周围显示的上下文量。\n\n默认值可在配置文件中通过键 'git.diffContextSize' 更改。",
|
||||
"DecreaseContextInDiffView": "缩小差异视图中显示的上下文范围",
|
||||
"DecreaseContextInDiffViewTooltip": "减少差异视图中变更周围显示的上下文量。\n\n默认值可在配置文件中通过键 'git.diffContextSize' 更改。",
|
||||
"DiffContextSizeChanged": "将diff上下文大小更改为%d",
|
||||
"IncreaseRenameSimilarityThreshold": "提高重命名相似度阈值",
|
||||
"IncreaseRenameSimilarityThresholdTooltip": "提高将删除和添加对视为重命名所需的相似度阈值。\n\n默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。",
|
||||
"DecreaseRenameSimilarityThreshold": "降低重命名相似度阈值",
|
||||
"DecreaseRenameSimilarityThresholdTooltip": "降低将删除和添加对视为重命名所需的相似度阈值。\n\n默认值可在配置文件中通过键 'git.renameSimilarityThreshold' 更改。",
|
||||
"RenameSimilarityThresholdChanged": "已重命名相似度阈值更改为 %d%%",
|
||||
"CreatePullRequestOptions": "创建拉取请求选项",
|
||||
"DefaultBranch": "默认分支",
|
||||
@@ -705,16 +767,21 @@
|
||||
"LogMenuTitle": "提交日志选项",
|
||||
"ToggleShowGitGraphAll": "切换显示完整 git 分支图(向 `git log` 命令传入 `--all` 选项)",
|
||||
"ShowGitGraph": "显示 git 分支图",
|
||||
"ShowGitGraphTooltip": "在提交日志中显示或隐藏 Git 图形。\n\n默认值可在配置文件中通过键 'git.log.showGraph' 更改。",
|
||||
"SortOrder": "排序",
|
||||
"SortOrderPromptLocalBranches": "本地分支的默认排序顺序可在配置文件中通过键 'git.localBranchSortOrder' 设置。",
|
||||
"SortOrderPromptRemoteBranches": "远程分支的默认排序顺序可在配置文件中通过键 'git.remoteBranchSortOrder' 设置。",
|
||||
"SortAlphabetical": "字母顺序",
|
||||
"SortByDate": "日期大小",
|
||||
"SortByRecency": "新旧程度",
|
||||
"SortBasedOnReflog": "(基于reflog)",
|
||||
"SortCommits": "提交排序",
|
||||
"SortCommitsTooltip": "更改提交日志中提交的排序顺序。\n\n默认值可在配置文件中通过键 'git.log.sortOrder' 更改。",
|
||||
"CantChangeContextSizeError": "无法在补丁构建模式下变更上下文,因为我们在发布该功能时懒得支持它。 如果您真的想要这么做,请告诉我们!",
|
||||
"OpenCommitInBrowser": "在浏览器中打开提交",
|
||||
"ViewBisectOptions": "查看二分查找选项",
|
||||
"ConfirmRevertCommit": "您确定要恢复{{.selectedCommit}}?",
|
||||
"ConfirmRevertCommitRange": "确定要还原选定的提交吗?",
|
||||
"RewordInEditorTitle": "在编辑器中重写",
|
||||
"RewordInEditorPrompt": "您确定要在编辑器中重写此提交吗?",
|
||||
"CheckoutAutostashPrompt": "确定要检出 '%s' 吗?必要时将自动储藏更改。",
|
||||
@@ -722,8 +789,9 @@
|
||||
"SoftResetPrompt": "您确定要软重置到 '%s' 吗?",
|
||||
"UpstreamGone": "(上游不存在)",
|
||||
"NukeDescription": "如果您想让工作树中的所有更改消失,可以这样做。如果存在受污染的子模块更改,这会将这些更改贮藏在子模块中。",
|
||||
"NukeTreeConfirmation": "确定要清空工作树吗?这将丢弃工作树中的所有更改(已暂存、未暂存和未跟踪的),此操作不可撤销。",
|
||||
"DiscardStagedChangesDescription": "这将创建一个仅包含已暂存更改的新贮藏条目,然后这些更改删除,以便工作树仅保留未暂存的更改。",
|
||||
"EmptyOutput": "<Empty output>",
|
||||
"EmptyOutput": "<空输出>",
|
||||
"Patch": "补丁",
|
||||
"CustomPatch": "自定义补丁",
|
||||
"CommitsCopied": "已复制这些提交",
|
||||
@@ -738,15 +806,21 @@
|
||||
"RemovePatchFromOriginalCommitTooltip": "从这些提交中删除该补丁。这是通过在提交时启动交互式变基,反向应用补丁,然后继续变基来实现的。如果之后的提交依赖于补丁,您可能需要解决冲突。",
|
||||
"MovePatchOutIntoIndex": "将补丁移出到索引中",
|
||||
"MovePatchOutIntoIndexTooltip": "将补丁从提交中移出并移入到索引中。这是通过在提交时启动交互式变基、反向应用补丁、继续变基直至完成,然后将补丁应用到索引来实现的。如果之后的提交依赖于补丁,您可能需要解决冲突。",
|
||||
"MovePatchIntoNewCommit": "将补丁移动到原始提交之后的新提交中",
|
||||
"MovePatchIntoNewCommitTooltip": "将补丁从提交中移出并移至位于原始提交之上的新提交中。这是通过在原始提交处启动交互式变基,反向应用补丁,然后将补丁应用到索引并将其作为新提交提交,然后继续变基直至完成来实现的。如果以后的提交依赖于补丁,您可能需要解决冲突。",
|
||||
"MovePatchIntoNewCommitBefore": "将补丁移动到原始提交之前的新提交中",
|
||||
"MovePatchIntoNewCommitBeforeTooltip": "将补丁从其提交中移出,并放入原始提交之前的新提交中。当自定义补丁仅包含整个代码块甚至整个文件时效果最佳;如果包含部分代码块,则很可能出现冲突。",
|
||||
"MovePatchToSelectedCommit": "移动补丁到所选提交 (%s)",
|
||||
"MovePatchToSelectedCommitTooltip": "将补丁从其原始提交修改到选定的提交中。 实现这一点的方法是在原始提交时启动交互式重置,反向应用补丁, 然后在应用补丁和修改选定的提交之前,继续将其重新建立到选定的提交上。 重置将继续完成。如果源代码和目标代码提交之间的提交取决于补丁,您可能需要解决冲突。",
|
||||
"CopyPatchToClipboard": "复制补丁到剪贴板",
|
||||
"MustStageFilesAffectedByPatchTitle": "必须暂存文件",
|
||||
"MustStageFilesAffectedByPatchWarning": "将补丁应用到索引需要暂存受补丁影响的未暂存文件。请注意,应用补丁时可能会出现冲突。继续吗?",
|
||||
"NoMatchesFor": "%s %s 没有匹配项",
|
||||
"MatchesFor": "正在匹配'%s' (%d of %d) %s",
|
||||
"SearchKeybindings": "%s: 下一个匹配项, %s: 上一个匹配项, %s: 退出搜索模式",
|
||||
"SearchPrefix": "搜索: ",
|
||||
"FilterPrefix": "过滤: ",
|
||||
"FilterPrefixMenu": "筛选(在筛选快捷键前添加 '@'):",
|
||||
"ExitSearchMode": "%s:退出搜索模式",
|
||||
"ExitTextFilterMode": "%s:退出过滤模式",
|
||||
"Switch": "切换",
|
||||
@@ -764,6 +838,7 @@
|
||||
"WorktreesTitle": "工作区",
|
||||
"WorktreeTitle": "工作区",
|
||||
"RemoveWorktreePrompt": "您确定要删除工作树 {{.worktreeName}}' ?",
|
||||
"ForceRemoveWorktreePrompt": "'{{.worktreeName}}' 包含已修改或未跟踪的文件,或子模块(或包含所有这些)。确定要移除它吗?",
|
||||
"RemovingWorktree": "正在删除工作树",
|
||||
"AddingWorktree": "添加工作区",
|
||||
"CantDeleteCurrentWorktree": "您不能删除当前的工作树!",
|
||||
@@ -789,6 +864,7 @@
|
||||
"MarkedBaseCommitStatus": "已标记一个主提交用于变基",
|
||||
"MarkAsBaseCommit": "标记一个主提交用于变基",
|
||||
"MarkAsBaseCommitTooltip": "选择下一次变基的主提交。当您变基到一个分支时,只有高于主提交的提交才会被引入。这使用“git rebase --onto”命令。",
|
||||
"CancelMarkedBaseCommit": "取消标记的基础提交",
|
||||
"MarkedCommitMarker": "↑↑↑ 将从这里开始变基 ↑↑↑",
|
||||
"FailedToOpenURL": "打开URL %s 失败。\n\n错误:%v",
|
||||
"InvalidLazygitEditURL": "无效的lazygit-edit URL格式:%s",
|
||||
@@ -798,6 +874,7 @@
|
||||
"QuickStartInteractiveRebaseTooltip": "为分支上的提交启动交互式变基。这将包括从 HEAD 提交到第一个合并提交或主分支提交的所有提交。\n如果您想从所选提交启动交互式变基,请按 `{{.editKey}}`。",
|
||||
"CannotQuickStartInteractiveRebase": "无法启动交互式变基:HEAD 提交是合并提交或存在于主分支上,因此没有适当的主提交来启动变基。您可以通过选择提交并按 `{{.editKey}}` 从特定提交启动交互式变基。",
|
||||
"ToggleRangeSelect": "切换拖动选择",
|
||||
"DismissRangeSelect": "取消范围选择",
|
||||
"RangeSelectUp": "向上扩展选择范围",
|
||||
"RangeSelectDown": "向下扩展选择范围",
|
||||
"RangeSelectNotSupported": "该操作不支持范围选择,请选择单个项目",
|
||||
@@ -805,7 +882,6 @@
|
||||
"SelectedItemIsNotABranch": "选中的条目不是一个分支",
|
||||
"SelectedItemDoesNotHaveFiles": "选中的条目中没有",
|
||||
"MultiSelectNotSupportedForSubmodules": "子模块不支持多选操作",
|
||||
"OldCherryPickKeyWarning": "The 'c' key is no longer the default key for copying commits to cherry pick. Please use `{{.copy}}` instead (and `{{.paste}}` to paste). The reason for this change is that the 'v' key for selecting a range of lines when staging is now also used for selecting a range of lines in any list view, meaning that we needed to find a new key for pasting commits, and if we're going to now use `{{.paste}}` for pasting commits, we may as well use `{{.copy}}` for copying them. If you want to configure the keybindings to get the old behaviour, set the following in your config:\n\nkeybinding:\n universal:\n toggleRangeSelect: <something other than v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'",
|
||||
"CommandDoesNotSupportOpeningInEditor": "该命令不支持切换到编辑器",
|
||||
"CustomCommands": "自定义命令",
|
||||
"NoApplicableCommandsInThisContext": "(当前上下文无可用命令)",
|
||||
@@ -825,6 +901,7 @@
|
||||
"RenameBranch": "重命名分支",
|
||||
"CreateBranch": "建立分支",
|
||||
"FastForwardBranch": "快进分支",
|
||||
"AutoForwardBranches": "自动前推分支",
|
||||
"CherryPick": "(拣选) 粘贴提交",
|
||||
"CheckoutFile": "检出文件",
|
||||
"SquashCommitDown": "向下压缩提交",
|
||||
@@ -863,6 +940,7 @@
|
||||
"ResolveConflictByDeletingFile": "通过删除文件解决冲突",
|
||||
"NotEnoughContextToStage": "差异上下文大小为0时无法暂存或取消暂存更改。请使用'%s'增大上下文。",
|
||||
"NotEnoughContextToDiscard": "差异上下文大小为0时无法丢弃更改。请使用'%s'增大上下文。",
|
||||
"NotEnoughContextForCustomPatch": "在差异上下文大小为 0 时无法创建自定义补丁。请使用 '%s' 增加上下文。",
|
||||
"IgnoreExcludeFile": "忽略文件",
|
||||
"IgnoreFileErr": "无法忽略 .gitignore",
|
||||
"ExcludeFile": "排除文件",
|
||||
@@ -872,7 +950,7 @@
|
||||
"Pull": "拉取(Pull)",
|
||||
"OpenFile": "打开文件",
|
||||
"StashAllChanges": "贮藏所有变更",
|
||||
"StashAllChangesKeepIndex": "贮藏所有更改并保持索引",
|
||||
"StashAllChangesKeepIndex": "贮藏所有更改并保留暂存区",
|
||||
"StashStagedChanges": "贮藏暂存的变更",
|
||||
"StashUnstagedChanges": "贮藏所有未暂存更改",
|
||||
"StashIncludeUntrackedChanges": "贮藏所有更改包括未跟踪的文件",
|
||||
@@ -887,10 +965,14 @@
|
||||
"DeleteRemoteBranch": "删除远程分支",
|
||||
"SetBranchUpstream": "设置分支上游",
|
||||
"AddRemote": "添加远程",
|
||||
"AddForkRemote": "添加复刻远程仓库",
|
||||
"RemoveRemote": "移除远程",
|
||||
"UpdateRemote": "更新远程",
|
||||
"ApplyPatch": "应用补丁",
|
||||
"Stash": "贮藏(Stash)",
|
||||
"PopStash": "弹出贮藏",
|
||||
"ApplyStash": "应用贮藏",
|
||||
"DropStash": "删除贮藏",
|
||||
"RenameStash": "重命名贮藏",
|
||||
"RemoveSubmodule": "删除子模块",
|
||||
"ResetSubmodule": "重置子模块",
|
||||
@@ -958,6 +1040,17 @@
|
||||
"BreakingChangesByVersion": {
|
||||
"0.41.0": "- 当您按“g”调出 git 重置菜单时,“mixed”选项现在是第一个也是默认选项,而不是“soft”。这是因为“mixed”是最常用的选项。\n- 提交消息面板现在默认自动硬换行(即,当您到达页边距时,它会添加换行符)。您可以像这样调整配置:\n\ngit:\n commit:\n autoWrapCommitMessage: true\n autoWrapWidth: 72\n\n- “v”键已在暂存视图中用于启动范围选择,但现在您可以使用它在任何视图中启动范围选择。不幸的是,这与粘贴提交(cherry-pick)的“v”键绑定冲突,因此现在粘贴提交是通过“shift+V”完成的,为了一致性,复制提交现在是通过“shift+C”而不是“c”。请注意,“v”键绑定只是启动范围选择的一种方法:您可以使用 shift+向上/向下箭头。因此,如果您想配置cherry-pick键绑定以获得旧行为,请在配置中设置以下内容:\n\nkeybinding:\n universal:\n toggleRangeSelect: <something other than v>\n commits:\n cherryPickCopy: 'c'\n pasteCommits: 'v'\n\n- 使用“shift-S”压缩修复现在会弹出一个菜单,默认选项是压缩分支中的所有修复提交。仅压缩所选提交之上的修复提交的原始行为仍然可以作为该菜单中的第二个选项使用。\n- Push/pull/fetch 加载状态现在显示在分支上,而不是在弹出窗口中。这允许您例如并行获取多个分支并查看每个分支的状态。\n- 提交视图中的 git 日志图现在始终默认显示(以前仅在视图最大化时显示)。如果您发现这太冗余了,您可以通过 ctrl+L -> 'Show git graph' -> 'when maximized' 将其改回来\n- 在远程分支上按空格用于显示输入新本地分支名称的提示,以从远程分支检出。现在它只是直接检查远程分支,让您在同名的新本地分支或分离的头之间进行选择。旧的行为仍然可以通过“n”键绑定使用。\n- 默认情况下,过滤(例如按“/”时)不太模糊;它现在只匹配子字符串。多个子字符串可以通过用空格分隔来匹配。如果您想恢复到旧的行为,请在配置中设置以下内容:\n\ngui:\n filterMode: 'fuzzy'\n\t ",
|
||||
"0.44.0": "- gui.branchColors 配置选项已弃用;其将在未来的版本中被移除。请使用 gui.branchColorPatterns 代替。\n- 以 \"feature/\",\"bugfix/\" 和 \"hotfix/\" 开头的分支自动上色已移除;如果您想要保留该功能,可以通过设置新的 gui.branchColorPatterns 选项来启用。",
|
||||
"0.49.0": "- 执行shell命令(带':'提示符)不再使用交互式shell。如需在提示符中使用shell别名,需进行额外配置。详见:https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands"
|
||||
}
|
||||
"0.49.0": "- 执行shell命令(带':'提示符)不再使用交互式shell。如需在提示符中使用shell别名,需进行额外配置。详见:https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#using-aliases-or-functions-in-shell-commands",
|
||||
"0.50.0": "- 拉取后,如果主分支落后于其上游分支,现在会自动前推。这对于自动保持主分支或 master 分支最新很有用。如果不希望这样,可以通过在配置中设置以下内容来禁用它:\n\ngit:\n autoForwardBranches: none\n\n相反,如果希望功能分支也这样做,可以将其设置为 'allBranches'。",
|
||||
"0.51.0": "- 自定义命令的 'subprocess'、'stream' 和 'showOutput' 字段已被替换为单个 'output' 字段。这应该是透明的,如果您在配置文件中使用了这些字段,它们应该已自动更新。但有一个显著变化:'stream' 字段过去意味着命令输出将流式传输到命令日志,并且命令将在伪终端 (pty) 中运行。我们将其转换为 'output: log',这意味着命令输出将流式传输到命令日志,但不使用 pty,假设这是大多数人想要的。如果您确实希望在 pty 中运行命令,可以将其更改为 'output: logWithPty'。",
|
||||
"0.54.0": "- 本地和远程分支的默认排序顺序已更改:过去本地分支是 'recency'(基于 reflog),远程分支是 'alphabetical'。这两者都已更改为 'date'(即提交者日期)。如果您更喜欢旧的默认设置,可以通过以下配置恢复:\n\ngit:\n localBranchSortOrder: recency\n remoteBranchSortOrder: alphabetical\n\n- 暂存区和自定义补丁构建视图中的默认选择模式已更改为块模式。在大多数情况下,这是更有用的模式,因为它通常可以节省大量按键。如果想切换回旧的行模式默认设置,可以通过在配置中添加以下内容来实现:\n\ngui:\n useHunkModeInStagingView: false\n",
|
||||
"0.55.0": "- 原先绑定到 ctrl-z 的 'redo' 命令,现在改为绑定到 shift-Z。这是因为 ctrl-z 现在用于挂起应用程序;在 Linux 世界中,这是该功能的常用键绑定。如果你想恢复此更改,可以在配置中添加以下内容:\n\nkeybinding:\n universal:\n suspendApp: <disabled>\n\tredo: <c-z>\n\n- 'git.paging.useConfig' 选项已被移除。如果你之前依赖它来配置你的分页器,现在必须使用 'git.paging.pager' 选项重新明确设置分页器。"
|
||||
},
|
||||
"ViewMergeConflictOptions": "查看合并冲突选项",
|
||||
"ViewMergeConflictOptionsTooltip": "查看用于解决合并冲突的选项。",
|
||||
"NoFilesWithMergeConflicts": "没有存在合并冲突的文件。",
|
||||
"MergeConflictOptionsTitle": "解决合并冲突",
|
||||
"UseCurrentChanges": "使用当前更改",
|
||||
"UseIncomingChanges": "使用传入的更改",
|
||||
"UseBothChanges": "两者都用"
|
||||
}
|
||||
|
||||
@@ -83,7 +83,6 @@
|
||||
"Quit": "結束",
|
||||
"CannotSquashOrFixupFirstCommit": "沒有可以壓縮的提交",
|
||||
"Fixup": "修復 (Fixup)",
|
||||
"SureFixupThisCommit": "是否對此提交進行 '修復' ? 其將被合併於以下之提交中",
|
||||
"SureSquashThisCommit": "是否要把這個提交壓縮到下面的提交中?",
|
||||
"Squash": "壓縮 (Squash)",
|
||||
"PickCommitTooltip": "挑選提交 (於變基過程中)",
|
||||
@@ -149,8 +148,6 @@
|
||||
"UpdateFailedErr": "更新失敗:{{.errMessage}}",
|
||||
"ConfirmQuitDuringUpdateTitle": "正在更新中",
|
||||
"ConfirmQuitDuringUpdate": "正在進行更新,是否結束?",
|
||||
"MergeToolTitle": "合併工具",
|
||||
"MergeToolPrompt": "是否開啟 'git mergetool'?",
|
||||
"GitconfigParseErr": "Gogit 無法解析你的 gitconfig 檔案,因為存在未引用的 '\\' 字符,刪除它們應該可以解決這個問題。",
|
||||
"EditFile": "編輯檔案",
|
||||
"EditFileTooltip": "使用外部編輯器開啟",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user