Kaynağa Gözat

Renames Results view files to Compare view

Updates README (wip)
Updates welcome & settings pages (wip)
main
Eric Amodio 6 yıl önce
ebeveyn
işleme
63a17deff3
27 değiştirilmiş dosya ile 818 ekleme ve 669 silme
  1. +81
    -56
      README.md
  2. +123
    -119
      package.json
  3. +1
    -1
      src/commands/common.ts
  4. +1
    -1
      src/commands/diffBranchWithBranch.ts
  5. +3
    -3
      src/commands/diffDirectory.ts
  6. +1
    -1
      src/commands/showCommitSearch.ts
  7. +6
    -6
      src/commands/showView.ts
  8. +2
    -1
      src/configuration.ts
  9. +2
    -2
      src/constants.ts
  10. +31
    -24
      src/container.ts
  11. +34
    -0
      src/extension.ts
  12. +3
    -3
      src/quickpicks/commitsQuickPick.ts
  13. +2
    -2
      src/ui/config.ts
  14. +106
    -35
      src/ui/settings/index.html
  15. +9
    -4
      src/ui/welcome/index.html
  16. +16
    -16
      src/views/compareView.ts
  17. +4
    -4
      src/views/nodes.ts
  18. +7
    -5
      src/views/nodes/compareNode.ts
  19. +7
    -7
      src/views/nodes/comparePickerNode.ts
  20. +2
    -2
      src/views/nodes/compareResultsNode.ts
  21. +1
    -1
      src/views/nodes/searchNode.ts
  22. +3
    -3
      src/views/nodes/viewNode.ts
  23. +2
    -2
      src/views/viewBase.ts
  24. +6
    -6
      src/views/viewCommands.ts

+ 81
- 56
README.md Dosyayı Görüntüle

@ -30,7 +30,8 @@ Here are just some of the features that GitLens provides,
- a [_Repositories_ view](#repositories-view 'Jump to the Repositories view') to visualize, navigate, and explore Git repositories
- a [_File History_ view](#file-history-view 'Jump to the File History view') to visualize, navigate, and explore the revision history of the current file
- a [_Line History_ view](#line-history-view 'Jump to the Line History view') to visualize, navigate, and explore the revision history of the selected lines of current file
- an on-demand [_Results_ view](#results-view 'Jump to the Results view') to navigate and explore commits, histories, and searches, or visualize comparisons between branches, tags, commits, and more
- a [_Compare_ view](#compare-view 'Jump to the Compare view') to visualize comparisons between branches, tags, commits, and more
- a [Search Commits view](#search-commits-view 'Jump to the Search Commits view') to search and explore commit histories by message, author, files, id, etc
- [authorship code lens](#code-lens 'Jump to the Code Lens') showing the most recent commit and # of authors to the top of files and/or on code blocks
- an unobtrusive [current line blame](#current-line-blame 'Jump to the Current Line Blame') annotation at the end of the line
- on-demand [gutter blame](#gutter-blame 'Jump to the Gutter Blame') annotations, including a heatmap, for the whole file
@ -71,15 +72,15 @@ If you'd like to join them in supporting GitLens, please consider the following
- [Star or Fork me on GitHub](https://github.com/eamodio/vscode-gitlens 'Star or fork me on GitHub')
- [Follow me on Twitter](https://twitter.com/eamodio 'Follow me on Twitter')
#### Gold Sponsors ($100+)
#### Gold Sponsors (\$100+)
None yet — could be you!
#### Silver Sponsors ($50+)
#### Silver Sponsors (\$50+)
None yet — could be you!
#### Bronze Sponsors ($25+)
#### Bronze Sponsors (\$25+)
None yet — could be you!
@ -205,7 +206,7 @@ A [customizable](#line-history-view-settings 'Jump to the Line History view sett
- A toolbar provides a _Refresh_ command
- A context menu provides a _Follow Renames_ or _Don't Follow Renames_ command
The line history explorer provides the following features,
The line history view provides the following features,
- Automatically updates to track the selection of the current editor
- A context menu provides _Open File_, _Open File on Remote_ (if available), _Copy Remote File Url to Clipboard_ (if available), and _Refresh_ commands
@ -215,35 +216,18 @@ The line history explorer provides the following features,
---
### Results view
### Compare view
<p align="center">
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/develop/images/docs/results-explorer.png" alt="Results view" />
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/develop/images/docs/compare-view.png" alt="Compare view" />
</p>
An on-demand, [customizable](#results-view-settings 'Jump to the Results view settings') view to navigate and explore commits, histories, and searches, or visualize comparisons between branches, tags, commits, and more
A [customizable](#compare-view-settings 'Jump to the Compare view settings') view to visualize comparisons between branches, tags, commits, and more
- A toolbar provides _Search Commits_, _Keep Results_, and _Refresh_ commands
- A context menu provides _Automatic Layout_, _List Layout_, _Tree Layout_, and _Close_ commands
- A toolbar provides _Clear Results_, _Keep Results_, and _Refresh_ commands
- A context menu provides _Automatic Layout_, _List Layout_, and _Tree Layout_ commands
The results view provides the following features,
#### Explore
- Provides a semi-persistent results view for exploring histories, commits, and searches
- Accessible via the following commands
- _Show Commit Search_ command (`gitlens.showCommitSearch`)
- _Show File History_ command (`gitlens.showQuickFileHistory`)
- _Show Commit Details_ command (`gitlens.showQuickCommitDetails`)
- An inline toolbar provides a _Clear Results_ command
- A context menu provides _Clear Results_, and _Refresh_ commands
- Revisions (commits) expand show the set of files changed, complete with status indicators for adds, changes, renames, and deletes
- Context menus for each revision (commit) provide
- _Open Commit on Remote_ (if available), _Open All Changes_, _Open All Changes with Working Tree_, _Open Files_, _Open Revisions_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_, _Show Commit Details_, _Compare with HEAD_, _Compare with Working Tree_, _Compare with Selected_ (when available), _Select for Compare_, _Cherry Pick Commit (via Terminal)_ (when available), _Push to Commit (via Terminal)_ (when available), _Revert Commit (via Terminal)_ (when available), _Checkout Commit (via Terminal)_, _Rebase to Commit (via Terminal)_, _Reset to Commit (via Terminal)_, _Create Branch (via Terminal)..._, _Create Tag (via Terminal)..._, and _Refresh_ commands
- Context menus for each changed file provide
- _Open Changes_, _Open Changes with Working File_, _Open File_, _Open Revision_, _Open File on Remote_, _Open Revision on Remote_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_, _Copy Remote File Url to Clipboard_, _Apply Changes_, _Compare with Selected_ (when available), _Select for Compare_, and _Show Commit File Details_ commands
#### Compare
The compare view provides the following features,
- Provides a semi-persistent results view for comparison operations
@ -268,6 +252,34 @@ The results view provides the following features,
---
### Search Commits view
<p align="center">
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/develop/images/docs/search-view.png" alt="Search Commits view" />
</p>
A [customizable](#search-commits-view-settings 'Jump to the Search Commits view settings') view to search and explore commit histories by message, author, files, id, etc
- A toolbar provides _Clear Results_, _Keep Results_, and _Refresh_ commands
- A context menu provides _Automatic Layout_, _List Layout_, and _Tree Layout_ commands
The search commits view provides the following features,
- Provides a semi-persistent results view for searching and exploring commit histories
- Accessible via the following commands
- _Show Commit Search_ command (`gitlens.showCommitSearch`)
- _Show File History_ command (`gitlens.showQuickFileHistory`)
- _Show Commit Details_ command (`gitlens.showQuickCommitDetails`)
- An inline toolbar provides a _Clear Results_ command
- A context menu provides _Clear Results_, and _Refresh_ commands
- Revisions (commits) expand show the set of files changed, complete with status indicators for adds, changes, renames, and deletes
- Context menus for each revision (commit) provide
- _Open Commit on Remote_ (if available), _Open All Changes_, _Open All Changes with Working Tree_, _Open Files_, _Open Revisions_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_, _Show Commit Details_, _Compare with HEAD_, _Compare with Working Tree_, _Compare with Selected_ (when available), _Select for Compare_, _Cherry Pick Commit (via Terminal)_ (when available), _Push to Commit (via Terminal)_ (when available), _Revert Commit (via Terminal)_ (when available), _Checkout Commit (via Terminal)_, _Rebase to Commit (via Terminal)_, _Reset to Commit (via Terminal)_, _Create Branch (via Terminal)..._, _Create Tag (via Terminal)..._, and _Refresh_ commands
- Context menus for each changed file provide
- _Open Changes_, _Open Changes with Working File_, _Open File_, _Open Revision_, _Open File on Remote_, _Open Revision on Remote_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_, _Copy Remote File Url to Clipboard_, _Apply Changes_, _Compare with Selected_ (when available), _Select for Compare_, and _Show Commit File Details_ commands
---
### Code Lens
<p align="center">
@ -454,7 +466,7 @@ The results view provides the following features,
- Use `#<sha>` to search for a commit with id of `<sha>` &mdash; See [Git docs](https://git-scm.com/docs/git-log 'Open Git docs')
- Use `~<pattern>` to search for commits with differences whose patch text contains added/removed lines that match `<pattern>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#git-log--Gltregexgt 'Open Git docs')
- Use `=<string>` to search for commits with differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file &mdash; See [Git docs](https://git-scm.com/docs/git-log#git-log--Sltstringgt 'Open Git docs')
- Provides a _Show in Results_ option to show the search results in the _Results_ view
- Provides a _Show in View_ option to show the search results in the _Search Commits_ view
---
@ -492,7 +504,7 @@ The results view provides the following features,
</p>
- Adds a _Show File History_ command (`gitlens.showQuickFileHistory`) to show a paged **file history quick pick menu** of the current file for exploring its commit history
- Provides additional entries to _Show in Results_, _Show Branch History_, and _Open File on \<remote-service\>_ when available
- Provides additional entries to _Show in View_, _Show Branch History_, and _Open File on \<remote-service\>_ when available
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
- Navigate pages via `alt+,` and `alt+.` to go backward and forward respectively
@ -504,7 +516,7 @@ The results view provides the following features,
- Adds a _Show Commit Details_ command (`gitlens.showQuickCommitDetails`) to show a **commit details quick pick menu** of the most recent commit of the current file
- Quickly see the set of files changed in the commit, complete with status indicators for adds, changes, renames, and deletes
- Provides additional entries to _Show in Results_, _Open Commit on \<remote-service\>_ when available, _Open Files_, _Open Revisions_, _Open Directory Compare with Previous Revision_, _Open Directory Compare with Working Tree_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_
- Provides additional entries to _Show in View_, _Open Commit on \<remote-service\>_ when available, _Open Files_, _Open Revisions_, _Open Directory Compare with Previous Revision_, _Open Directory Compare with Working Tree_, _Copy Commit ID to Clipboard_, _Copy Commit Message to Clipboard_
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible &mdash; commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#advanced-settings 'Jump to Advanced settings') is set
- Use the `alt+right arrow` shortcut on a file entry in the `Changed Files` section to preview the comparison of the current revision with the previous one
@ -649,51 +661,64 @@ See also [View Settings](#view-settings 'Jump to the View settings')
| `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files<br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.repositories.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.repositories.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Repositories_ view<br />Only applies when `gitlens.views.repositories.files.layout` is set to `auto` |
| `gitlens.views.repositories.includeWorkingTree` | Specifies whether to include working tree files inside the `Repository Status` node of the _Repositories_ view |
| `gitlens.views.repositories.location` | Specifies where to show the _Repositories_ view<br />`gitlens` - adds to the GitLens view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view |
| `gitlens.views.repositories.location` | Specifies where to show the _Repositories_ view<br />`gitlens` - adds to the GitLens side bar<br />`explorer` - adds to the Explorer side bar<br />`scm` - adds to the Source Control side bar |
| `gitlens.views.repositories.showTrackingBranch` | Specifies whether to show the tracking branch when displaying local branches in the _Repositories_ view |
### File History View Settings
See also [View Settings](#view-settings 'Jump to the View settings')
| Name | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.fileHistory.avatars` | Specifies whether to show avatar images instead of status icons in the _File History_ view |
| `gitlens.views.fileHistory.enabled` | Specifies whether to show the _File History_ view |
| `gitlens.views.fileHistory.location` | Specifies where to show the _File History_ view<br />`gitlens` - adds to the GitLens view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view |
| Name | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.fileHistory.avatars` | Specifies whether to show avatar images instead of status icons in the _File History_ view |
| `gitlens.views.fileHistory.enabled` | Specifies whether to show the _File History_ view |
| `gitlens.views.fileHistory.location` | Specifies where to show the _File History_ view<br />`gitlens` - adds to the GitLens side bar<br />`explorer` - adds to the Explorer side bar<br />`scm` - adds to the Source Control side bar |
### Line History View Settings
See also [View Settings](#view-settings 'Jump to the View settings')
| Name | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.lineHistory.avatars` | Specifies whether to show avatar images instead of status icons in the _Line History_ view |
| `gitlens.views.lineHistory.enabled` | Specifies whether to show the _Line History_ view |
| `gitlens.views.lineHistory.location` | Specifies where to show the _Line History_ view<br />`gitlens` - adds to the GitLens view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view |
| Name | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.lineHistory.avatars` | Specifies whether to show avatar images instead of status icons in the _Line History_ view |
| `gitlens.views.lineHistory.enabled` | Specifies whether to show the _Line History_ view |
| `gitlens.views.lineHistory.location` | Specifies where to show the _Line History_ view<br />`gitlens` - adds to the GitLens side bar<br />`explorer` - adds to the Explorer side bar<br />`scm` - adds to the Source Control side bar |
### Results View Settings
### Compare View Settings
See also [View Settings](#view-settings 'Jump to the View settings')
| Name | Description |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `gitlens.views.results.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Results_ view<br />Only applies when `gitlens.views.results.files.layout` is set to `tree` or `auto` |
| `gitlens.views.results.files.layout` | Specifies how the _Results_ view will display files<br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.results.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.results.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Results_ view<br />Only applies when `gitlens.views.results.files.layout` is set to `auto` |
| `gitlens.views.results.location` | Specifies where to show the _Results_ view<br />`gitlens` - adds to the GitLens view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view |
| `gitlens.views.compare.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Compare_ view<br />Only applies when `gitlens.views.compare.files.layout` is set to `tree` or `auto` |
| `gitlens.views.compare.enabled` | Specifies whether to show the _Compare_ view |
| `gitlens.views.compare.files.layout` | Specifies how the _Compare_ view will display files<br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.compare.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.compare.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Compare_ view<br />Only applies when `gitlens.views.compare.files.layout` is set to `auto` |
| `gitlens.views.compare.location` | Specifies where to show the _Compare_ view<br />`gitlens` - adds to the GitLens side bar<br />`explorer` - adds to the Explorer side bar<br />`scm` - adds to the Source Control side bar |
### Search View Settings
See also [View Settings](#view-settings 'Jump to the View settings')
| Name | Description |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.search.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Search Commits_ view<br />Only applies when `gitlens.views.compare.files.layout` is set to `tree` or `auto` |
| `gitlens.views.search.enabled` | Specifies whether to show the _Search Commits_ view |
| `gitlens.views.search.files.layout` | Specifies how the _Search Commits_ view will display files<br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.compare.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.views.compare.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _Search Commits_ view<br />Only applies when `gitlens.views.compare.files.layout` is set to `auto` |
| `gitlens.views.search.location` | Specifies where to show the _Search Commits_ view<br />`gitlens` - adds to the GitLens side bar<br />`explorer` - adds to the Explorer side bar<br />`scm` - adds to the Source Control side bar |
### View Settings
| Name | Description |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.avatars` | Specifies whether to show avatar images instead of commit (or status) icons in the _Repositories_ and _Results_ views |
| `gitlens.views.commitFileFormat` | Specifies the format of a committed file in the _Repositories_ and _Results_ views<br />Available tokens<br /> ${directory} - directory name<br /> ${file} - file name<br /> ${filePath} - formatted file name and path<br /> ${path} - full file path |
| `gitlens.views.commitFormat` | Specifies the format of committed changes in the _Repositories_ and _Results_ views<br />Available tokens<br /> ${id} - commit id<br /> ${author} - commit author<br /> ${message} - commit message<br /> ${ago} - relative commit date (e.g. 1 day ago)<br /> ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br /> ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`<br /> ${authorAgo} - commit author, relative commit date<br /> ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting |
| `gitlens.views.defaultItemLimit` | Specifies the default number of items to show in a view list. Use 0 to specify no limit |
| `gitlens.views.stashFileFormat` | Specifies the format of a stashed file in the _Repositories_ and _Results_ views<br />Available tokens<br /> ${directory} - directory name<br /> ${file} - file name<br /> ${filePath} - formatted file name and path<br /> ${path} - full file path |
| `gitlens.views.stashFormat` | Specifies the format of stashed changes in the _Repositories_ and _Results_ views<br />Available tokens<br /> ${id} - commit id<br /> ${author} - commit author<br /> ${message} - commit message<br /> ${ago} - relative commit date (e.g. 1 day ago)<br /> ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br /> ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`<br /> ${authorAgo} - commit author, relative commit date<br /> ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting |
| `gitlens.views.statusFileFormat` | Specifies the format of the status of a working or committed file in the _Repositories_ view<br />Available tokens<br /> ${directory} - directory name<br /> ${file} - file name<br /> ${filePath} - formatted file name and path<br /> ${path} - full file path<br />${working} - optional indicator if the file is uncommitted |
| Name | Description |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.avatars` | Specifies whether to show avatar images instead of commit (or status) icons in the views |
| `gitlens.views.commitFileFormat` | Specifies the format of a committed file in the views<br />Available tokens<br /> ${directory} - directory name<br />${file} - file name<br /> ${filePath} - formatted file name and path<br />${path} - full file path |
| `gitlens.views.commitFormat` | Specifies the format of committed changes in the views<br />Available tokens<br /> ${id} - commit id<br />${author} - commit author<br /> ${message} - commit message<br />${ago} - relative commit date (e.g. 1 day ago)<br /> \${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br /> \${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`<br /> ${authorAgo} - commit author, relative commit date<br />${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting |
| `gitlens.views.defaultItemLimit` | Specifies the default number of items to show in a view list. Use 0 to specify no limit |
| `gitlens.views.stashFileFormat` | Specifies the format of a stashed file in the views<br />Available tokens<br /> ${directory} - directory name<br />${file} - file name<br /> ${filePath} - formatted file name and path<br />${path} - full file path |
| `gitlens.views.stashFormat` | Specifies the format of stashed changes in the views<br />Available tokens<br /> ${id} - commit id<br />${author} - commit author<br /> ${message} - commit message<br />${ago} - relative commit date (e.g. 1 day ago)<br /> \${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)<br /> \${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`<br /> ${authorAgo} - commit author, relative commit date<br />${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting |
| `gitlens.views.statusFileFormat` | Specifies the format of the status of a working or committed file in the views<br />Available tokens<br /> ${directory} - directory name<br />${file} - file name<br /> ${filePath} - formatted file name and path<br />${path} - full file path<br />\${working} - optional indicator if the file is uncommitted |
### Code Lens Settings

+ 123
- 119
package.json Dosyayı Görüntüle

@ -1116,19 +1116,69 @@
"gitlens.views.avatars": {
"type": "boolean",
"default": true,
"description": "Specifies whether to show avatar images instead of commit (or status) icons in the `Repositories` and `Results` views",
"description": "Specifies whether to show avatar images instead of commit (or status) icons in the views",
"scope": "window"
},
"gitlens.views.commitFileFormat": {
"type": "string",
"default": "${filePath}",
"description": "Specifies the format of a committed file in the `Repositories` and `Results` views\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path",
"description": "Specifies the format of a committed file in the views\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path",
"scope": "window"
},
"gitlens.views.commitFormat": {
"type": "string",
"default": "${message} • ${authorAgoOrDate}${ • changes}${ (id)}",
"description": "Specifies the format of committed changes in the `Repositories` and `Results` views\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.defaultDateFormat`)\\n ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`\n ${authorAgo} - commit author, relative commit date\n ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting",
"description": "Specifies the format of committed changes in the views\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.defaultDateFormat`)\\n ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`\n ${authorAgo} - commit author, relative commit date\n ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting",
"scope": "window"
},
"gitlens.views.compare.enabled": {
"type": "boolean",
"default": true,
"description": "Specifies whether to show the `Compare` view",
"scope": "window"
},
"gitlens.views.compare.files.compact": {
"type": "boolean",
"default": true,
"description": "Specifies whether to compact (flatten) unnecessary file nesting in the `Compare` view\nOnly applies when `#gitlens.views.compare.files.layout#` is set to `tree` or `auto`",
"scope": "window"
},
"gitlens.views.compare.files.layout": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"list",
"tree"
],
"enumDescriptions": [
"Automatically switches between displaying files as a `tree` or `list` based on the `#gitlens.views.compare.files.threshold#` value and the number of files at each nesting level",
"Displays files as a list",
"Displays files as a tree"
],
"description": "Specifies how the `Compare` view will display files",
"scope": "window"
},
"gitlens.views.compare.files.threshold": {
"type": "number",
"default": 5,
"description": "Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the `Compare` view\nOnly applies when `#gitlens.views.compare.files.layout#` is set to `auto`",
"scope": "window"
},
"gitlens.views.compare.location": {
"type": "string",
"default": "gitlens",
"enum": [
"gitlens",
"explorer",
"scm"
],
"enumDescriptions": [
"Adds to the GitLens side bar",
"Adds to the Explorer side bar",
"Adds to the Source Control side bar"
],
"description": "Specifies where to show the `Compare` view",
"scope": "window"
},
"gitlens.views.defaultItemLimit": {
@ -1158,9 +1208,9 @@
"scm"
],
"enumDescriptions": [
"Adds to the GitLens view",
"Adds to the Explorer view",
"Adds to the Source Control view"
"Adds to the GitLens side bar",
"Adds to the Explorer side bar",
"Adds to the Source Control side bar"
],
"description": "Specifies where to show the `File History` view",
"scope": "window"
@ -1186,9 +1236,9 @@
"scm"
],
"enumDescriptions": [
"Adds to the GitLens view",
"Adds to the Explorer view",
"Adds to the Source Control view"
"Adds to the GitLens side bar",
"Adds to the Explorer side bar",
"Adds to the Source Control side bar"
],
"description": "Specifies where to show the `Line History` view",
"scope": "window"
@ -1268,9 +1318,9 @@
"scm"
],
"enumDescriptions": [
"Adds to the GitLens view",
"Adds to the Explorer view",
"Adds to the Source Control view"
"Adds to the GitLens side bar",
"Adds to the Explorer side bar",
"Adds to the Source Control side bar"
],
"description": "Specifies where to show the `Repositories` view",
"scope": "window"
@ -1281,56 +1331,6 @@
"description": "Specifies whether to show the tracking branch when displaying local branches in the `Repositories` view",
"scope": "window"
},
"gitlens.views.results.enabled": {
"type": "boolean",
"default": true,
"description": "Specifies whether to show the `Results` view",
"scope": "window"
},
"gitlens.views.results.files.compact": {
"type": "boolean",
"default": true,
"description": "Specifies whether to compact (flatten) unnecessary file nesting in the `Results` view\nOnly applies when `#gitlens.views.results.files.layout#` is set to `tree` or `auto`",
"scope": "window"
},
"gitlens.views.results.files.layout": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"list",
"tree"
],
"enumDescriptions": [
"Automatically switches between displaying files as a `tree` or `list` based on the `#gitlens.views.results.files.threshold#` value and the number of files at each nesting level",
"Displays files as a list",
"Displays files as a tree"
],
"description": "Specifies how the `Results` view will display files",
"scope": "window"
},
"gitlens.views.results.files.threshold": {
"type": "number",
"default": 5,
"description": "Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the `Results` view\nOnly applies when `#gitlens.views.results.files.layout#` is set to `auto`",
"scope": "window"
},
"gitlens.views.results.location": {
"type": "string",
"default": "gitlens",
"enum": [
"gitlens",
"explorer",
"scm"
],
"enumDescriptions": [
"Adds to the GitLens view",
"Adds to the Explorer view",
"Adds to the Source Control view"
],
"description": "Specifies where to show the `Results` view",
"scope": "window"
},
"gitlens.views.search.enabled": {
"type": "boolean",
"default": true,
@ -1356,7 +1356,7 @@
"Displays files as a list",
"Displays files as a tree"
],
"description": "Specifies how the `Results` view will display files",
"description": "Specifies how the `Search Commits` view will display files",
"scope": "window"
},
"gitlens.views.search.files.threshold": {
@ -1374,9 +1374,9 @@
"scm"
],
"enumDescriptions": [
"Adds to the GitLens view",
"Adds to the Explorer view",
"Adds to the Source Control view"
"Adds to the GitLens side bar",
"Adds to the Explorer side bar",
"Adds to the Source Control side bar"
],
"description": "Specifies where to show the `Search Commits` view",
"scope": "window"
@ -1384,19 +1384,19 @@
"gitlens.views.stashFileFormat": {
"type": "string",
"default": "${filePath}",
"description": "Specifies the format of a stashed file in the `Repositories` and `Results` views\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path",
"description": "Specifies the format of a stashed file in the views\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path",
"scope": "window"
},
"gitlens.views.stashFormat": {
"type": "string",
"default": "${message}",
"description": "Specifies the format of stashed changes in the `Repositories` and `Results` views\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)\n ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`\n ${authorAgo} - commit author, relative commit date\n ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting",
"description": "Specifies the format of stashed changes in the views\nAvailable tokens\n ${id} - commit id\n ${author} - commit author\n ${message} - commit message\n ${ago} - relative commit date (e.g. 1 day ago)\n ${date} - formatted commit date (format specified by `gitlens.statusBar.dateFormat`)\n ${agoOrDate} - commit date specified by `gitlens.defaultDateStyle`\n ${authorAgo} - commit author, relative commit date\n ${authorAgoOrDate} - commit author, commit date specified by `gitlens.defaultDateStyle`\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting",
"scope": "window"
},
"gitlens.views.statusFileFormat": {
"type": "string",
"default": "${working }${filePath}",
"description": "Specifies the format of the status of a working or committed file in the `Repositories` view\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path\n ${working} - optional indicator if the file is uncommitted",
"description": "Specifies the format of the status of a working or committed file in the views\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path\n ${working} - optional indicator if the file is uncommitted",
"scope": "window"
},
"gitlens.advanced.blame.customArguments": {
@ -1584,6 +1584,11 @@
"category": "GitLens"
},
{
"command": "gitlens.showCompareView",
"title": "Show Compare View",
"category": "GitLens"
},
{
"command": "gitlens.showFileHistoryView",
"title": "Show File History View",
"category": "GitLens"
@ -1599,11 +1604,6 @@
"category": "GitLens"
},
{
"command": "gitlens.showResultsView",
"title": "Show Results View",
"category": "GitLens"
},
{
"command": "gitlens.showSearchView",
"title": "Show Search Commits View",
"category": "GitLens"
@ -2369,7 +2369,7 @@
"category": "GitLens"
},
{
"command": "gitlens.views.results.clear",
"command": "gitlens.views.compare.clear",
"title": "Clear Results",
"category": "GitLens",
"icon": {
@ -2378,7 +2378,7 @@
}
},
{
"command": "gitlens.views.results.refresh",
"command": "gitlens.views.compare.refresh",
"title": "Refresh",
"category": "GitLens",
"icon": {
@ -2387,22 +2387,22 @@
}
},
{
"command": "gitlens.views.results.setFilesLayoutToAuto",
"command": "gitlens.views.compare.setFilesLayoutToAuto",
"title": "Automatic Layout",
"category": "GitLens"
},
{
"command": "gitlens.views.results.setFilesLayoutToList",
"command": "gitlens.views.compare.setFilesLayoutToList",
"title": "List Layout",
"category": "GitLens"
},
{
"command": "gitlens.views.results.setFilesLayoutToTree",
"command": "gitlens.views.compare.setFilesLayoutToTree",
"title": "Tree Layout",
"category": "GitLens"
},
{
"command": "gitlens.views.results.setKeepResultsToOn",
"command": "gitlens.views.compare.setKeepResultsToOn",
"title": "Keep Results",
"category": "GitLens",
"icon": {
@ -2411,7 +2411,7 @@
}
},
{
"command": "gitlens.views.results.setKeepResultsToOff",
"command": "gitlens.views.compare.setKeepResultsToOff",
"title": "Keep Results",
"category": "GitLens",
"icon": {
@ -2420,7 +2420,7 @@
}
},
{
"command": "gitlens.views.results.swapComparision",
"command": "gitlens.views.compare.swapComparision",
"title": "Swap Comparision",
"category": "GitLens",
"icon": {
@ -2497,7 +2497,7 @@
"menus": {
"commandPalette": [
{
"command": "gitlens.showRepositoriesView",
"command": "gitlens.showCompareView",
"when": "gitlens:enabled"
},
{
@ -2509,7 +2509,11 @@
"when": "gitlens:enabled"
},
{
"command": "gitlens.showResultsView",
"command": "gitlens.showRepositoriesView",
"when": "gitlens:enabled"
},
{
"command": "gitlens.showSearchView",
"when": "gitlens:enabled"
},
{
@ -2977,35 +2981,35 @@
"when": "false"
},
{
"command": "gitlens.views.results.clear",
"command": "gitlens.views.compare.clear",
"when": "false"
},
{
"command": "gitlens.views.results.refresh",
"command": "gitlens.views.compare.refresh",
"when": "false"
},
{
"command": "gitlens.views.results.setFilesLayoutToAuto",
"command": "gitlens.views.compare.setFilesLayoutToAuto",
"when": "false"
},
{
"command": "gitlens.views.results.setFilesLayoutToList",
"command": "gitlens.views.compare.setFilesLayoutToList",
"when": "false"
},
{
"command": "gitlens.views.results.setFilesLayoutToTree",
"command": "gitlens.views.compare.setFilesLayoutToTree",
"when": "false"
},
{
"command": "gitlens.views.results.setKeepResultsToOn",
"command": "gitlens.views.compare.setKeepResultsToOn",
"when": "false"
},
{
"command": "gitlens.views.results.setKeepResultsToOff",
"command": "gitlens.views.compare.setKeepResultsToOff",
"when": "false"
},
{
"command": "gitlens.views.results.swapComparision",
"command": "gitlens.views.compare.swapComparision",
"when": "false"
},
{
@ -3382,38 +3386,38 @@
"group": "1_gitlens"
},
{
"command": "gitlens.views.results.clear",
"when": "view =~ /^gitlens\\.views\\.results:/",
"command": "gitlens.views.compare.clear",
"when": "view =~ /^gitlens\\.views\\.compare:/",
"group": "navigation@2"
},
{
"command": "gitlens.views.results.setKeepResultsToOn",
"when": "view =~ /^gitlens\\.views\\.results:/ && !gitlens:views:results:keepResults",
"command": "gitlens.views.compare.setKeepResultsToOn",
"when": "view =~ /^gitlens\\.views\\.compare:/ && !gitlens:views:compare:keepResults",
"group": "navigation@3"
},
{
"command": "gitlens.views.results.setKeepResultsToOff",
"when": "view =~ /^gitlens\\.views\\.results:/ && gitlens:views:results:keepResults",
"command": "gitlens.views.compare.setKeepResultsToOff",
"when": "view =~ /^gitlens\\.views\\.compare:/ && gitlens:views:compare:keepResults",
"group": "navigation@3"
},
{
"command": "gitlens.views.results.refresh",
"when": "view =~ /^gitlens\\.views\\.results:/",
"command": "gitlens.views.compare.refresh",
"when": "view =~ /^gitlens\\.views\\.compare:/",
"group": "navigation@99"
},
{
"command": "gitlens.views.results.setFilesLayoutToAuto",
"when": "view =~ /^gitlens\\.views\\.results:/",
"command": "gitlens.views.compare.setFilesLayoutToAuto",
"when": "view =~ /^gitlens\\.views\\.compare:/",
"group": "1_gitlens"
},
{
"command": "gitlens.views.results.setFilesLayoutToList",
"when": "view =~ /^gitlens\\.views\\.results:/",
"command": "gitlens.views.compare.setFilesLayoutToList",
"when": "view =~ /^gitlens\\.views\\.compare:/",
"group": "1_gitlens"
},
{
"command": "gitlens.views.results.setFilesLayoutToTree",
"when": "view =~ /^gitlens\\.views\\.results:/",
"command": "gitlens.views.compare.setFilesLayoutToTree",
"when": "view =~ /^gitlens\\.views\\.compare:/",
"group": "1_gitlens"
},
{
@ -3899,28 +3903,28 @@
"group": "8_gitlens@1"
},
{
"command": "gitlens.views.results.swapComparision",
"when": "viewItem == gitlens:results:comparison",
"command": "gitlens.views.compare.swapComparision",
"when": "viewItem == gitlens:compare:results",
"group": "inline@1"
},
{
"command": "gitlens.views.dismissNode",
"when": "viewItem =~ /gitlens:(compare:picker:ref|results|search)\\b(?!:(commits|files))/",
"when": "viewItem =~ /gitlens:(compare:picker:ref|compare|search)\\b(?!:(commits|files))/",
"group": "inline@2"
},
{
"command": "gitlens.views.dismissNode",
"when": "viewItem =~ /gitlens:(compare:picker:ref|results|search)\\b(?!:(commits|files))/",
"when": "viewItem =~ /gitlens:(compare:picker:ref|compare|search)\\b(?!:(commits|files))/",
"group": "1_gitlens@1"
},
{
"command": "gitlens.views.results.swapComparision",
"when": "viewItem == gitlens:results:comparison",
"command": "gitlens.views.compare.swapComparision",
"when": "viewItem == gitlens:compare:results",
"group": "2_gitlens@1"
},
{
"command": "gitlens.views.openDirectoryDiff",
"when": "viewItem == gitlens:results:comparison",
"when": "viewItem == gitlens:compare:results",
"group": "7_gitlens@1"
},
{
@ -4184,9 +4188,9 @@
"when": "config.gitlens.views.lineHistory.enabled && config.gitlens.views.lineHistory.location == gitlens"
},
{
"id": "gitlens.views.results:gitlens",
"id": "gitlens.views.compare:gitlens",
"name": "Compare",
"when": "gitlens:enabled && config.gitlens.views.results.enabled && config.gitlens.views.results.location == gitlens"
"when": "gitlens:enabled && config.gitlens.views.compare.enabled && config.gitlens.views.compare.location == gitlens"
},
{
"id": "gitlens.views.search:gitlens",
@ -4211,9 +4215,9 @@
"when": "gitlens:enabled && config.gitlens.views.lineHistory.enabled && config.gitlens.views.lineHistory.location == explorer"
},
{
"id": "gitlens.views.results:explorer",
"id": "gitlens.views.compare:explorer",
"name": "GitLens: Compare",
"when": "gitlens:enabled && config.gitlens.views.results.enabled && config.gitlens.views.results.location == explorer"
"when": "gitlens:enabled && config.gitlens.views.compare.enabled && config.gitlens.views.compare.location == explorer"
},
{
"id": "gitlens.views.search:explorer",
@ -4238,9 +4242,9 @@
"when": "gitlens:enabled && config.gitlens.views.lineHistory.enabled && config.gitlens.views.lineHistory.location == scm"
},
{
"id": "gitlens.views.results:scm",
"id": "gitlens.views.compare:scm",
"name": "GitLens: Compare",
"when": "gitlens:enabled && config.gitlens.views.results.enabled && config.gitlens.views.results.location == scm"
"when": "gitlens:enabled && config.gitlens.views.compare.enabled && config.gitlens.views.compare.location == scm"
},
{
"id": "gitlens.views.search:scm",

+ 1
- 1
src/commands/common.ts Dosyayı Görüntüle

@ -58,6 +58,7 @@ export enum Commands {
ResetSuppressedWarnings = 'gitlens.resetSuppressedWarnings',
ShowCommitInView = 'gitlens.showCommitInView',
ShowCommitSearch = 'gitlens.showCommitSearch',
ShowCompareView = 'gitlens.showCompareView',
ShowFileHistoryView = 'gitlens.showFileHistoryView',
ShowFileHistoryInView = 'gitlens.showFileHistoryInView',
ShowLineHistoryView = 'gitlens.showLineHistoryView',
@ -71,7 +72,6 @@ export enum Commands {
ShowQuickRevisionDetails = 'gitlens.showQuickRevisionDetails',
ShowQuickStashList = 'gitlens.showQuickStashList',
ShowRepositoriesView = 'gitlens.showRepositoriesView',
ShowResultsView = 'gitlens.showResultsView',
ShowSearchView = 'gitlens.showSearchView',
ShowSettingsPage = 'gitlens.showSettingsPage',
ShowWelcomePage = 'gitlens.showWelcomePage',

+ 1
- 1
src/commands/diffBranchWithBranch.ts Dosyayı Görüntüle

@ -75,7 +75,7 @@ export class DiffBranchWithBranchCommand extends ActiveEditorCommand {
if (args.ref1 === undefined) return undefined;
}
await Container.resultsView.compare(repoPath, args.ref1, args.ref2);
await Container.compareView.compare(repoPath, args.ref1, args.ref2);
return undefined;
}

+ 3
- 3
src/commands/diffDirectory.ts Dosyayı Görüntüle

@ -1,11 +1,11 @@
'use strict';
import { CancellationTokenSource, commands, TextEditor, Uri, window } from 'vscode';
import { commands, TextEditor, Uri, window } from 'vscode';
import { BuiltInCommands, GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickpicks';
import { ResultsComparisonNode } from '../views/nodes';
import { CompareResultsNode } from '../views/nodes';
import {
ActiveEditorCommand,
command,
@ -30,7 +30,7 @@ export class DiffDirectoryCommand extends ActiveEditorCommand {
protected async preExecute(context: CommandContext, args: DiffDirectoryCommandArgs = {}): Promise<any> {
switch (context.command) {
case Commands.ViewsOpenDirectoryDiff:
if (context.type === 'viewItem' && context.node instanceof ResultsComparisonNode) {
if (context.type === 'viewItem' && context.node instanceof CompareResultsNode) {
args.ref1 = context.node.ref1.ref;
args.ref2 = context.node.ref2.ref;
}

+ 1
- 1
src/commands/showCommitSearch.ts Dosyayı Görüntüle

@ -192,7 +192,7 @@ export class ShowCommitSearchCommand extends ActiveEditorCachedCommand {
[uri, { ...args, maxCount: 0, goBackCommand: goBackCommand }]
)
: undefined,
showInResultsCommand:
showInViewCommand:
log !== undefined
? new ShowCommitSearchResultsInViewQuickPickItem(log, { label: searchLabel! })
: undefined

+ 6
- 6
src/commands/showView.ts Dosyayı Görüntüle

@ -6,10 +6,10 @@ import { command, Command, CommandContext, Commands } from './common';
export class ShowViewCommand extends Command {
constructor() {
super([
Commands.ShowRepositoriesView,
Commands.ShowCompareView,
Commands.ShowFileHistoryView,
Commands.ShowLineHistoryView,
Commands.ShowResultsView,
Commands.ShowRepositoriesView,
Commands.ShowSearchView
]);
}
@ -20,14 +20,14 @@ export class ShowViewCommand extends Command {
execute(command: Commands) {
switch (command) {
case Commands.ShowRepositoriesView:
return Container.repositoriesView.show();
case Commands.ShowCompareView:
return Container.compareView.show();
case Commands.ShowFileHistoryView:
return Container.fileHistoryView.show();
case Commands.ShowLineHistoryView:
return Container.lineHistoryView.show();
case Commands.ShowResultsView:
return Container.resultsView.show();
case Commands.ShowRepositoriesView:
return Container.repositoriesView.show();
case Commands.ShowSearchView:
return Container.searchView.show();
}

+ 2
- 1
src/configuration.ts Dosyayı Görüntüle

@ -44,10 +44,11 @@ export class Configuration {
`gitlens.${this.name('currentLine').value}`,
`gitlens.${this.name('hovers').value}`,
`gitlens.${this.name('statusBar').value}`,
`gitlens.${this.name('views')('compare').value}`,
`gitlens.${this.name('views')('fileHistory').value}`,
`gitlens.${this.name('views')('lineHistory').value}`,
`gitlens.${this.name('views')('repositories').value}`,
`gitlens.${this.name('views')('results').value}`
`gitlens.${this.name('views')('search').value}`
];
}

+ 2
- 2
src/constants.ts Dosyayı Görüntüle

@ -35,10 +35,10 @@ export enum CommandContext {
Key = 'gitlens:key',
ViewsCanCompare = 'gitlens:views:canCompare',
ViewsCanCompareFile = 'gitlens:views:canCompare:file',
ViewsCompareKeepResults = 'gitlens:views:compare:keepResults',
ViewsFileHistoryEditorFollowing = 'gitlens:views:fileHistory:editorFollowing',
ViewsLineHistoryEditorFollowing = 'gitlens:views:lineHistory:editorFollowing',
ViewsRepositoriesAutoRefresh = 'gitlens:views:repositories:autoRefresh',
ViewsResultsKeepResults = 'gitlens:views:results:keepResults',
ViewsSearchKeepResults = 'gitlens:views:search:keepResults'
}
@ -126,7 +126,7 @@ export const ImageMimetypes: { [key: string]: string } = {
};
export enum WorkspaceState {
ViewsCompareKeepResults = 'gitlens:views:compare:keepResults',
ViewsRepositoriesAutoRefresh = 'gitlens:views:repositories:autoRefresh',
ViewsResultsKeepResults = 'gitlens:views:results:keepResults',
ViewsSearchKeepResults = 'gitlens:views:search:keepResults'
}

+ 31
- 24
src/container.ts Dosyayı Görüntüle

@ -11,10 +11,10 @@ import { Keyboard } from './keyboard';
import { StatusBarController } from './statusbar/statusBarController';
import { GitDocumentTracker } from './trackers/gitDocumentTracker';
import { GitLineTracker } from './trackers/gitLineTracker';
import { CompareView } from './views/compareView';
import { FileHistoryView } from './views/fileHistoryView';
import { LineHistoryView } from './views/lineHistoryView';
import { RepositoriesView } from './views/repositoriesView';
import { ResultsView } from './views/resultsView';
import { SearchView } from './views/searchView';
import { ViewCommands } from './views/viewCommands';
import { SettingsEditor } from './webviews/settingsEditor';
@ -41,15 +41,15 @@ export class Container {
context.subscriptions.push((this._settingsEditor = new SettingsEditor()));
context.subscriptions.push((this._welcomeEditor = new WelcomeEditor()));
if (config.views.repositories.enabled) {
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
if (config.views.compare.enabled) {
context.subscriptions.push((this._compareView = new CompareView()));
}
else {
let disposable: Disposable;
disposable = configuration.onDidChange(e => {
if (configuration.changed(e, configuration.name('views')('repositories')('enabled').value)) {
if (configuration.changed(e, configuration.name('views')('compare')('enabled').value)) {
disposable.dispose();
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
context.subscriptions.push((this._compareView = new CompareView()));
}
});
}
@ -80,15 +80,15 @@ export class Container {
});
}
if (config.views.results.enabled) {
context.subscriptions.push((this._resultsView = new ResultsView()));
if (config.views.repositories.enabled) {
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
}
else {
let disposable: Disposable;
disposable = configuration.onDidChange(e => {
if (configuration.changed(e, configuration.name('views')('results')('enabled').value)) {
if (configuration.changed(e, configuration.name('views')('repositories')('enabled').value)) {
disposable.dispose();
context.subscriptions.push((this._resultsView = new ResultsView()));
context.subscriptions.push((this._repositoriesView = new RepositoriesView()));
}
});
}
@ -114,6 +114,15 @@ export class Container {
return this._codeLensController;
}
private static _compareView: CompareView | undefined;
static get compareView() {
if (this._compareView === undefined) {
this._context.subscriptions.push((this._compareView = new CompareView()));
}
return this._compareView;
}
private static _config: Config | undefined;
static get config() {
if (this._config === undefined) {
@ -146,11 +155,6 @@ export class Container {
return this._git;
}
private static _repositoriesView: RepositoriesView | undefined;
static get repositoriesView(): RepositoriesView {
return this._repositoriesView!;
}
private static _keyboard: Keyboard;
static get keyboard() {
return this._keyboard;
@ -180,13 +184,9 @@ export class Container {
return this._lineTracker;
}
private static _resultsView: ResultsView | undefined;
static get resultsView() {
if (this._resultsView === undefined) {
this._context.subscriptions.push((this._resultsView = new ResultsView()));
}
return this._resultsView;
private static _repositoriesView: RepositoriesView | undefined;
static get repositoriesView(): RepositoriesView {
return this._repositoriesView!;
}
private static _searchView: SearchView | undefined;
@ -239,15 +239,22 @@ export class Container {
if (mode.codeLens != null) {
config.codeLens.enabled = mode.codeLens;
}
if (mode.currentLine != null) {
config.currentLine.enabled = mode.currentLine;
}
if (mode.hovers != null) {
config.hovers.enabled = mode.hovers;
}
if (mode.statusBar != null) {
config.statusBar.enabled = mode.statusBar;
}
if (mode.views != null) {
config.views.compare.enabled = mode.views;
}
if (mode.views != null) {
config.views.fileHistory.enabled = mode.views;
}
@ -257,9 +264,9 @@ export class Container {
if (mode.views != null) {
config.views.repositories.enabled = mode.views;
}
// if (mode.views != null) {
// config.views.results.enabled = mode.views;
// }
if (mode.views != null) {
config.views.search.enabled = mode.views;
}
return config;
}

+ 34
- 0
src/extension.ts Dosyayı Görüntüle

@ -152,6 +152,40 @@ async function migrateSettings(context: ExtensionContext, previousVersion: strin
configuration.name('views')('lineHistory')('location').value
);
await configuration.migrate(
'resultsExplorer.files.compact',
configuration.name('views')('compare')('files')('compact').value
);
await configuration.migrate(
'resultsExplorer.files.layout',
configuration.name('views')('compare')('files')('layout').value
);
await configuration.migrate(
'resultsExplorer.files.threshold',
configuration.name('views')('compare')('files')('threshold').value
);
await configuration.migrate(
'resultsExplorer.location',
configuration.name('views')('compare')('location').value
);
await configuration.migrate(
'resultsExplorer.files.compact',
configuration.name('views')('search')('files')('compact').value
);
await configuration.migrate(
'resultsExplorer.files.layout',
configuration.name('views')('search')('files')('layout').value
);
await configuration.migrate(
'resultsExplorer.files.threshold',
configuration.name('views')('search')('files')('threshold').value
);
await configuration.migrate(
'resultsExplorer.location',
configuration.name('views')('search')('location').value
);
await configuration.migrate('explorers.avatars', configuration.name('views')('avatars').value);
await configuration.migrate(
'explorers.commitFileFormat',

+ 3
- 3
src/quickpicks/commitsQuickPick.ts Dosyayı Görüntüle

@ -28,15 +28,15 @@ export class CommitsQuickPick {
options: {
goBackCommand?: CommandQuickPickItem;
showAllCommand?: CommandQuickPickItem;
showInResultsCommand?: CommandQuickPickItem;
showInViewCommand?: CommandQuickPickItem;
}
): Promise<CommitQuickPickItem | CommandQuickPickItem | undefined> {
const items = ((log && [...Iterables.map(log.commits.values(), c => new CommitQuickPickItem(c))]) || [
new MessageQuickPickItem('No results found')
]) as (CommitQuickPickItem | CommandQuickPickItem)[];
if (options.showInResultsCommand !== undefined) {
items.splice(0, 0, options.showInResultsCommand);
if (options.showInViewCommand !== undefined) {
items.splice(0, 0, options.showInViewCommand);
}
if (options.showAllCommand !== undefined) {

+ 2
- 2
src/ui/config.ts Dosyayı Görüntüle

@ -151,11 +151,11 @@ export interface ViewsConfig {
};
commitFileFormat: string;
commitFormat: string;
compare: CompareViewConfig;
// dateFormat: string | null;
defaultItemLimit: number;
lineHistory: LineHistoryViewConfig;
repositories: RepositoriesViewConfig;
results: ResultsViewConfig;
search: SearchViewConfig;
stashFileFormat: string;
stashFormat: string;
@ -233,7 +233,7 @@ export interface RepositoriesViewConfig {
showTrackingBranch: boolean;
}
export interface ResultsViewConfig {
export interface CompareViewConfig {
enabled: boolean;
files: ViewsFilesConfig;
location: 'explorer' | 'gitlens' | 'scm';

+ 106
- 35
src/ui/settings/index.html Dosyayı Görüntüle

@ -314,9 +314,9 @@
<label for="views.repositories.location">Show in the</label>
<select class="setting" id="views.repositories.location" name="views.repositories.location"
disabled>
<option value="gitlens">GitLens view</option>
<option value="explorer">Explorer view</option>
<option value="scm">Source Control view</option>
<option value="gitlens">GitLens side bar</option>
<option value="explorer">Explorer side bar</option>
<option value="scm">Source Control side bar</option>
</select>
</div>
@ -424,9 +424,9 @@
<label for="views.fileHistory.location">Show in the</label>
<select class="setting" id="views.fileHistory.location" name="views.fileHistory.location"
disabled>
<option value="gitlens">GitLens view</option>
<option value="explorer">Explorer view</option>
<option value="scm">Source Control view</option>
<option value="gitlens">GitLens side bar</option>
<option value="explorer">Explorer side bar</option>
<option value="scm">Source Control side bar</option>
</select>
</div>
@ -470,9 +470,9 @@
<label for="views.lineHistory.location">Show in the</label>
<select class="setting" id="views.lineHistory.location" name="views.lineHistory.location"
disabled>
<option value="gitlens">GitLens view</option>
<option value="explorer">Explorer view</option>
<option value="scm">Source Control view</option>
<option value="gitlens">GitLens side bar</option>
<option value="explorer">Explorer side bar</option>
<option value="scm">Source Control side bar</option>
</select>
</div>
@ -492,32 +492,31 @@
</div>
</section>
<section id="results-view">
<section id="compare-view">
<div class="section__header">
<h2 class="section__title">Results view
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/#results-view">
<h2 class="section__title">Compare view
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/#compare-view">
<i class="icon icon__info"></i>
</a>
</h2>
<p class="section__title-hint">
Adds an on-demand Results view to navigate and explore commits, histories, and
searches, or visualize comparisons between branches, tags, commits, and more
Adds a Compare view to visualize comparisons between branches, tags, commits, and more
</p>
</div>
<div class="section__settings">
<div class="settings-group">
<div class="settings-group__setting">
<label for="views.results.location">Show in the</label>
<select class="setting" id="views.results.location" name="views.results.location">
<option value="gitlens">GitLens view</option>
<option value="explorer">Explorer view</option>
<option value="scm">Source Control view</option>
<label for="views.compare.location">Show in the</label>
<select class="setting" id="views.compare.location" name="views.compare.location">
<option value="gitlens">GitLens side bar</option>
<option value="explorer">Explorer side bar</option>
<option value="scm">Source Control side bar</option>
</select>
</div>
<div class="settings-group__setting hidden" data-visibility="settings.mode =advanced">
<label for="views.results.files.layout">Layout files</label>
<select class="setting" id="views.results.files.layout" name="views.results.files.layout">
<label for="views.compare.files.layout">Layout files</label>
<select class="setting" id="views.compare.files.layout" name="views.compare.files.layout">
<option value="auto">automatically</option>
<option value="list">as a list</option>
<option value="tree">as a tree</option>
@ -525,28 +524,28 @@
</div>
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
<input class="setting" id="views.results.files.compact" name="views.results.files.compact"
<input class="setting" id="views.compare.files.compact" name="views.compare.files.compact"
type="checkbox" />
<label for="views.results.files.compact">Use compact layout</label>
<label for="views.compare.files.compact">Use compact layout</label>
</div>
<p class="setting__hint hidden" data-visibility="settings.mode =advanced">
Compacts (flattens) unnecessary nesting when using a tree layouts
</p>
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
<input class="setting" id="views.results.avatars" name="views.avatars" type="checkbox" />
<label for="views.results.avatars">Use author avatars icons</label>
<input class="setting" id="views.compare.avatars" name="views.avatars" type="checkbox" />
<label for="views.compare.avatars">Use author avatars icons</label>
</div>
</div>
<div class="section__preview">
<img class="image__preview hidden" src="{{root}}/images/settings/results-explorer.png"
data-visibility="views.results.files.layout !tree" />
<img class="image__preview hidden" src="{{root}}/images/settings/results-explorer-tree-compact.png"
data-visibility="views.results.files.layout =tree &amp; views.results.files.compact" />
<img class="image__preview hidden" src="{{root}}/images/settings/results-explorer-tree.png"
data-visibility="views.results.files.layout =tree &amp; views.results.files.compact =false" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/results-explorer-avatars.png"
<img class="image__preview hidden" src="{{root}}/images/settings/compare-view.png"
data-visibility="views.compare.files.layout !tree" />
<img class="image__preview hidden" src="{{root}}/images/settings/compare-view-tree-compact.png"
data-visibility="views.compare.files.layout =tree &amp; views.compare.files.compact" />
<img class="image__preview hidden" src="{{root}}/images/settings/compare-view-tree.png"
data-visibility="views.compare.files.layout =tree &amp; views.compare.files.compact =false" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/compare-view-avatars.png"
data-visibility="views.avatars" />
</div>
<p class="settings-group__hint">
@ -555,7 +554,74 @@
<a class="command" title="Open User Settings" href="command:workbench.action.openGlobalSettings">
User Settings
</a>
and search for <b><i>gitlens.views.results</i></b> or <b><i>gitlens.views</i></b>
and search for <b><i>gitlens.views.compare</i></b> or <b><i>gitlens.views</i></b>
</p>
</div>
</section>
<section id="search-commits-view">
<div class="section__header">
<h2 class="section__title">Search Commits view
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/#search-commits-view">
<i class="icon icon__info"></i>
</a>
</h2>
<p class="section__title-hint">
Adds a Search Commits view to search and explore commit histories by message, author, files, id, etc
</p>
</div>
<div class="section__settings">
<div class="settings-group">
<div class="settings-group__setting">
<label for="views.search.location">Show in the</label>
<select class="setting" id="views.search.location" name="views.search.location">
<option value="gitlens">GitLens side bar</option>
<option value="explorer">Explorer side bar</option>
<option value="scm">Source Control side bar</option>
</select>
</div>
<div class="settings-group__setting hidden" data-visibility="settings.mode =advanced">
<label for="views.search.files.layout">Layout files</label>
<select class="setting" id="views.search.files.layout" name="views.search.files.layout">
<option value="auto">automatically</option>
<option value="list">as a list</option>
<option value="tree">as a tree</option>
</select>
</div>
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
<input class="setting" id="views.search.files.compact" name="views.search.files.compact"
type="checkbox" />
<label for="views.search.files.compact">Use compact layout</label>
</div>
<p class="setting__hint hidden" data-visibility="settings.mode =advanced">
Compacts (flattens) unnecessary nesting when using a tree layouts
</p>
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
<input class="setting" id="views.search.avatars" name="views.avatars" type="checkbox" />
<label for="views.search.avatars">Use author avatars icons</label>
</div>
</div>
<div class="section__preview">
<img class="image__preview hidden" src="{{root}}/images/settings/search-view.png"
data-visibility="views.search.files.layout !tree" />
<img class="image__preview hidden" src="{{root}}/images/settings/search-view-tree-compact.png"
data-visibility="views.search.files.layout =tree &amp; views.search.files.compact" />
<img class="image__preview hidden" src="{{root}}/images/settings/search-view-tree.png"
data-visibility="views.search.files.layout =tree &amp; views.search.files.compact =false" />
<img class="image__preview--overlay hidden" src="{{root}}/images/settings/search-view-avatars.png"
data-visibility="views.avatars" />
</div>
<p class="settings-group__hint">
<i class="icon icon--lg icon__info"></i>
For more advanced customizations open
<a class="command" title="Open User Settings" href="command:workbench.action.openGlobalSettings">
User Settings
</a>
and search for <b><i>gitlens.views.search</i></b> or <b><i>gitlens.views</i></b>
</p>
</div>
</section>
@ -1618,8 +1684,13 @@
</a>
</li>
<li>
<a class="jump-to" href="#results-view" title="Jump to Results view settings">
Results view
<a class="jump-to" href="#compare-view" title="Jump to Compare view settings">
Compare view
</a>
</li>
<li>
<a class="jump-to" href="#search-commits-view" title="Jump to Search Commits view settings">
Search Commits view
</a>
</li>
<li>

+ 9
- 4
src/ui/welcome/index.html Dosyayı Görüntüle

@ -118,11 +118,16 @@
current file
</li>
<li>
an on-demand <a title="Open the GitLens docs" href="https://github.com/eamodio/vscode-gitlens/#results-view">
<i>Results</i> view
a <a title="Open the GitLens docs" href="https://github.com/eamodio/vscode-gitlens/#compare-view">
<i>Compare</i> view
</a>
to navigate and explore commits, histories, and searches, or visualize comparisons
between branches, tags, commits, and more
to visualize comparisons between branches, tags, commits, and more
</li>
<li>
a <a title="Open the GitLens docs" href="https://github.com/eamodio/vscode-gitlens/#search-commits-view">
<i>Search Commits</i> view
</a>
to search and explore commit histories by message, author, files, id, etc
</li>
<li>
<a title="Open the GitLens docs" href="https://github.com/eamodio/vscode-gitlens/#code-lens">

src/views/resultsView.ts → src/views/compareView.ts Dosyayı Görüntüle

@ -1,20 +1,20 @@
'use strict';
import { commands, ConfigurationChangeEvent } from 'vscode';
import { configuration, ResultsViewConfig, ViewFilesLayout, ViewsConfig } from '../configuration';
import { CompareViewConfig, configuration, ViewFilesLayout, ViewsConfig } from '../configuration';
import { CommandContext, setCommandContext, WorkspaceState } from '../constants';
import { Container } from '../container';
import { NamedRef, ResultsComparisonNode, ResultsNode, ViewNode } from './nodes';
import { CompareNode, CompareResultsNode, NamedRef, ViewNode } from './nodes';
import { RefreshReason, ViewBase } from './viewBase';
export class ResultsView extends ViewBase<ResultsNode> {
export class CompareView extends ViewBase<CompareNode> {
constructor() {
super('gitlens.views.results');
super('gitlens.views.compare');
setCommandContext(CommandContext.ViewsResultsKeepResults, this.keepResults);
setCommandContext(CommandContext.ViewsCompareKeepResults, this.keepResults);
}
getRoot() {
return new ResultsNode(this);
return new CompareNode(this);
}
protected get location(): string {
@ -54,14 +54,14 @@ export class ResultsView extends ViewBase {
protected onConfigurationChanged(e: ConfigurationChangeEvent) {
if (
!configuration.changed(e, configuration.name('views')('results').value) &&
!configuration.changed(e, configuration.name('views')('compare').value) &&
!configuration.changed(e, configuration.name('views').value) &&
!configuration.changed(e, configuration.name('defaultGravatarsStyle').value)
) {
return;
}
if (configuration.changed(e, configuration.name('views')('results')('location').value)) {
if (configuration.changed(e, configuration.name('views')('compare')('location').value)) {
this.initialize(this.config.location /*, { showCollapseAll: true } */);
}
@ -70,12 +70,12 @@ export class ResultsView extends ViewBase {
}
}
get config(): ViewsConfig & ResultsViewConfig {
return { ...Container.config.views, ...Container.config.views.results };
get config(): ViewsConfig & CompareViewConfig {
return { ...Container.config.views, ...Container.config.views.compare };
}
get keepResults(): boolean {
return Container.context.workspaceState.get<boolean>(WorkspaceState.ViewsResultsKeepResults, false);
return Container.context.workspaceState.get<boolean>(WorkspaceState.ViewsCompareKeepResults, false);
}
clear() {
@ -92,7 +92,7 @@ export class ResultsView extends ViewBase {
compare(repoPath: string, ref1: string | NamedRef, ref2: string | NamedRef) {
return this.addResults(
new ResultsComparisonNode(
new CompareResultsNode(
this,
repoPath,
typeof ref1 === 'string' ? { ref: ref1 } : ref1,
@ -119,16 +119,16 @@ export class ResultsView extends ViewBase {
}
private setFilesLayout(layout: ViewFilesLayout) {
return configuration.updateEffective(configuration.name('views')('results')('files')('layout').value, layout);
return configuration.updateEffective(configuration.name('views')('compare')('files')('layout').value, layout);
}
private setKeepResults(enabled: boolean) {
Container.context.workspaceState.update(WorkspaceState.ViewsResultsKeepResults, enabled);
setCommandContext(CommandContext.ViewsResultsKeepResults, enabled);
Container.context.workspaceState.update(WorkspaceState.ViewsCompareKeepResults, enabled);
setCommandContext(CommandContext.ViewsCompareKeepResults, enabled);
}
private swapComparision(node: ViewNode) {
if (!(node instanceof ResultsComparisonNode)) return;
if (!(node instanceof CompareResultsNode)) return;
node.swap();
}

+ 4
- 4
src/views/nodes.ts Dosyayı Görüntüle

@ -13,17 +13,17 @@ export * from './nodes/remoteNode';
export * from './nodes/remotesNode';
export * from './nodes/repositoriesNode';
export * from './nodes/repositoryNode';
export * from './nodes/compareResultsNode';
export * from './nodes/compareNode';
export * from './nodes/resultsCommitsNode';
export * from './nodes/resultsComparisonNode';
export * from './nodes/resultsNode';
export * from './nodes/resultsFileNode';
export * from './nodes/resultsFilesNode';
export * from './nodes/searchNode';
export * from './nodes/stashesNode';
export * from './nodes/stashFileNode';
export * from './nodes/stashNode';
export * from './nodes/statusFileNode';
export * from './nodes/resultsFileNode';
export * from './nodes/statusFilesNode';
export * from './nodes/resultsFilesNode';
export * from './nodes/statusUpstreamNode';
export * from './nodes/tagsNode';
export * from './nodes/tagNode';

src/views/nodes/resultsNode.ts → src/views/nodes/compareNode.ts Dosyayı Görüntüle

@ -5,7 +5,7 @@ import { CommandContext, GlyphChars, setCommandContext } from '../../constants';
import { GitService } from '../../git/gitService';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../../quickpicks';
import { debug, Functions, gate, log } from '../../system';
import { ResultsView } from '../resultsView';
import { CompareView } from '../compareView';
import { MessageNode } from './common';
import { ComparePickerNode } from './comparePickerNode';
import { NamedRef, ResourceType, unknownGitUri, ViewNode } from './viewNode';
@ -16,11 +16,11 @@ interface RepoRef {
ref: string | NamedRef;
}
export class ResultsNode extends ViewNode<ResultsView> {
export class CompareNode extends ViewNode<CompareView> {
private _children: (ViewNode | MessageNode)[] = [];
private _comparePickerNode: ComparePickerNode | undefined;
constructor(view: ResultsView) {
constructor(view: CompareView) {
super(unknownGitUri, view);
}
@ -51,8 +51,8 @@ export class ResultsNode extends ViewNode {
}
getTreeItem(): TreeItem {
const item = new TreeItem(`Results`, TreeItemCollapsibleState.Expanded);
item.contextValue = ResourceType.Results;
const item = new TreeItem(`Compare`, TreeItemCollapsibleState.Expanded);
item.contextValue = ResourceType.Compare;
return item;
}
@ -160,6 +160,8 @@ export class ResultsNode extends ViewNode {
this._selectedRef = { label: this.getRefName(ref), repoPath: repoPath, ref: ref };
setCommandContext(CommandContext.ViewsCanCompare, true);
await this.view.show();
void (await this.triggerChange());
}

+ 7
- 7
src/views/nodes/comparePickerNode.ts Dosyayı Görüntüle

@ -3,14 +3,14 @@ import { TreeItem, TreeItemCollapsibleState } from 'vscode';
import { GlyphChars } from '../../constants';
import { Container } from '../../container';
import { Strings } from '../../system';
import { ResultsView } from '../resultsView';
import { ResultsNode } from './resultsNode';
import { CompareView } from '../compareView';
import { CompareNode } from './compareNode';
import { ResourceType, unknownGitUri, ViewNode } from './viewNode';
export class ComparePickerNode extends ViewNode<ResultsView> {
export class ComparePickerNode extends ViewNode<CompareView> {
constructor(
view: ResultsView,
protected readonly parent: ResultsNode
view: CompareView,
protected readonly parent: CompareNode
) {
super(unknownGitUri, view, parent);
}
@ -41,7 +41,7 @@ export class ComparePickerNode extends ViewNode {
item.tooltip = `Click to select branch or tag for compare${GlyphChars.Ellipsis}`;
item.command = {
title: `Select branch or tag for compare${GlyphChars.Ellipsis}`,
command: 'gitlens.views.results.selectForCompare'
command: this.view.getQualifiedCommand('selectForCompare')
};
}
else {
@ -53,7 +53,7 @@ export class ComparePickerNode extends ViewNode {
item.tooltip = `Click to compare ${selectedRef.label} to${GlyphChars.Ellipsis}`;
item.command = {
title: `Compare ${selectedRef.label} with${GlyphChars.Ellipsis}`,
command: 'gitlens.views.results.compareWithSelected'
command: this.view.getQualifiedCommand('compareWithSelected')
};
}

src/views/nodes/resultsComparisonNode.ts → src/views/nodes/compareResultsNode.ts Dosyayı Görüntüle

@ -9,7 +9,7 @@ import { CommitsQueryResults, ResultsCommitsNode } from './resultsCommitsNode';
import { ResultsFilesNode } from './resultsFilesNode';
import { NamedRef, ResourceType, ViewNode } from './viewNode';
export class ResultsComparisonNode extends ViewNode {
export class CompareResultsNode extends ViewNode {
constructor(
view: View,
public readonly repoPath: string,
@ -52,7 +52,7 @@ export class ResultsComparisonNode extends ViewNode {
GitService.shortenSha(this._ref2.ref, { working: 'Working Tree' })}${repository}`,
TreeItemCollapsibleState.Expanded
);
item.contextValue = ResourceType.ComparisonResults;
item.contextValue = ResourceType.CompareResults;
return item;
}

+ 1
- 1
src/views/nodes/searchNode.ts Dosyayı Görüntüle

@ -91,7 +91,7 @@ export class SearchNode extends ViewNode {
getTreeItem(): TreeItem {
const item = new TreeItem(`Search`, TreeItemCollapsibleState.Expanded);
item.contextValue = ResourceType.Results;
item.contextValue = ResourceType.Search;
return item;
}

+ 3
- 3
src/views/nodes/viewNode.ts Dosyayı Görüntüle

@ -19,9 +19,10 @@ export enum ResourceType {
CommitOnCurrentBranch = 'gitlens:commit:current',
CommitFile = 'gitlens:file:commit',
Commits = 'gitlens:commits',
Compare = 'gitlens:compare',
ComparePicker = 'gitlens:compare:picker',
ComparePickerWithRef = 'gitlens:compare:picker:ref',
ComparisonResults = 'gitlens:results:comparison',
CompareResults = 'gitlens:compare:results',
FileHistory = 'gitlens:history:file',
FileStaged = 'gitlens:file:staged',
FileStagedAndUnstaged = 'gitlens:file:staged:unstaged',
@ -34,12 +35,11 @@ export enum ResourceType {
Remotes = 'gitlens:remotes',
Repositories = 'gitlens:repositories',
Repository = 'gitlens:repository',
Results = 'gitlens:results',
ResultsCommits = 'gitlens:results:commits',
ResultsFile = 'gitlens:file:results',
ResultsFiles = 'gitlens:results:files',
SearchResults = 'gitlens:results:search',
Search = 'gitlens:search',
SearchResults = 'gitlens:search:results',
Stash = 'gitlens:stash',
StashFile = 'gitlens:file:stash',
Stashes = 'gitlens:stashes',

+ 2
- 2
src/views/viewBase.ts Dosyayı Görüntüle

@ -17,12 +17,12 @@ import { configuration } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';
import { debug, Functions, gate, log } from '../system';
import { CompareView } from './compareView';
import { FileHistoryView } from './fileHistoryView';
import { LineHistoryView } from './lineHistoryView';
import { ViewNode } from './nodes';
import { isPageable } from './nodes/viewNode';
import { RepositoriesView } from './repositoriesView';
import { ResultsView } from './resultsView';
import { SearchView } from './searchView';
import { RefreshNodeCommandArgs } from './viewCommands';
@ -31,7 +31,7 @@ export enum RefreshReason {
VisibilityChanged = 'VisibilityChanged'
}
export type View = RepositoriesView | FileHistoryView | LineHistoryView | ResultsView | SearchView;
export type View = RepositoriesView | FileHistoryView | LineHistoryView | CompareView | SearchView;
export interface TreeViewNodeStateChangeEvent<T> extends TreeViewExpansionEvent<T> {
state: TreeItemCollapsibleState;

+ 6
- 6
src/views/viewCommands.ts Dosyayı Görüntüle

@ -163,19 +163,19 @@ export class ViewCommands implements Disposable {
private compareWithHead(node: ViewNode) {
if (!(node instanceof ViewRefNode)) return;
return Container.resultsView.compare(node.repoPath, node.ref, 'HEAD');
return Container.compareView.compare(node.repoPath, node.ref, 'HEAD');
}
private compareWithRemote(node: BranchNode) {
if (!node.branch.tracking) return;
return Container.resultsView.compare(node.repoPath, node.branch.tracking, node.ref);
return Container.compareView.compare(node.repoPath, node.branch.tracking, node.ref);
}
private compareWithWorking(node: ViewNode) {
if (!(node instanceof ViewRefNode)) return;
return Container.resultsView.compare(node.repoPath, node.ref, '');
return Container.compareView.compare(node.repoPath, node.ref, '');
}
private async compareAncestryWithWorking(node: BranchNode) {
@ -185,7 +185,7 @@ export class ViewCommands implements Disposable {
const commonAncestor = await Container.git.getMergeBase(node.repoPath, branch.ref, node.ref);
if (commonAncestor === undefined) return;
return Container.resultsView.compare(
return Container.compareView.compare(
node.repoPath,
{ ref: commonAncestor, label: `ancestry with ${node.ref} (${GitService.shortenSha(commonAncestor)})` },
''
@ -195,13 +195,13 @@ export class ViewCommands implements Disposable {
private compareWithSelected(node: ViewNode) {
if (!(node instanceof ViewRefNode)) return;
Container.resultsView.compareWithSelected(node.repoPath, node.ref);
Container.compareView.compareWithSelected(node.repoPath, node.ref);
}
private selectForCompare(node: ViewNode) {
if (!(node instanceof ViewRefNode)) return;
Container.resultsView.selectForCompare(node.repoPath, node.ref);
Container.compareView.selectForCompare(node.repoPath, node.ref);
}
private compareFileWithSelected(node: ViewNode) {

Yükleniyor…
İptal
Kaydet