Przeglądaj źródła

Adds branch compare visiblity view setting

main
Eric Amodio 5 lat temu
rodzic
commit
67dcc69c27
6 zmienionych plików z 62 dodań i 17 usunięć
  1. +13
    -0
      CHANGELOG.md
  2. +24
    -16
      README.md
  3. +6
    -0
      package.json
  4. +1
    -0
      src/config.ts
  5. +1
    -1
      src/views/nodes/repositoryNode.ts
  6. +17
    -0
      src/webviews/apps/settings/index.html

+ 13
- 0
CHANGELOG.md Wyświetl plik

@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
## Added
- Adds a new _Compare Current Branch with..._ node to each repository in the _Repositories_ view — closes [#293](https://github.com/eamodio/vscode-gitlens/issues/293)
- **Compare Current Branch with...** — optionally shows a comparison of the current branch to a user-selected reference
- **\* Commits** — lists the commits between the compared revisions
- Expands to provide the message, author, date, and change indicator of each revision (commit)
- Each revision (commit) expands to list its set of changed files, complete with status indicators for adds, changes, renames, and deletes
- An inline toolbar provides quick access to the _Open File_, _Copy Commit ID to Clipboard_ (`alt-click` for _Copy Commit Message to Clipboard_), and _Open File on Remote_ (if available) commands
- A context menu provides access to more common file revision commands
- **\* Files Changed** — lists all of the files changed between the compared revisions
- Adds a `gitlens.views.repositories.showBranchComparison` setting to specify whether to show a comparison of the current branch to a user-selected reference in the _Repositories_ view
## [9.7.4] - 2019-05-15
## Added

+ 24
- 16
README.md Wyświetl plik

@ -282,6 +282,13 @@ The repositories view provides the following features,
- **\* Files Changed** — lists all the "working" changes
- Expands to a file-based view of all changed files in the working tree ([optionally](#repositories-view-settings- 'Jump to the Repositories view settings')) and/or all files in all commits ahead of the upstream
- An inline toolbar provides quick access to the _Stash All Changes_ command
- **Compare Current Branch with...** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows a comparison of the current branch to a user-selected reference
- **\* Commits** — lists the commits between the compared revisions
- Expands to provide the message, author, date, and change indicator of each revision (commit) — fully [customizable](#view-settings- 'Jump to the View settings')
- Each revision (commit) expands to list its set of changed files, complete with status indicators for adds, changes, renames, and deletes
- An inline toolbar provides quick access to the _Open File_, _Copy Commit ID to Clipboard_ (`alt-click` for _Copy Commit Message to Clipboard_), and _Open File on Remote_ (if available) commands
- A context menu provides access to more common file revision commands
- **\* Files Changed** — lists all of the files changed between the compared revisions
- **Branches** — lists the local branches in the repository
@ -461,12 +468,12 @@ The compare view provides the following features,
- Provides a semi-persistent results view for comparison operations
- An inline toolbar provides quick access to the _Swap Comparison_, _Pin Comparison_ (when applicable), _Unpin Comparison_ (when applicable), _Refresh_, and _Dismiss_ commands
- A context menu provides access to common comparison commands
- **\* Commits** — lists the commits between the compared revisions (branches or commits)
- **\* Commits** — lists the commits between the compared revisions
- Expands to provide the message, author, date, and change indicator of each revision (commit) — fully [customizable](#view-settings- 'Jump to the View settings')
- Each revision (commit) expands to list its set of changed files, complete with status indicators for adds, changes, renames, and deletes
- An inline toolbar provides quick access to the _Open File_, _Copy Commit ID to Clipboard_ (`alt-click` for _Copy Commit Message to Clipboard_), and _Open File on Remote_ (if available) commands
- A context menu provides access to more common file revision commands
- **\* Files Changed** — lists all of the files changed between the compared revisions (branches or commits)
- **\* Files Changed** — lists all of the files changed between the compared revisions
- Expands to a file-based view of all changed files in the working tree ([optionally](#compare-view-settings- 'Jump to the Compare view settings')) and/or all files in all commits ahead of the upstream
- Results can be provided by the following commands
- _Compare with Remote_ command (`gitlens.views.compareWithRemote`)
@ -760,20 +767,21 @@ GitLens is highly customizable and provides many configuration settings to allow
See also [View Settings](#view-settings- 'Jump to the View settings')
| Name | Description |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.repositories.avatars` | Specifies whether to show avatar images instead of commit (or status) icons in the _Repositories_ view |
| `gitlens.views.repositories.autoRefresh` | Specifies whether to automatically refresh the _Repositories_ view when the repository or the file system changes |
| `gitlens.views.repositories.autoReveal` | Specifies whether to automatically reveal repositories in the _Repositories_ view when opening files |
| `gitlens.views.repositories.branches.layout` | Specifies how the _Repositories_ view will display branches<br /><br />`list` - displays branches as a list<br />`tree` - displays branches as a tree when branch names contain slashes `/` |
| `gitlens.views.repositories.compact` | Specifies whether to show the _Repositories_ view in a compact display density |
| `gitlens.views.repositories.enabled` | Specifies whether to show the _Repositories_ view |
| `gitlens.views.repositories.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `tree` or `auto` |
| `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files<br /><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. Only applies when `gitlens.views.repositories.files.layout` is set to `auto` |
| `gitlens.views.repositories.includeWorkingTree` | Specifies whether to include working tree file status for each repository in the _Repositories_ view |
| `gitlens.views.repositories.location` | Specifies where to show the _Repositories_ view<br /><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 |
| Name | Description |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.views.repositories.avatars` | Specifies whether to show avatar images instead of commit (or status) icons in the _Repositories_ view |
| `gitlens.views.repositories.autoRefresh` | Specifies whether to automatically refresh the _Repositories_ view when the repository or the file system changes |
| `gitlens.views.repositories.autoReveal` | Specifies whether to automatically reveal repositories in the _Repositories_ view when opening files |
| `gitlens.views.repositories.branches.layout` | Specifies how the _Repositories_ view will display branches<br /><br />`list` - displays branches as a list<br />`tree` - displays branches as a tree when branch names contain slashes `/` |
| `gitlens.views.repositories.compact` | Specifies whether to show the _Repositories_ view in a compact display density |
| `gitlens.views.repositories.enabled` | Specifies whether to show the _Repositories_ view |
| `gitlens.views.repositories.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `tree` or `auto` |
| `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files<br /><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. Only applies when `gitlens.views.repositories.files.layout` is set to `auto` |
| `gitlens.views.repositories.includeWorkingTree` | Specifies whether to include working tree file status for each repository in the _Repositories_ view |
| `gitlens.views.repositories.location` | Specifies where to show the _Repositories_ view<br /><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.showBranchComparison` | Specifies whether to show a comparison of the current branch to a user-selected reference in the _Repositories_ view |
| `gitlens.views.repositories.showTrackingBranch` | Specifies whether to show the tracking branch when displaying local branches in the _Repositories_ view |
### File History View Settings [#](#file-history-view-settings- 'File History View Settings')

+ 6
- 0
package.json Wyświetl plik

@ -1519,6 +1519,12 @@
"markdownDescription": "Specifies where to show the _Repositories_ view",
"scope": "window"
},
"gitlens.views.repositories.showBranchComparison": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to show a comparison of the current branch to a user-selected reference in the _Repositories_ view",
"scope": "window"
},
"gitlens.views.repositories.showTrackingBranch": {
"type": "boolean",
"default": true,

+ 1
- 0
src/config.ts Wyświetl plik

@ -363,6 +363,7 @@ export interface RepositoriesViewConfig {
files: ViewsFilesConfig;
includeWorkingTree: boolean;
location: ViewLocation;
showBranchComparison: boolean;
showTrackingBranch: boolean;
}

+ 1
- 1
src/views/nodes/repositoryNode.ts Wyświetl plik

@ -75,7 +75,7 @@ export class RepositoryNode extends SubscribeableViewNode {
children.push(new StatusFilesNode(this.view, this, status, range));
}
if (Container.config.insiders) {
if (this.view.config.showBranchComparison) {
children.push(new CompareBranchNode(this.uri, this.view, this, branch));
}

+ 17
- 0
src/webviews/apps/settings/index.html Wyświetl plik

@ -2445,6 +2445,23 @@
data-enablement="views.repositories.enabled"
data-visibility="settings.mode =advanced"
>
<input
class="setting"
id="views.repositories.showBranchComparison"
name="views.repositories.showBranchComparison"
type="checkbox"
disabled
/>
<label for="views.repositories.showBranchComparison"
>Show a comparison of the current branch to a user-selected reference</label
>
</div>
<div
class="settings-group__setting ml-2 hidden"
data-enablement="views.repositories.enabled"
data-visibility="settings.mode =advanced"
>
<label for="views.repositories.branches.layout">Layout branches</label>
<select
class="setting"

Ładowanie…
Anuluj
Zapisz