summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-04-12 08:37:30 +0200
committerGitHub <noreply@github.com>2024-04-12 08:37:30 +0200
commit145fb6191c108f7e7af8180106b82f0503a7994c (patch)
treedf59dbbc3e298e568ff3651567f3922a4e88c7b5
parent06624e85d6b0b05d6c18b05292b3e15295d47a2c (diff)
parent7e14d88dc94c868c0ac9743b688f6d9a3d6698d7 (diff)
standardize commit hash commit sha (#3398)
Standardise on use of 'commit hash' rather than 'commit SHA' Close: https://github.com/jesseduffield/lazygit/issues/3208
-rw-r--r--docs/Custom_Command_Keybindings.md4
-rw-r--r--docs/keybindings/Keybindings_en.md6
-rw-r--r--docs/keybindings/Keybindings_ja.md6
-rw-r--r--docs/keybindings/Keybindings_ko.md6
-rw-r--r--docs/keybindings/Keybindings_nl.md6
-rw-r--r--docs/keybindings/Keybindings_pl.md6
-rw-r--r--docs/keybindings/Keybindings_ru.md6
-rw-r--r--docs/keybindings/Keybindings_zh-CN.md6
-rw-r--r--docs/keybindings/Keybindings_zh-TW.md6
-rw-r--r--pkg/app/daemon/daemon.go36
-rw-r--r--pkg/app/daemon/rebase.go4
-rw-r--r--pkg/app/entry_point.go2
-rw-r--r--pkg/commands/git_commands/bisect.go24
-rw-r--r--pkg/commands/git_commands/bisect_info.go20
-rw-r--r--pkg/commands/git_commands/branch.go4
-rw-r--r--pkg/commands/git_commands/commit.go58
-rw-r--r--pkg/commands/git_commands/commit_loader.go40
-rw-r--r--pkg/commands/git_commands/commit_loader_test.go70
-rw-r--r--pkg/commands/git_commands/commit_test.go8
-rw-r--r--pkg/commands/git_commands/patch.go10
-rw-r--r--pkg/commands/git_commands/rebase.go92
-rw-r--r--pkg/commands/git_commands/rebase_test.go6
-rw-r--r--pkg/commands/git_commands/reflog_commit_loader.go6
-rw-r--r--pkg/commands/git_commands/reflog_commit_loader_test.go22
-rw-r--r--pkg/commands/git_commands/stash.go14
-rw-r--r--pkg/commands/git_commands/stash_test.go30
-rw-r--r--pkg/commands/git_commands/working_tree.go4
-rw-r--r--pkg/commands/git_commands/working_tree_test.go24
-rw-r--r--pkg/commands/hosting_service/definitions.go12
-rw-r--r--pkg/commands/hosting_service/hosting_service.go8
-rw-r--r--pkg/commands/models/commit.go14
-rw-r--r--pkg/commands/patch/patch_builder.go4
-rw-r--r--pkg/gui/context/local_commits_context.go14
-rw-r--r--pkg/gui/context/reflog_commits_context.go4
-rw-r--r--pkg/gui/context/sub_commits_context.go8
-rw-r--r--pkg/gui/controllers/basic_commits_controller.go30
-rw-r--r--pkg/gui/controllers/bisect_controller.go52
-rw-r--r--pkg/gui/controllers/custom_patch_options_menu_action.go6
-rw-r--r--pkg/gui/controllers/helpers/cherry_pick_helper.go4
-rw-r--r--pkg/gui/controllers/helpers/fixup_helper.go20
-rw-r--r--pkg/gui/controllers/helpers/host_helper.go6
-rw-r--r--pkg/gui/controllers/helpers/merge_and_rebase_helper.go6
-rw-r--r--pkg/gui/controllers/helpers/refresh_helper.go12
-rw-r--r--pkg/gui/controllers/helpers/repos_helper.go4
-rw-r--r--pkg/gui/controllers/local_commits_controller.go40
-rw-r--r--pkg/gui/controllers/reflog_commits_controller.go2
-rw-r--r--pkg/gui/controllers/sub_commits_controller.go2
-rw-r--r--pkg/gui/controllers/tags_controller.go2
-rw-r--r--pkg/gui/controllers/undo_controller.go24
-rw-r--r--pkg/gui/keybindings.go6
-rw-r--r--pkg/gui/modes/cherrypicking/cherry_picking.go22
-rw-r--r--pkg/gui/modes/marked_base_commit/marked_base_commit.go14
-rw-r--r--pkg/gui/presentation/branches.go2
-rw-r--r--pkg/gui/presentation/commits.go70
-rw-r--r--pkg/gui/presentation/commits_test.go486
-rw-r--r--pkg/gui/presentation/graph/graph.go116
-rw-r--r--pkg/gui/presentation/graph/graph_test.go304
-rw-r--r--pkg/gui/presentation/reflog_commits.go18
-rw-r--r--pkg/gui/services/custom_commands/session_state_loader.go49
-rw-r--r--pkg/gui/types/context.go2
-rw-r--r--pkg/i18n/chinese.go2
-rw-r--r--pkg/i18n/dutch.go2
-rw-r--r--pkg/i18n/english.go18
-rw-r--r--pkg/i18n/japanese.go6
-rw-r--r--pkg/i18n/korean.go6
-rw-r--r--pkg/i18n/polish.go12
-rw-r--r--pkg/i18n/russian.go6
-rw-r--r--pkg/i18n/traditional_chinese.go6
-rw-r--r--pkg/integration/components/git.go8
-rw-r--r--pkg/integration/tests/custom_commands/access_commit_properties.go37
-rw-r--r--pkg/integration/tests/test_list.go1
-rw-r--r--pkg/utils/formatting.go8
-rw-r--r--pkg/utils/rebase_todo.go42
-rw-r--r--pkg/utils/rebase_todo_test.go74
-rwxr-xr-xscripts/bisect.sh2
75 files changed, 1101 insertions, 1018 deletions
diff --git a/docs/Custom_Command_Keybindings.md b/docs/Custom_Command_Keybindings.md
index cca3985db..8604a5247 100644
--- a/docs/Custom_Command_Keybindings.md
+++ b/docs/Custom_Command_Keybindings.md
@@ -6,7 +6,7 @@ You can add custom command keybindings in your config.yml (accessible by pressin
customCommands:
- key: '<c-r>'
context: 'commits'
- command: 'hub browse -- "commit/{{.SelectedLocalCommit.Sha}}"'
+ command: 'hub browse -- "commit/{{.SelectedLocalCommit.Hash}}"'
- key: 'a'
context: 'files'
command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | quote}}"
@@ -305,7 +305,7 @@ SelectedWorktree
CheckedOutBranch
```
-To see what fields are available on e.g. the `SelectedFile`, see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/models/file.go) (all the modelling lives in the same directory). Note that the custom commands feature does not guarantee backwards compatibility (until we hit Lazygit version 1.0 of course) which means a field you're accessing on an object may no longer be available from one release to the next. Typically however, all you'll need is `{{.SelectedFile.Name}}`, `{{.SelectedLocalCommit.Sha}}` and `{{.SelectedLocalBranch.Name}}`. In the future we will likely introduce a tighter interface that exposes a limited set of fields for each model.
+To see what fields are available on e.g. the `SelectedFile`, see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/commands/models/file.go) (all the modelling lives in the same directory). Note that the custom commands feature does not guarantee backwards compatibility (until we hit Lazygit version 1.0 of course) which means a field you're accessing on an object may no longer be available from one release to the next. Typically however, all you'll need is `{{.SelectedFile.Name}}`, `{{.SelectedLocalCommit.Hash}}` and `{{.SelectedLocalBranch.Name}}`. In the future we will likely introduce a tighter interface that exposes a limited set of fields for each model.
## Keybinding collisions
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md
index d3fa58cca..8edeb42bc 100644
--- a/docs/keybindings/Keybindings_en.md
+++ b/docs/keybindings/Keybindings_en.md
@@ -76,7 +76,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Copy commit SHA to clipboard | |
+| `` <c-o> `` | Copy commit hash to clipboard | |
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |
| `` 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. |
@@ -245,7 +245,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Copy commit SHA to clipboard | |
+| `` <c-o> `` | Copy commit hash to clipboard | |
| `` <space> `` | Checkout | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
@@ -313,7 +313,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Copy commit SHA to clipboard | |
+| `` <c-o> `` | Copy commit hash to clipboard | |
| `` <space> `` | Checkout | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
diff --git a/docs/keybindings/Keybindings_ja.md b/docs/keybindings/Keybindings_ja.md
index 863ecddd4..359972ace 100644
--- a/docs/keybindings/Keybindings_ja.md
+++ b/docs/keybindings/Keybindings_ja.md
@@ -66,7 +66,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | コミットのSHAをクリップボードにコピー | |
+| `` <c-o> `` | コミットのhashをクリップボードにコピー | |
| `` <space> `` | チェックアウト | Checkout the selected commit as a detached HEAD. |
| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | ブラウザでコミットを開く | |
@@ -93,7 +93,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | コミットのSHAをクリップボードにコピー | |
+| `` <c-o> `` | コミットのhashをクリップボードにコピー | |
| `` <c-r> `` | Reset copied (cherry-picked) commits selection | |
| `` 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. |
@@ -343,7 +343,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | コミットのSHAをクリップボードにコピー | |
+| `` <c-o> `` | コミットのhashをクリップボードにコピー | |
| `` <space> `` | チェックアウト | Checkout the selected commit as a detached HEAD. |
| `` y `` | コミットの情報をコピー | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | ブラウザでコミットを開く | |
diff --git a/docs/keybindings/Keybindings_ko.md b/docs/keybindings/Keybindings_ko.md
index 531ed4e46..1313ad9d3 100644
--- a/docs/keybindings/Keybindings_ko.md
+++ b/docs/keybindings/Keybindings_ko.md
@@ -53,7 +53,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 커밋 SHA를 클립보드에 복사 | |
+| `` <c-o> `` | 커밋 해시를 클립보드에 복사 | |
| `` <space> `` | 체크아웃 | Checkout the selected commit as a detached HEAD. |
| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | 브라우저에서 커밋 열기 | |
@@ -83,7 +83,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 커밋 SHA를 클립보드에 복사 | |
+| `` <c-o> `` | 커밋 해시를 클립보드에 복사 | |
| `` <space> `` | 체크아웃 | Checkout the selected commit as a detached HEAD. |
| `` y `` | 커밋 attribute 복사 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | 브라우저에서 커밋 열기 | |
@@ -256,7 +256,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 커밋 SHA를 클립보드에 복사 | |
+| `` <c-o> `` | 커밋 해시를 클립보드에 복사 | |
| `` <c-r> `` | Reset cherry-picked (copied) commits selection | |
| `` b `` | Bisect 옵션 보기 | |
| `` s `` | Squash | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md
index 61bc9c414..542786192 100644
--- a/docs/keybindings/Keybindings_nl.md
+++ b/docs/keybindings/Keybindings_nl.md
@@ -139,7 +139,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopieer commit SHA naar klembord | |
+| `` <c-o> `` | Kopieer commit hash naar klembord | |
| `` <c-r> `` | Reset cherry-picked (gekopieerde) commits selectie | |
| `` 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. |
@@ -223,7 +223,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopieer commit SHA naar klembord | |
+| `` <c-o> `` | Kopieer commit hash naar klembord | |
| `` <space> `` | Uitchecken | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
@@ -313,7 +313,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopieer commit SHA naar klembord | |
+| `` <c-o> `` | Kopieer commit hash naar klembord | |
| `` <space> `` | Uitchecken | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Open commit in browser | |
diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md
index 8c8e5b102..e41c07e4d 100644
--- a/docs/keybindings/Keybindings_pl.md
+++ b/docs/keybindings/Keybindings_pl.md
@@ -53,7 +53,7 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopiuj SHA commita do schowka | |
+| `` <c-o> `` | Kopiuj hash commita do schowka | |
| `` <c-r> `` | Resetuj wybrane (cherry-picked) commity | |
| `` b `` | Zobacz opcje bisect | |
| `` s `` | Scal | Scal wybrany commit z commitami poniżej. Wiadomość wybranego commita zostanie dołączona do commita poniżej. |
@@ -255,7 +255,7 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopiuj SHA commita do schowka | |
+| `` <c-o> `` | Kopiuj hash commita do schowka | |
| `` <space> `` | Przełącz | Przełącz wybrany commit jako odłączoną HEAD. |
| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). |
| `` o `` | Otwórz commit w przeglądarce | |
@@ -295,7 +295,7 @@ Jeśli chcesz zamiast tego rozpocząć interaktywny rebase od wybranego commita,
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Kopiuj SHA commita do schowka | |
+| `` <c-o> `` | Kopiuj hash commita do schowka | |
| `` <space> `` | Przełącz | Przełącz wybrany commit jako odłączoną HEAD. |
| `` y `` | Kopiuj atrybut commita do schowka | Kopiuj atrybut commita do schowka (np. hash, URL, różnice, wiadomość, autor). |
| `` o `` | Otwórz commit w przeglądarce | |
diff --git a/docs/keybindings/Keybindings_ru.md b/docs/keybindings/Keybindings_ru.md
index 8eb34a5bb..c83652ee9 100644
--- a/docs/keybindings/Keybindings_ru.md
+++ b/docs/keybindings/Keybindings_ru.md
@@ -123,7 +123,7 @@ _Связки клавиш_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Скопировать SHA коммита в буфер обмена | |
+| `` <c-o> `` | Скопировать hash коммита в буфер обмена | |
| `` <space> `` | Переключить | Checkout the selected commit as a detached HEAD. |
| `` y `` | Скопировать атрибут коммита | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Открыть коммит в браузере | |
@@ -140,7 +140,7 @@ _Связки клавиш_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Скопировать SHA коммита в буфер обмена | |
+| `` <c-o> `` | Скопировать hash коммита в буфер обмена | |
| `` <c-r> `` | Сбросить отобранную (скопированную | cherry-picked) выборку коммитов | |
| `` 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. |
@@ -219,7 +219,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | Скопировать SHA коммита в буфер обмена | |
+| `` <c-o> `` | Скопировать hash коммита в буфер обмена | |
| `` <space> `` | Переключить | Checkout the selected commit as a detached HEAD. |
| `` y `` | Скопировать атрибут коммита | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | Открыть коммит в браузере | |
diff --git a/docs/keybindings/Keybindings_zh-CN.md b/docs/keybindings/Keybindings_zh-CN.md
index c6d426b7f..e0f3a819c 100644
--- a/docs/keybindings/Keybindings_zh-CN.md
+++ b/docs/keybindings/Keybindings_zh-CN.md
@@ -53,7 +53,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 将提交的 SHA 复制到剪贴板 | |
+| `` <c-o> `` | 将提交的 hash 复制到剪贴板 | |
| `` <space> `` | 检出 | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | 在浏览器中打开提交 | |
@@ -106,7 +106,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 将提交的 SHA 复制到剪贴板 | |
+| `` <c-o> `` | 将提交的 hash 复制到剪贴板 | |
| `` <space> `` | 检出 | Checkout the selected commit as a detached HEAD. |
| `` y `` | Copy commit attribute to clipboard | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | 在浏览器中打开提交 | |
@@ -137,7 +137,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 将提交的 SHA 复制到剪贴板 | |
+| `` <c-o> `` | 将提交的 hash 复制到剪贴板 | |
| `` <c-r> `` | 重置已拣选(复制)的提交 | |
| `` b `` | 查看二分查找选项 | |
| `` s `` | 压缩 | Squash the selected commit into the commit below it. The selected commit's message will be appended to the commit below it. |
diff --git a/docs/keybindings/Keybindings_zh-TW.md b/docs/keybindings/Keybindings_zh-TW.md
index 2cb92f88e..5457b05d2 100644
--- a/docs/keybindings/Keybindings_zh-TW.md
+++ b/docs/keybindings/Keybindings_zh-TW.md
@@ -121,7 +121,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 複製提交 SHA 到剪貼簿 | |
+| `` <c-o> `` | 複製提交 hash 到剪貼簿 | |
| `` <space> `` | 檢出 | Checkout the selected commit as a detached HEAD. |
| `` y `` | 複製提交屬性 | Copy commit attribute to clipboard (e.g. hash, URL, diff, message, author). |
| `` o `` | 在瀏覽器中開啟提交 | |
@@ -162,7 +162,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
| Key | Action | Info |
|-----|--------|-------------|
-| `` <c-o> `` | 複製提交 SHA 到剪貼簿 | |
+| `` <c-o> `` | 複製提交 hash 到剪貼簿 | |
| `` <c-r> `` | 重設選定的揀選 (複製) 提交 | |
| `` 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. |
@@ -236,7 +236,7 @@ If you would instead like to start an interactive reb