Compare commits
110 Commits
v4.5.0-bet
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3684629c9b | |||
|
|
65a3b31ca5 | ||
|
|
4694fbc1ae | ||
|
|
b56d101f76 | ||
|
|
ce9394297d | ||
|
|
4d18bf708d | ||
|
|
c44e4c6968 | ||
|
|
c5f57172e4 | ||
|
|
dd0a636e24 | ||
|
|
393ec351f0 | ||
|
|
99d6da9c90 | ||
|
|
0eb202b8ae | ||
|
|
65736a6ce7 | ||
|
|
ed42eba8b8 | ||
|
|
2245d82319 | ||
|
|
f7df845dfe | ||
|
|
712544fab8 | ||
|
|
a114e2de87 | ||
|
|
70071448d6 | ||
|
|
a10376385a | ||
|
|
41d25803d8 | ||
|
|
3802b43027 | ||
|
|
04ea3b7971 | ||
|
|
6d7f44e091 | ||
|
|
3a1caa2e0d | ||
|
|
3f7058bd48 | ||
|
|
71d17bcc2f | ||
|
|
a69afdb6ef | ||
|
|
26c6346b84 | ||
|
|
3a17605017 | ||
|
|
2c9a26e47b | ||
|
|
1c7785fd52 | ||
|
|
079f7b7f36 | ||
|
|
bedc1a05f5 | ||
|
|
858d9ec578 | ||
|
|
2809991096 | ||
|
|
f6019454b6 | ||
|
|
f0bdf3e2c3 | ||
|
|
0fdf856c27 | ||
|
|
aacf7cc2b5 | ||
|
|
11eacb27a1 | ||
|
|
543d39246f | ||
|
|
6837414f22 | ||
|
|
ea6fdbaaf2 | ||
|
|
ccc29e3dfc | ||
|
|
48814d4213 | ||
|
|
c3dd83cf3c | ||
|
|
77482f4930 | ||
|
|
503b2a3785 | ||
|
|
9464f7e79f | ||
|
|
77ae37c54c | ||
|
|
e20ec552b7 | ||
|
|
f911447c5e | ||
|
|
38c44c808d | ||
|
|
655afb358e | ||
|
|
21e0963600 | ||
|
|
62580da702 | ||
|
|
6b97c107eb | ||
|
|
92b57580b8 | ||
|
|
e400f27c84 | ||
|
|
4221e06ae3 | ||
|
|
a2dc65c044 | ||
|
|
4102bdd471 | ||
|
|
d420d82ab2 | ||
|
|
260874fa1d | ||
|
|
9d83fbcacb | ||
|
|
a50f04c569 | ||
|
|
df0599a832 | ||
|
|
f05d236e79 | ||
|
|
1b7610857a | ||
|
|
04d2c00ebf | ||
|
|
ece34dba32 | ||
|
|
68fcbf713d | ||
|
|
e192c547b1 | ||
|
|
3835193118 | ||
|
|
d161084ccd | ||
|
|
b9c4468cf7 | ||
|
|
4bacb6fbff | ||
|
|
c98755cc87 | ||
|
|
6d759daaad | ||
|
|
5a42ce4ed4 | ||
|
|
a5af318269 | ||
|
|
5a2bd02402 | ||
|
|
2bba14260f | ||
|
|
22378d5f25 | ||
|
|
d1d1db18e2 | ||
|
|
3dab90709b | ||
|
|
f58d085352 | ||
|
|
a77bb36ee3 | ||
|
|
5cc9365fa1 | ||
|
|
a587108cab | ||
|
|
1b4350e476 | ||
|
|
586785cfb8 | ||
|
|
04df931902 | ||
|
|
d31eb25451 | ||
|
|
35b16a78ba | ||
|
|
825b9661fb | ||
|
|
9782a81e46 | ||
|
|
ed58dc3b49 | ||
|
|
480dcb95fb | ||
|
|
ef41176ea7 | ||
|
|
bcd83566a1 | ||
|
|
ca089777db | ||
|
|
a255eea949 | ||
|
|
1ffb42a090 | ||
|
|
bc2f1b192a | ||
|
|
7d99624068 | ||
|
|
c258d04381 | ||
|
|
4c4926c8b5 | ||
|
|
6255b26fd2 |
190
CHANGELOG.md
@@ -4,6 +4,171 @@ 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/).
|
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [5.3.0] - 2017-09-26
|
||||||
|
### Added
|
||||||
|
- Adds new file layouts to the `GitLens` custom view
|
||||||
|
- `auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.gitExplorer.files.threshold` setting and the number of files at each nesting level
|
||||||
|
- `list` - displays files as a list
|
||||||
|
- `tree` - displays files as a tree
|
||||||
|
- Adds `gitlens.gitExplorer.files.layout` setting to specify how the `GitLens` custom view will display files
|
||||||
|
- Adds `gitlens.gitExplorer.files.compact` setting to specify whether or not to compact (flatten) unnecessary file nesting in the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.files.threshold` setting to specify when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the `GitLens` custom view
|
||||||
|
- Adds `${directory}` token to the file formatting settings
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Changes `${path}` token to be the full file path in the file formatting settings
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixes [#153](https://github.com/eamodio/vscode-gitlens/issues/153) - New folders treated as files in "Changed Files" section of the sidebar component
|
||||||
|
|
||||||
|
## [5.2.0] - 2017-09-23
|
||||||
|
### Added
|
||||||
|
- Adds new `Changed Files` node to the `Repository Status` node of the `GitLens` custom view's `Repository View` -- closes [#139](https://github.com/eamodio/vscode-gitlens/issues/139)
|
||||||
|
- Provides a at-a-glance view of all "working" changes
|
||||||
|
- Expands to a file-based view of all changed files in the working tree (enabled via `"gitlens.insiders": true`) and/or all files in all commits ahead of the upstream
|
||||||
|
- Adds optional (on by default) working tree status information to the `Repository Status` node in the `GitLens` custom view
|
||||||
|
- Adds `auto` value to `gitlens.gitExplorer.view` setting - closes [#150](https://github.com/eamodio/vscode-gitlens/issues/150)
|
||||||
|
- Adds `gitlens.gitExplorer.enabled` setting to specify whether or not to show the `GitLens` custom view - closes [#144](https://github.com/eamodio/vscode-gitlens/issues/144)
|
||||||
|
- Adds `gitlens.gitExplorer.includeWorkingTree` setting to specify whether or not to include working tree files inside the `Repository Status` node of the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.statusFileFormat` setting to the format of the status of a working or committed file in the `GitLens` custom view
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Changes the sorting (now alphabetical) of files shown in the `GitLens` custom view
|
||||||
|
- Changes the default of the `gitlens.gitExplorer.view` setting to `auto`
|
||||||
|
- Changes the default of the `gitlens.gitExplorer.commitFormat` setting to add parentheses around the commit id
|
||||||
|
- Removes many menu items from `editor/title` & `editor/title/context` by default -- can be re-enabled via the `gitlens.advanced.menus` setting
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixes [#146](https://github.com/eamodio/vscode-gitlens/issues/146) - Blame gutter annotation issue when commit contains emoji
|
||||||
|
- Fixes an issue when running `Open File in Remote` with a multi-line selection wasn't properly opening the selection in GitLab -- thanks to [PR #145](https://github.com/eamodio/vscode-gitlens/pull/145) by Amanda Cameron ([@AmandaCameron](https://github.com/AmandaCameron))!
|
||||||
|
- Fixes an issue where the `gitlens.advanced.menus` setting wasn't controlling all the menu items properly
|
||||||
|
|
||||||
|
## [5.1.0] - 2017-09-15
|
||||||
|
### Added
|
||||||
|
- Adds full (multi-line) commit message to the `details` hover annotations -- closes [#116](https://github.com/eamodio/vscode-gitlens/issues/116)
|
||||||
|
- Adds an external link icon to the `details` hover annotations to run the `Open Commit in Remote` command (`gitlens.openCommitInRemote`)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Optimizes performance of the providing blame annotations, especially for large files (saw a ~78% improvement on some files)
|
||||||
|
- Optimizes date handling (parsing and formatting) for better performance and reduced memory consumption
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Removes `gitlens.annotations.file.recentChanges.hover.wholeLine` setting as it didn't really make sense
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixes an issue where stashes with only untracked files would not show in the `Stashes` node of the GitLens custom view
|
||||||
|
- Fixes an issue where stashes with untracked files would not show its untracked files in the GitLens custom view
|
||||||
|
|
||||||
|
## [5.0.0] - 2017-09-12
|
||||||
|
### Added
|
||||||
|
- Adds an all-new `GitLens` custom view to the Explorer activity
|
||||||
|
|
||||||
|
- `Repository View` - provides a full repository explorer
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- `Repository Status` node — provides the status of the repository
|
||||||
|
- Provides the name of the current branch, its upstream tracking branch (if available), and its upstream status (if available)
|
||||||
|
- Provides indicator dots on the repository icon which denote the following:
|
||||||
|
- `None` - up-to-date with the upstream
|
||||||
|
- `Green` - ahead of the upstream
|
||||||
|
- `Red` - behind the upstream
|
||||||
|
- `Yellow` - both ahead of and behind the upstream
|
||||||
|
- Provides additional nodes, if the current branch is not synchronized with the upstream, to quickly see and explore the specific commits ahead and/or behind the upstream
|
||||||
|
- Provides a context menu with `Open Repository in Remote`, and `Refresh` commands
|
||||||
|
|
||||||
|
- `Branches` node — provides a list of the local branches
|
||||||
|
- Indicates which branch is the current branch and optionally shows the remote tracking branch
|
||||||
|
- Expand each branch to easily see its revision (commit) history
|
||||||
|
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, `Show File History`, and `Show Commit File Details` commands
|
||||||
|
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `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`, and `Refresh` commands
|
||||||
|
- Provides a context menu on each branch with `Open Branch in Remote`, and `Refresh` commands
|
||||||
|
- Provides a context menu with `Open Branches in Remote`, and `Refresh` commands
|
||||||
|
|
||||||
|
- `Remotes` node — provides a list of remotes
|
||||||
|
- Indicates the direction of the remote (fetch, push, both), remote service (if applicable), and repository path
|
||||||
|
- Expand each remote to see its list of branches
|
||||||
|
- Expand each branch to easily see its revision (commit) history
|
||||||
|
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, and `Show Commit File Details` commands
|
||||||
|
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `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`, and `Refresh` commands
|
||||||
|
- Provides a context menu on each remote with `Open Branches in Remote`, `Open Repository in Remote`, and `Refresh` commands
|
||||||
|
- Provides a context menu with a `Refresh` command
|
||||||
|
|
||||||
|
- `Stashes` node — provides a list of stashed changes
|
||||||
|
- Expand each stash to quickly see the set of files stashed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|
- Provides a context menu with `Stash Changes`, and `Refresh` commands
|
||||||
|
- Provides a context menu on each stash with `Apply Stashed Changes` (confirmation required), `Delete Stashed Changes` (confirmation required), `Open All Changes`, `Open All Changes with Working Tree`, `Open Files`, `Open Revisions`, `Copy Commit Message to Clipboard`, and `Refresh` commands
|
||||||
|
- Provides a context menu on each stashed file with `Apply Changes`, `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, and `Show File History` commands
|
||||||
|
|
||||||
|
- `History View` - provides the revision history of the active file
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- Automatically updates to track the active editor
|
||||||
|
- Provides a context menu with `Open File`, `Open File in Remote`, and `Refresh` commands
|
||||||
|
- Provides a context menu on each revision (commit) with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, and `Show Commit File Details` commands
|
||||||
|
|
||||||
|
- Quickly switch between views using the `Switch to Repository View` or `Switch to History View` commands
|
||||||
|
- Provides toolbar commands to `Search Commits`, `Switch to Repository View` or `Switch to History View`, and `Refresh`
|
||||||
|
|
||||||
|
- Adds all-new interactivity to the hover annotations
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- Adds the following command-links to the `details` hover annotation
|
||||||
|
- Clicking the commit id will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
|
- Adds the following command-links to the `changes` hover annotation
|
||||||
|
- Clicking on `Changes` will run the `Compare File Revisions` command (`gitlens.diffWith`)
|
||||||
|
- Clicking the current and previous commit ids will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
|
|
||||||
|
- Adds support for remote services with custom domains -- closes [#120](https://github.com/eamodio/vscode-gitlens/issues/120)
|
||||||
|
- Adds support for the Bitbucket Server (previously called Stash) remote service -- closes [#120](https://github.com/eamodio/vscode-gitlens/issues/120)
|
||||||
|
- Adds `gitlens.blame.ignoreWhitespace` setting to specify whether or not to ignore whitespace when comparing revisions during blame operations -- closes [#138](https://github.com/eamodio/vscode-gitlens/issues/138)
|
||||||
|
- Adds `Compare File Revisions` command (`gitlens.diffWith`) - compares the specified file revisions
|
||||||
|
- Adds `Open Branches in Remote` command (`gitlens.openBranchesInRemote`) - opens the branches in the supported remote service
|
||||||
|
- Adds `Stash Changes` command (`gitlens.stashSave`) to the source control group context menu -- can now stash a group of files
|
||||||
|
- Adds `Stash Changes` command (`gitlens.stashSave`) to the source control resource context menu -- can now stash individual files (works with multi-select too!)
|
||||||
|
- Adds `gitlens.gitExplorer.view` setting to specify the starting view (mode) of the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.showTrackingBranch` setting to specify whether or not to show the tracking branch when displaying local branches in the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.commitFormat` setting to specify the format of committed changes in the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.commitFileFormat` setting to specify the format of a committed file in the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.stashFormat` setting to specify the format of stashed changes in the `GitLens` custom view
|
||||||
|
- Adds `gitlens.gitExplorer.stashFileFormat` setting to specify the format of a stashed file in the `GitLens` custom view
|
||||||
|
- Adds `${filePath}` token to file formatting settings
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Changes `Show Stashed Changes` option icon in repository status quick pick menu to match the `GitLens` custom view
|
||||||
|
- Changes `Stash Changes` option icon in stashed changes quick pick menu to a plus (+)
|
||||||
|
- Renames `Compare File with Previous` command (`gitlens.diffWithPrevious`) to `Compare File with Previous Revision`
|
||||||
|
- Renames `Compare File with Next Commit` command (`gitlens.diffWithNext`) to `Compare File with Next Revision`
|
||||||
|
- Renames `Compare File with Working Tree` command (`gitlens.diffWithWorking`) to `Compare File with Working Revision`
|
||||||
|
- Renames `Compare Line Commit with Previous` command (`gitlens.diffLineWithPrevious`) to `Compare Line Revision with Previous`
|
||||||
|
- Renames `Compare Line Commit with Working Tree` command (`gitlens.diffLineWithWorking`) to `Compare Line Revision with Working`
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Removes `Git Stashes` custom view view - as it's functionality has been folded into the new `GitLens` custom view
|
||||||
|
- Removes `gitlens.stashExplorer.stashFormat` setting
|
||||||
|
- Removes `gitlens.stashExplorer.stashFileFormat` setting
|
||||||
|
- Removes `Stash Unstaged Changes` option from stashed changes quick pick menu -- didn't work as intended
|
||||||
|
- Removes the seeding of the commit search command from the clipboard
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixes an issue where double hover annotations could be shown on blank lines
|
||||||
|
- Fixes an issue where remote branches couldn't be opened properly in their remote service
|
||||||
|
- Fixes [#130](https://github.com/eamodio/vscode-gitlens/issues/130) - First-run "Thank you for choosing GitLens! [...]" info message shown on every start up
|
||||||
|
- Fixes an issue where sometimes diffs (via branch name) wouldn't open properly
|
||||||
|
- Fixes an issue where remotes are queried more than once on startup
|
||||||
|
|
||||||
|
## [4.4.3] - 2017-08-30
|
||||||
|
## Fixed
|
||||||
|
- Fixes [#135](https://github.com/eamodio/vscode-gitlens/issues/135) - Full-width characters break gutter annotations (really this time)
|
||||||
|
|
||||||
|
## [4.4.2] - 2017-08-29
|
||||||
|
## Fixed
|
||||||
|
- Fixes [#135](https://github.com/eamodio/vscode-gitlens/issues/135) - Full-width characters break gutter annotations
|
||||||
|
|
||||||
## [4.4.1] - 2017-08-23
|
## [4.4.1] - 2017-08-23
|
||||||
## Fixed
|
## Fixed
|
||||||
- Fixes [#114](https://github.com/eamodio/vscode-gitlens/issues/114) - Stylus files makes code lens freak out
|
- Fixes [#114](https://github.com/eamodio/vscode-gitlens/issues/114) - Stylus files makes code lens freak out
|
||||||
@@ -21,7 +186,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
## Removed
|
## Removed
|
||||||
- Removes unneeded `gitlens.stashExplorer.enabled` configuration setting since users can add or remove custom views natively now
|
- Removes unneeded `gitlens.stashExplorer.enabled` configuration setting since users can add or remove custom views natively now
|
||||||
- Removes unneeded `Toggle Git Stashed Explorer` command (`gitlens.stashExplorer.toggle`) since users can add or remove custom views natively now
|
- Removes unneeded `Toggle Git Stashes Explorer` command (`gitlens.stashExplorer.toggle`) since users can add or remove custom views natively now
|
||||||
- Removes the `gitlens.theme.annotations.file.hover.separateLines` configuration setting
|
- Removes the `gitlens.theme.annotations.file.hover.separateLines` configuration setting
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
@@ -43,21 +208,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
## [4.3.1] - 2017-07-03
|
## [4.3.1] - 2017-07-03
|
||||||
## Added
|
## Added
|
||||||
- Adds `gitlens.stashExplorer.enabled` setting to specify whether or not to show the `Git Stashes` explorer
|
- Adds `gitlens.stashExplorer.enabled` setting to specify whether or not to show the `Git Stashes` custom view
|
||||||
- Adds `Toggle Git Stashed Explorer` command (`gitlens.stashExplorer.toggle`) - toggles the `Git Stashes` explorer on and off
|
- Adds `Toggle Git Stashes Explorer` command (`gitlens.stashExplorer.toggle`) - toggles the `Git Stashes` custom view on and off
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
- Hides the `Git Stashes` explorer by default
|
- Hides the `Git Stashes` custom view by default
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
- Fixes [#108](https://github.com/eamodio/vscode-gitlens/issues/108) - Option to remove stash explorer from the main explorer?
|
- Fixes [#108](https://github.com/eamodio/vscode-gitlens/issues/108) - Option to remove stash explorer from the main explorer?
|
||||||
|
|
||||||
## [4.3.0] - 2017-07-03
|
## [4.3.0] - 2017-07-03
|
||||||
## Added
|
## Added
|
||||||
- Adds `Git Stashes` view to the Explorer activity
|
- Adds `Git Stashes` custom view to the Explorer activity
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- Shows all of the stashed changes in the repository
|
- Shows all of the stashed changes in the repository
|
||||||
- Provides toolbar buttons to `Stash Changes` and `Refresh`
|
- Provides toolbar buttons to `Stash Changes` and `Refresh`
|
||||||
- Provides a context menu with `Apply Stashed Changes` and `Delete Stashed Changes` commands - both require a confirmation
|
- Provides a context menu with `Apply Stashed Changes` and `Delete Stashed Changes` commands - both require a confirmation
|
||||||
@@ -66,7 +228,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
## [4.2.0] - 2017-06-27
|
## [4.2.0] - 2017-06-27
|
||||||
## Added
|
## Added
|
||||||
- Adds `Compare File with Revision...` command (`gitlens.diffWithRevision`) - compare the active file with the selected revision of the same file
|
- Adds `Compare File with Revision...` command (`gitlens.diffWithRevision`) - compares the active file with the selected revision of the same file
|
||||||
- Adds `Open Changed Files` command (`gitlens.openChangedFiles`) to the source control group context menu
|
- Adds `Open Changed Files` command (`gitlens.openChangedFiles`) to the source control group context menu
|
||||||
- Adds `Close Unchanged Files` command (`gitlens.closeUnchangedFiles`) to the source control group context menu
|
- Adds `Close Unchanged Files` command (`gitlens.closeUnchangedFiles`) to the source control group context menu
|
||||||
- Adds `Open File in Remote` command (`gitlens.openFileInRemote`) to the source control resource context menu
|
- Adds `Open File in Remote` command (`gitlens.openFileInRemote`) to the source control resource context menu
|
||||||
@@ -120,7 +282,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixes excessive memory usage when parsing diffs
|
- Fixes excessive memory usage when parsing diffs
|
||||||
- Fixes extra newline in multiline commit messages
|
- Fixes extra newline in multi-line commit messages
|
||||||
- Fixes (again) [#33](https://github.com/eamodio/vscode-gitlens/issues/33) - Commit messages can causes markdown formatting in hovers
|
- Fixes (again) [#33](https://github.com/eamodio/vscode-gitlens/issues/33) - Commit messages can causes markdown formatting in hovers
|
||||||
|
|
||||||
## [4.0.1] - 2017-06-09
|
## [4.0.1] - 2017-06-09
|
||||||
@@ -204,7 +366,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
### Added
|
### Added
|
||||||
- Improves performance
|
- Improves performance
|
||||||
- Reduces the number of git calls on known "untrackables"
|
- Reduces the number of git calls on known "untrackables"
|
||||||
- Caches many more git commands to reduce git command roundtrips and parsing
|
- Caches many more git commands to reduce git command round-trips and parsing
|
||||||
- Increases the debounce (delay) on cursor movement to reduce lag when navigating around a file
|
- Increases the debounce (delay) on cursor movement to reduce lag when navigating around a file
|
||||||
- Adds diff information (the line's previous version) into the active line hover when the current line is uncommitted
|
- Adds diff information (the line's previous version) into the active line hover when the current line is uncommitted
|
||||||
- Adds `gitlens.statusBar.alignment` settings to control the alignment of the status bar -- thanks to [PR #72](https://github.com/eamodio/vscode-gitlens/pull/72) by Zack Schuster ([@zackschuster](https://github.com/zackschuster))!
|
- Adds `gitlens.statusBar.alignment` settings to control the alignment of the status bar -- thanks to [PR #72](https://github.com/eamodio/vscode-gitlens/pull/72) by Zack Schuster ([@zackschuster](https://github.com/zackschuster))!
|
||||||
@@ -395,7 +557,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fixes issue with `gitlens.diffWithPrevious` command execution via code lens when the code lens was not at the document/file level
|
- Fixes issue with `gitlens.diffWithPrevious` command execution via code lens when the code lens was not at the document/file level
|
||||||
- Fixes issue where full shas were displayed on the file/blame history explorers
|
- Fixes issue where full shas were displayed on the file/blame history explorers
|
||||||
- Fixes [#30](https://github.com/eamodio/vscode-gitlens/issues/30) - Diff with Working Tree fails from repo/commit quickpick list if file was renamed (and the commit was before the rename)
|
- Fixes [#30](https://github.com/eamodio/vscode-gitlens/issues/30) - Diff with Working Tree fails from repo/commit quick pick list if file was renamed (and the commit was before the rename)
|
||||||
- Fixes various other quick pick menu command issues when a file was renamed
|
- Fixes various other quick pick menu command issues when a file was renamed
|
||||||
- Fixes various issues when caching is disabled
|
- Fixes various issues when caching is disabled
|
||||||
- Fixes issues with parsing commits history
|
- Fixes issues with parsing commits history
|
||||||
@@ -498,7 +660,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
## [2.9.0]
|
## [2.9.0]
|
||||||
### Changed
|
### Changed
|
||||||
- To accomodate the realization that blame information is invalid when a file has unsaved changes, the following behavior changes have been made
|
- To accommodate the realization that blame information is invalid when a file has unsaved changes, the following behavior changes have been made
|
||||||
- Status bar blame information will hide
|
- Status bar blame information will hide
|
||||||
- Code lens change to a `Cannot determine...` message and become unclickable
|
- Code lens change to a `Cannot determine...` message and become unclickable
|
||||||
- Many menu choices and commands will hide
|
- Many menu choices and commands will hide
|
||||||
@@ -536,7 +698,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixes [#34](https://github.com/eamodio/vscode-gitlens/issues/34) - Open file should open the selected version of the file
|
- Fixes [#34](https://github.com/eamodio/vscode-gitlens/issues/34) - Open file should open the selected version of the file
|
||||||
- Fixes some issue where some editors opened by the quickpick would not be opened in preview tabs
|
- Fixes some issue where some editors opened by the quick pick would not be opened in preview tabs
|
||||||
- Fixes issue where copy to clipboard commands would fail if there was no active editor
|
- Fixes issue where copy to clipboard commands would fail if there was no active editor
|
||||||
- Fixes issue where active line annotations would show for opened versioned files
|
- Fixes issue where active line annotations would show for opened versioned files
|
||||||
- Fixes issue where code lens compare commands on opened versioned files would fail
|
- Fixes issue where code lens compare commands on opened versioned files would fail
|
||||||
|
|||||||
46
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at eamodio@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
|
|
||||||
|
[homepage]: http://contributor-covenant.org
|
||||||
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
800
README.md
@@ -1,361 +1,439 @@
|
|||||||
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
||||||
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
||||||
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
[](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
|
||||||
[](https://join.slack.com/t/vscode-gitlens/shared_invite/MjIxOTgxNDE3NzM0LTE1MDE2Nzk1MTgtMjkwMmZjMzcxNQ)
|
[](https://join.slack.com/t/vscode-dev-community/shared_invite/enQtMjIxOTgxNDE3NzM0LWU5M2ZiZDU1YjBlMzdlZjA2YjBjYzRhYTM5NTgzMTAxMjdiNWU0ZmQzYWI3MWU5N2Q1YjBiYmQ4MzY0NDE1MzY)
|
||||||
|
|
||||||
# GitLens
|
# GitLens
|
||||||
|
|
||||||
GitLens **supercharges** the built-in Visual Studio Code Git capabilities. It helps you to **visualize code authorship** at a glance via Git blame annotations and code lens, **seamlessly navigate and explore** the history of a file or branch, **gain valuable insights** via powerful comparison commands, and so much more.
|
GitLens **supercharges** the built-in Visual Studio Code Git capabilities. It helps you to **visualize code authorship** at a glance via Git blame annotations and code lens, **seamlessly navigate and explore** the history of a file or branch, **gain valuable insights** via powerful comparison commands, and so much more.
|
||||||
|
|
||||||
GitLens provides an unobtrusive blame annotation at the end of the current line, a status bar item showing the commit information (author and date, by default) of the current line, code lens showing the most recent commit and # of authors of the file and/or code block, and many commands for exploring commits and histories, comparing and navigating revisions, stash access, repository status, and more. GitLens is also [highly customizable](#extension-settings) to meet your specific needs — find code lens intrusive or the current line blame annotation distracting — no problem, it is easy to [turn them off or change how they behave](#extension-settings).
|
GitLens provides an unobtrusive blame annotation at the end of the current line, a status bar item showing the commit information (author and date, by default) of the current line, code lens showing the most recent commit and # of authors of the file and/or code block, and many commands for exploring commits and histories, comparing and navigating revisions, stash access, repository status, and more. GitLens is also [highly customizable](#extension-settings) to meet your specific needs — find code lens intrusive or the current line blame annotation distracting — no problem, it is easy to [turn them off or change how they behave](#extension-settings).
|
||||||
|
|
||||||
### Preview — featuring blame annotations, code lens, status bar details, quick pick menus for navigation and exploration, compare with previous, and more
|
### Preview — featuring blame annotations, code lens, status bar details, quick pick menus for navigation and exploration, compare with previous, and more
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
### Git Blame Annotations
|
### Git Blame Annotations
|
||||||
|
|
||||||
- Adds an unobtrusive, highly [customizable](#line-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotation** to the end of the current line ([optional](#line-blame-annotation-settings), on by default)
|
- Adds an unobtrusive, highly [customizable](#line-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotation** to the end of the current line ([optional](#line-blame-annotation-settings), on by default)
|
||||||
|
|
||||||

|

|
||||||
- Contains the author, date, and message of the line's most recent commit, by [default](#line-blame-annotation-settings)
|
- Contains the author, date, and message of the line's most recent commit, by [default](#line-blame-annotation-settings)
|
||||||
- Adds a `details` hover annotation to the current line annotation, which provides more commit details ([optional](#line-blame-annotation-settings), on by default)
|
- Adds a `details` hover annotation to the current line annotation, which provides more commit details ([optional](#line-blame-annotation-settings), on by default)
|
||||||
- Adds a `changes` (diff) hover annotation to the current line annotation, which provides **instant** access to the line's previous version ([optional](#line-blame-annotation-settings), on by default)
|
- Clicking the commit id will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
|
- Adds a `changes` (diff) hover annotation to the current line annotation, which provides **instant** access to the line's previous version ([optional](#line-blame-annotation-settings), on by default)
|
||||||

|
- Clicking on `Changes` will run the `Compare File Revisions` command (`gitlens.diffWith`)
|
||||||
|
- Clicking the current and previous commit ids will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
- Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotations** of the whole file
|
- Clicking on external link icon will run the the `Open Commit in Remote` command (`gitlens.openCommitInRemote`)
|
||||||
|
|
||||||

|

|
||||||
- Choose between `gutter` (default) and `hover` [annotation styles](#file-blame-annotation-settings)
|
|
||||||
- Contains the commit message and date, by [default](#file-blame-annotation-settings)
|
- Adds on-demand, beautiful, highly [customizable](#file-blame-annotation-settings) and [themeable](#theme-settings), **Git blame annotations** of the whole file
|
||||||
- Adds a `details` hover annotation to the line's annotation, which provides more commit details ([optional](#file-blame-annotation-settings), on by default)
|
|
||||||
- Adds a `heatmap` (age) indicator to the gutter annotations (on right edge by [default](#file-blame-annotation-settings)), which provides an easy, at-a-glance way to tell the age of a line ([optional](#file-blame-annotation-settings), on by default)
|

|
||||||
- Indicator ranges from bright yellow (newer) to dark brown (older)
|
- Choose between `gutter` (default) and `hover` [annotation styles](#file-blame-annotation-settings)
|
||||||
- Press `Escape` to quickly toggle the annotations off
|
- Contains the commit message and date, by [default](#file-blame-annotation-settings)
|
||||||
|
- Adds a `details` hover annotation to the line's annotation, which provides more commit details ([optional](#file-blame-annotation-settings), on by default)
|
||||||
- Adds [customizable](#status-bar-settings) **blame information** about the current line to the **status bar** ([optional](#status-bar-settings), on by default)
|
- Clicking the commit id will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
|
- Adds a `heatmap` (age) indicator to the gutter annotations (on right edge by [default](#file-blame-annotation-settings)), which provides an easy, at-a-glance way to tell the age of a line ([optional](#file-blame-annotation-settings), on by default)
|
||||||

|
- Indicator ranges from bright yellow (newer) to dark brown (older)
|
||||||
- Contains the commit author and date, by [default](#status-bar-settings)
|
- Press `Escape` to quickly toggle the annotations off
|
||||||
- Clicking the status bar item will, by [default](#status-bar-settings), show a **commit details quick pick menu** with commands for comparing, navigating and exploring commits, and more
|
|
||||||
- Provides [customizable](#status-bar-settings) click behavior — choose between one of the following
|
- Adds [customizable](#status-bar-settings) **blame information** about the current line to the **status bar** ([optional](#status-bar-settings), on by default)
|
||||||
- Toggle file blame annotations on and off
|
|
||||||
- Toggle code lens on and off
|

|
||||||
- Compare the line commit with the previous commit
|
- Contains the commit author and date, by [default](#status-bar-settings)
|
||||||
- Compare the line commit with the working tree
|
- Clicking the status bar item will, by [default](#status-bar-settings), show a **commit details quick pick menu** with commands for comparing, navigating and exploring commits, and more
|
||||||
- Show a quick pick menu with details and commands for the commit (default)
|
- Provides [customizable](#status-bar-settings) click behavior — choose between one of the following
|
||||||
- Show a quick pick menu with file details and commands for the commit
|
- Toggle file blame annotations on and off
|
||||||
- Show a quick pick menu with the commit history of the file
|
- Toggle code lens on and off
|
||||||
- Show a quick pick menu with the commit history of the current branch
|
- Compare the line commit with the previous commit
|
||||||
|
- Compare the line commit with the working tree
|
||||||
- Adds a `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`) with a shortcut of `alt+b` to toggle the file blame annotations on and off
|
- Show a quick pick menu with details and commands for the commit (default)
|
||||||
- Also adds a `Show File Blame Annotations` command (`gitlens.showFileBlame`)
|
- Show a quick pick menu with file details and commands for the commit
|
||||||
|
- Show a quick pick menu with the commit history of the file
|
||||||
- Adds a `Toggle Line Blame Annotations` command (`gitlens.toggleLineBlame`) to toggle the current line blame annotations on and off
|
- Show a quick pick menu with the commit history of the current branch
|
||||||
- Also adds a `Show Line Blame Annotations` command (`gitlens.showLineBlame`)
|
|
||||||
|
- Adds a `Toggle File Blame Annotations` command (`gitlens.toggleFileBlame`) with a shortcut of `alt+b` to toggle the file blame annotations on and off
|
||||||
### Git Recent Changes Annotations
|
- Also adds a `Show File Blame Annotations` command (`gitlens.showFileBlame`)
|
||||||
|
|
||||||
- Adds on-demand, [customizable](#file-recent-changes-annotation-settings) and [themeable](#theme-settings), **recent changes annotations** of the whole file
|
- Adds a `Toggle Line Blame Annotations` command (`gitlens.toggleLineBlame`) to toggle the current line blame annotations on and off
|
||||||
- Highlights all of lines changed in the most recent commit
|
- Also adds a `Show Line Blame Annotations` command (`gitlens.showLineBlame`)
|
||||||
- Adds a `details` hover annotation to each line, which provides more commit details ([optional](#file-blame-annotation-settings), on by default)
|
|
||||||
- Adds a `changes` (diff) hover annotation to each line, which provides **instant** access to the line's previous version ([optional](#file-recent-changes-annotation-settings), on by default)
|
### Git Recent Changes Annotations
|
||||||
- Press `Escape` to quickly toggle the annotations off
|
|
||||||
|
- Adds on-demand, [customizable](#file-recent-changes-annotation-settings) and [themeable](#theme-settings), **recent changes annotations** of the whole file
|
||||||
- Adds `Toggle Recent File Changes Annotations` command (`gitlens.toggleFileRecentChanges`) to toggle the recent changes annotations on and off
|
- Highlights all of lines changed in the most recent commit
|
||||||
|
- Adds a `details` hover annotation to each line, which provides more commit details ([optional](#file-blame-annotation-settings), on by default)
|
||||||
### Git Code Lens
|
- Clicking the commit id will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||
|
- Adds a `changes` (diff) hover annotation to each line, which provides **instant** access to the line's previous version ([optional](#file-recent-changes-annotation-settings), on by default)
|
||||||
- Adds **code lens** to the top of the file and on code blocks ([optional](#code-lens-settings), on by default)
|
- Clicking on `Changes` will run the `Compare File Revisions` command (`gitlens.diffWith`)
|
||||||
|
- Clicking the current and previous commit ids will run the `Show Commit Details` command (`gitlens.showQuickCommitDetails`)
|
||||||

|
- Press `Escape` to quickly toggle the annotations off
|
||||||
- **Recent Change** — author and date of the most recent commit for the file or code block
|
|
||||||
- Clicking the code lens will, by [default](#code-lens-settings), show a **commit file details quick pick menu** with commands for comparing, navigating and exploring commits, and more
|
- Adds `Toggle Recent File Changes Annotations` command (`gitlens.toggleFileRecentChanges`) to toggle the recent changes annotations on and off
|
||||||
- **Authors** — number of authors of the file or code block and the most prominent author (if there is more than one)
|
|
||||||
- Clicking the code lens will, by [default](#code-lens-settings), toggle the file Git blame annotations on and off of the whole file
|
### Git Code Lens
|
||||||
- Will be hidden if the author of the most recent commit is also the only author of the file or block, to avoid duplicate information and reduce visual noise
|
|
||||||
|
- Adds **code lens** to the top of the file and on code blocks ([optional](#code-lens-settings), on by default)
|
||||||
- Provides [customizable](#code-lens-settings) click behavior for each code lens — choose between one of the following
|
|
||||||
- Toggle file blame annotations on and off
|

|
||||||
- Compare the commit with the previous commit
|
- **Recent Change** — author and date of the most recent commit for the file or code block
|
||||||
- Show a quick pick menu with details and commands for the commit
|
- Clicking the code lens will, by [default](#code-lens-settings), show a **commit file details quick pick menu** with commands for comparing, navigating and exploring commits, and more
|
||||||
- Show a quick pick menu with file details and commands for the commit
|
- **Authors** — number of authors of the file or code block and the most prominent author (if there is more than one)
|
||||||
- Show a quick pick menu with the commit history of the file
|
- Clicking the code lens will, by [default](#code-lens-settings), toggle the file Git blame annotations on and off of the whole file
|
||||||
- Show a quick pick menu with the commit history of the current branch
|
- Will be hidden if the author of the most recent commit is also the only author of the file or block, to avoid duplicate information and reduce visual noise
|
||||||
|
|
||||||
- Adds a `Toggle Git Code Lens` command (`gitlens.toggleCodeLens`) with a shortcut of `shift+alt+b` to toggle the code lens on and off
|
- Provides [customizable](#code-lens-settings) click behavior for each code lens — choose between one of the following
|
||||||
|
- Toggle file blame annotations on and off
|
||||||
### Powerful Comparison Tools
|
- Compare the commit with the previous commit
|
||||||
|
- Show a quick pick menu with details and commands for the commit
|
||||||
- Effortlessly navigate between comparisons via the `alt+,` and `alt+.` shortcut keys to go back and forth through a file's revisions
|
- Show a quick pick menu with file details and commands for the commit
|
||||||
|
- Show a quick pick menu with the commit history of the file
|
||||||
- Provides easy access to the following comparison commands via the `Command Palette` as well as in context via the many provided quick pick menus
|
- Show a quick pick menu with the commit history of the current branch
|
||||||
|
|
||||||
- Adds a `Directory Compare` command (`gitlens.diffDirectory`) to open the configured Git difftool to compare directories between branches
|
- Adds a `Toggle Git Code Lens` command (`gitlens.toggleCodeLens`) with a shortcut of `shift+alt+b` to toggle the code lens on and off
|
||||||
|
|
||||||
- Adds a `Compare File with Branch...` command (`gitlens.diffWithBranch`) to compare the active file with the same file on the selected branch
|
### Powerful Comparison Tools
|
||||||
|
|
||||||
- Adds a `Compare File with Next Commit` command (`gitlens.diffWithNext`) with a shortcut of `alt+.` to compare the active file/diff with the next commit revision
|
- Effortlessly navigate between comparisons via the `alt+,` and `alt+.` shortcut keys to go back and forth through a file's revisions
|
||||||
|
|
||||||
- Adds a `Compare File with Previous` command (`gitlens.diffWithPrevious`) with a shortcut of `alt+,` to compare the active file/diff with the previous commit revision
|
- Provides easy access to the following comparison commands via the `Command Palette` as well as in context via the many provided quick pick menus
|
||||||
|
|
||||||
- Adds a `Compare Line Commit with Previous` command (`gitlens.diffLineWithPrevious`) with a shortcut of `shift+alt+,` to compare the active file/diff with the previous line commit revision
|
- Adds a `Directory Compare` command (`gitlens.diffDirectory`) to open the configured Git difftool to compare directories between branches
|
||||||
|
|
||||||
- Adds a `Compare File with Revision...` command (`gitlens.diffWithRevision`) to compare the active file with the selected revision of the same file
|
- Adds a `Compare File with Branch...` command (`gitlens.diffWithBranch`) to compare the active file with the same file on the selected branch
|
||||||
|
|
||||||
- Adds a `Compare File with Working Tree` command (`gitlens.diffWithWorking`) with a shortcut of `shift+alt+w` to compare the most recent commit revision of the active file/diff with the working tree
|
- Adds a `Compare File with Next Revision` command (`gitlens.diffWithNext`) with a shortcut of `alt+.` to compare the active file/diff with the next commit revision
|
||||||
|
|
||||||
- Adds a `Compare Line Commit with Working Tree` command (`gitlens.diffLineWithWorking`) with a shortcut of `alt+w` to compare the commit revision of the active line with the working tree
|
- Adds a `Compare File with Previous Revision` command (`gitlens.diffWithPrevious`) with a shortcut of `alt+,` to compare the active file/diff with the previous commit revision
|
||||||
|
|
||||||
### Navigate and Explore
|
- Adds a `Compare Line Revision with Previous` command (`gitlens.diffLineWithPrevious`) with a shortcut of `shift+alt+,` to compare the active file/diff with the previous line commit revision
|
||||||
|
|
||||||
- Adds a `Git Stashes` explorer to the Explorer activity ([optional](#git-stashes-explorer-settings), off by default)
|
- Adds a `Compare File with Revision...` command (`gitlens.diffWithRevision`) to compare the active file with the selected revision of the same file
|
||||||
|
|
||||||

|
- Adds a `Compare File with Working Revision` command (`gitlens.diffWithWorking`) with a shortcut of `shift+alt+w` to compare the most recent commit revision of the active file/diff with the working tree
|
||||||
|
|
||||||
- Shows all of the stashed changes in the repository
|
- Adds a `Compare Line Revision with Working` command (`gitlens.diffLineWithWorking`) with a shortcut of `alt+w` to compare the commit revision of the active line with the working tree
|
||||||
- Provides toolbar buttons to `Stash Changes` and `Refresh`
|
|
||||||
- Provides a context menu with `Apply Stashed Changes` and `Delete Stashed Changes` commands — both require a confirmation
|
### Navigate and Explore
|
||||||
- Expand each stash to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
|
||||||
- Provides a context menu with `Open Changes`, `Open File`, `Open Stashed File`, `Open File in Remote`, and `Compare File with Working Tree` commands
|
- Adds a [customizable](#gitlens-custom-view-settings) `GitLens` custom view to the Explorer activity
|
||||||
|
|
||||||
- Adds a `Search Commits` command (`gitlens.showCommitSearch`) with a shortcut of `alt+/` to search for commits by message, author, file(s), or commit id
|
- `Repository View` - provides a full repository explorer
|
||||||
|
|
||||||
- Adds commands to open files, commits, branches, and the repository in the supported remote services, currently **BitBucket, GitHub, GitLab, and Visual Studio Team Services** — only available if a Git upstream service is configured in the repository
|

|
||||||
- `Open Branch in Remote` command (`gitlens.openBranchInRemote`) — opens the current branch commits in the supported remote service
|
|
||||||
- `Open Commit in Remote` command (`gitlens.openCommitInRemote`) — opens the commit revision of the active line in the supported remote service
|
- `Repository Status` node — provides the status of the repository
|
||||||
- `Open File in Remote` command (`gitlens.openFileInRemote`) — opens the active file/revision in the supported remote service
|
- Provides the name of the current branch, [optionally](#gitlens-custom-view-settings) its working tree status, and its upstream tracking branch and status (if available)
|
||||||
- `Open Repository in Remote` command (`gitlens.openRepoInRemote`) — opens the repository in the supported remote service
|
- Provides indicator dots on the repository icon which denote the following:
|
||||||
|
- `None` - up-to-date with the upstream
|
||||||
- Adds a `Show Current Branch History` command (`gitlens.showQuickRepoHistory`) with a shortcut of `shift+alt+h` to show a paged **branch history quick pick menu** of the current branch for exploring its commit history
|
- `Green` - ahead of the upstream
|
||||||
|
- `Red` - behind the upstream
|
||||||

|
- `Yellow` - both ahead of and behind the upstream
|
||||||
|
- Provides additional upstream status nodes, if the current branch is tracking a remote branch and
|
||||||
- Provides entries to `Show Commit Search` and `Open Branch in <remote-service>` when available
|
- is behind the upstream — quickly see and explore the specific commits behind the upstream (i.e. commits that haven't been pulled)
|
||||||
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
- is ahead of the upstream — quickly see and explore the specific commits ahead of the upstream (i.e. commits that haven't been pushed)
|
||||||
- Navigate pages via `alt+,` and `alt+.` to go backward and forward respectively
|
- `Changed Files` node — provides a at-a-glance view of all "working" changes
|
||||||
|
- Expands to a file-based view of all changed files in the working tree ([optionally](#gitlens-custom-view-settings)) and/or all files in all commits ahead of the upstream
|
||||||
- Adds a `Show Branch History` command (`gitlens.showQuickBranchHistory`) to show a paged **branch history quick pick menu** of the selected branch for exploring its commit history
|
- Provides a context menu with `Open Repository in Remote`, and `Refresh` commands
|
||||||
- Provides the same features as `Show Current Branch History` above
|
|
||||||
|
- `Branches` node — provides a list of the local branches
|
||||||
- Adds a `Show File History` command (`gitlens.showQuickFileHistory`) to show a paged **file history quick pick menu** of the active file for exploring its commit history
|
- Indicates which branch is the current branch and [optionally](#gitlens-custom-view-settings) shows the remote tracking branch
|
||||||
|
- Expand each branch to easily see its revision (commit) history
|
||||||

|
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, and `Show Commit File Details` commands
|
||||||
- Provides entries to `Show Branch History` and `Open File in <remote-service>` when available
|
|
||||||
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `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`, and `Refresh` commands
|
||||||
- Navigate pages via `alt+,` and `alt+.` to go backward and forward respectively
|
- Provides a context menu on each branch with `Open Branch in Remote`, and `Refresh` commands
|
||||||
|
- Provides a context menu with `Open Branches in Remote`, and `Refresh` commands
|
||||||
- Adds a `Show Commit Details` command (`gitlens.showQuickCommitDetails`) to show a **commit details quick pick menu** of the most recent commit of the active file
|
|
||||||
|
- `Remotes` node — provides a list of remotes
|
||||||

|
- Indicates the direction of the remote (fetch, push, both), remote service (if applicable), and repository path
|
||||||
|
- Expand each remote to see its list of branches
|
||||||
- Quickly see the set of files changed in the commit, complete with status indicators for adds, changes, renames, and deletes
|
- Expand each branch to easily see its revision (commit) history
|
||||||
- Provides entries to `Copy to Clipboard`, `Directory Compare`, `Open Changed Files`, `Open File in <remote-service>` when available, and more
|
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, `Show File History`, and `Show Commit File Details` commands
|
||||||
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `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`, and `Refresh` commands
|
||||||
- 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
|
- Provides a context menu on each remote with `Open Branches in Remote`, `Open Repository in Remote`, and `Refresh` commands
|
||||||
|
- Provides a context menu with a `Refresh` command
|
||||||
- Adds a `Show Commit File Details` command (`gitlens.showQuickCommitFileDetails`) with a shortcut of `alt+c` to show a **file commit details quick pick menu** of the most recent commit of the active file
|
|
||||||
|
- `Stashes` node — provides a list of stashed changes
|
||||||

|
- Expand each stash to quickly see the set of files stashed, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|
- Provides a context menu with `Stash Changes`, and `Refresh` commands
|
||||||
- Provides entries to `Show Commit Details`, `Show File History`, `Compare File with...`, `Copy to Clipboard`, `Open File`, `Open File in <remote-service>` when available, and more
|
- Provides a context menu on each stash with `Apply Stashed Changes` (confirmation required), `Delete Stashed Changes` (confirmation required), `Open All Changes`, `Open All Changes with Working Tree`, `Open Files`, `Open Revisions`, `Copy Commit Message to Clipboard`, and `Refresh` commands
|
||||||
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
- Provides a context menu on each stashed file with `Apply Changes`, `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, and `Show File History` commands
|
||||||
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
|
||||||
|
- `History View` - provides the revision history of the active file
|
||||||
- Adds a `Show Repository Status` command (`gitlens.showQuickRepoStatus`) with a shortcut of `alt+s` to show a **repository status quick pick menu** for visualizing the current repository status
|
|
||||||
|

|
||||||

|
|
||||||
|
- Automatically updates to track the active editor
|
||||||
- Quickly see upstream status (if an Git upstream is configured) — complete with ahead and behind information
|
- Provides a context menu with `Open File`, `Open File in Remote`, and `Refresh` commands
|
||||||
- If you are ahead of the upstream, an entry will be shown with the number of commits ahead. Choosing it will show a limited **branch history quick pick menu** containing just the commits ahead of the upstream
|
- Provides a context menu on each revision (commit) with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, and `Show Commit File Details` commands
|
||||||
- If you are behind the upstream, an entry will be shown with the number of commits behind. Choosing it will show a limited **branch history quick pick menu** containing just the commits behind the upstream
|
|
||||||
- Quickly see all working changes, both staged and unstaged, complete with status indicators for adds, changes, renames, and deletes
|
- Quickly switch between views using the `Switch to Repository View` or `Switch to History View` commands
|
||||||
- Provides entries to `Show Stashed Changes`, `Open Changed Files`, and `Close Unchanged Files`
|
- Provides toolbar commands to `Search Commits`, `Switch to Repository View` or `Switch to History View`, and `Refresh`
|
||||||
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
|
||||||
- Use the `alt+right arrow` shortcut on a file entry in the `Staged Files` or `Unstaged Files` sections to preview the comparison of the working file with the previous revision
|
- Adds a `Search Commits` command (`gitlens.showCommitSearch`) with a shortcut of `alt+/` to search for commits by message, author, file(s), or commit id
|
||||||
|
|
||||||
- Adds a `Show Stashed Changes` command (`gitlens.showQuickStashList`) to show a **stashed changes quick pick menu** for exploring your repository stash history
|
- Adds commands to open files, commits, branches, and the repository in the supported remote services, currently **BitBucket, GitHub, GitLab, and Visual Studio Team Services** — only available if a Git upstream service is configured in the repository
|
||||||
|
- Also supports [remote services with custom domains](#custom-remotes-settings), such as **BitBucket, Bitbucket Server (previously called Stash), GitHub, GitHub Enterprise, GitLab**
|
||||||

|
- `Open Branches in Remote` command (`gitlens.openBranchesInRemote`) — opens the branches in the supported remote service
|
||||||
|
- `Open Branch in Remote` command (`gitlens.openBranchInRemote`) — opens the current branch commits in the supported remote service
|
||||||
- Provides entries to `Stash Changes`
|
- `Open Commit in Remote` command (`gitlens.openCommitInRemote`) — opens the commit revision of the active line in the supported remote service
|
||||||
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
- `Open File in Remote` command (`gitlens.openFileInRemote`) — opens the active file/revision in the supported remote service
|
||||||
|
- `Open Repository in Remote` command (`gitlens.openRepoInRemote`) — opens the repository in the supported remote service
|
||||||
- Choosing a stash entry shows a **stash details quick pick menu** which is very similar to the **commit details quick pick menu** above
|
|
||||||
|
- Adds a `Show Current Branch History` command (`gitlens.showQuickRepoHistory`) with a shortcut of `shift+alt+h` to show a paged **branch history quick pick menu** of the current branch for exploring its commit history
|
||||||

|
|
||||||
|

|
||||||
- Quickly see the set of files changed in the stash, complete with status indicators for adds, changes, renames, and deletes
|
|
||||||
- Provides entries to `Copy Message to Clipboard`, `Directory Compare`, and `Open Changed Files`
|
- Provides entries to `Show Commit Search` and `Open Branch in <remote-service>` when available
|
||||||
- Provides entries to `Apply Stashed Changes` and `Delete Stashed Changes` — both require a confirmation
|
- Navigate back to the previous quick pick menu via `alt+left arrow`, if 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
|
||||||
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-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
|
- Adds a `Show Branch History` command (`gitlens.showQuickBranchHistory`) to show a paged **branch history quick pick menu** of the selected branch for exploring its commit history
|
||||||
|
- Provides the same features as `Show Current Branch History` above
|
||||||
- Adds a `Show Last Opened Quick Pick` command (`gitlens.showLastQuickPick`) with a shortcut of `alt+-` to quickly get back to where you were when the last GitLens quick pick menu closed
|
|
||||||
|
- Adds a `Show File History` command (`gitlens.showQuickFileHistory`) to show a paged **file history quick pick menu** of the active file for exploring its commit history
|
||||||
- Adds a `Open File History Explorer` command (`gitlens.showFileHistory`) to show a **file history explorer** (peek style) to visualize the history of a file
|
|
||||||
- Likely to be deprecated in a future release, add your voice to [#66](https://github.com/eamodio/vscode-gitlens/issues/66) if you feel it should not be removed
|

|
||||||
|
|
||||||
- Adds a `Open Blame History Explorer` command (`gitlens.showBlameHistory`) to show a **blame history explorer** (peek style) to visualize the blame history of a file or code block
|
- Provides entries to `Show Branch History` and `Open File in <remote-service>` when available
|
||||||
- Likely to be deprecated in a future release, add your voice to [#66](https://github.com/eamodio/vscode-gitlens/issues/66) if you feel it should not be removed
|
- 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
|
||||||
### And More
|
|
||||||
|
- Adds a `Show Commit Details` command (`gitlens.showQuickCommitDetails`) to show a **commit details quick pick menu** of the most recent commit of the active file
|
||||||
- Adds a `Copy Commit ID to Clipboard` command (`gitlens.copyShaToClipboard`) to copy the commit id (sha) of the active line to the clipboard or from the most recent commit to the current branch, if there is no active editor
|
|
||||||
|

|
||||||
- Adds a `Copy Commit Message to Clipboard` command (`gitlens.copyMessageToClipboard`) to copy the commit message of the active line to the clipboard or from the most recent commit to the current branch, if there is no active editor
|
|
||||||
|
- Quickly see the set of files changed in the commit, complete with status indicators for adds, changes, renames, and deletes
|
||||||
- Adds a `Open Changed Files` command (`gitlens.openChangedFiles`) to open any files with working tree changes
|
- Provides entries to `Copy to Clipboard`, `Directory Compare`, `Open Changed Files`, `Open File in <remote-service>` when available, and more
|
||||||
|
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
||||||
- Adds a `Close Unchanged Files` command (`gitlens.closeUnchangedFiles`) to close any files without working tree changes
|
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-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
|
||||||
- Adds a `Apply Stashed Changes` command (`gitlens.stashApply`) to chose a stash entry to apply to the working tree from a quick pick menu
|
|
||||||
|
- Adds a `Show Commit File Details` command (`gitlens.showQuickCommitFileDetails`) with a shortcut of `alt+c` to show a **file commit details quick pick menu** of the most recent commit of the active file
|
||||||
- Adds a `Stash Changes` command (`gitlens.stashSave`) to save any working tree changes to the stash — can optionally provide a stash message
|
|
||||||
|

|
||||||
## Insiders
|
|
||||||
|
- Provides entries to `Show Commit Details`, `Show File History`, `Compare File with...`, `Copy to Clipboard`, `Open File`, `Open File in <remote-service>` when available, and more
|
||||||
Add [`"gitlens.insiders": true`](#general-extension-settings) to your settings to join the insiders channel and get early access to upcoming features. Be aware that because this provides early access expect there to be issues.
|
- 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 — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
||||||
## Extension Settings
|
|
||||||
|
- Adds a `Show Repository Status` command (`gitlens.showQuickRepoStatus`) with a shortcut of `alt+s` to show a **repository status quick pick menu** for visualizing the current repository status
|
||||||
GitLens is highly customizable and provides many configuration settings to allow the personalization of almost all features
|
|
||||||
|

|
||||||
### General Settings
|
|
||||||
|
- Quickly see upstream status (if an Git upstream is configured) — complete with ahead and behind information
|
||||||
|Name | Description
|
- If you are ahead of the upstream, an entry will be shown with the number of commits ahead. Choosing it will show a limited **branch history quick pick menu** containing just the commits ahead of the upstream
|
||||||
|-----|------------
|
- If you are behind the upstream, an entry will be shown with the number of commits behind. Choosing it will show a limited **branch history quick pick menu** containing just the commits behind the upstream
|
||||||
|`gitlens.defaultDateFormat`|Specifies how all absolute dates will be formatted by default\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats
|
- Quickly see all working changes, both staged and unstaged, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|`gitlens.insiders`|Opts into the insiders channel -- provides access to upcoming features
|
- Provides entries to `Show Stashed Changes`, `Open Changed Files`, and `Close Unchanged Files`
|
||||||
|`gitlens.outputLevel`|Specifies how much (if any) output will be sent to the GitLens output channel
|
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
||||||
|
- Use the `alt+right arrow` shortcut on a file entry in the `Staged Files` or `Unstaged Files` sections to preview the comparison of the working file with the previous revision
|
||||||
### Blame Annotation Settings
|
|
||||||
|
- Adds a `Show Stashed Changes` command (`gitlens.showQuickStashList`) to show a **stashed changes quick pick menu** for exploring your repository stash history
|
||||||
#### File Blame Annotation Settings
|
|
||||||
|

|
||||||
|Name | Description
|
|
||||||
|-----|------------
|
- Provides entries to `Stash Changes`
|
||||||
|`gitlens.blame.file.annotationType`|Specifies the type of blame annotations that will be shown for the current file<br />`gutter` - adds an annotation to the beginning of each line<br />`hover` - shows annotations when hovering over each line
|
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
||||||
|`gitlens.blame.file.lineHighlight.enabled`|Specifies whether or not to highlight lines associated with the current line
|
|
||||||
|`gitlens.blame.file.lineHighlight.locations`|Specifies where the associated line highlights will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
|
- Choosing a stash entry shows a **stash details quick pick menu** which is very similar to the **commit details quick pick menu** above
|
||||||
|`gitlens.annotations.file.gutter.format`|Specifies the format of the gutter blame annotations<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.annotations.file.gutter.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
|
||||||
|`gitlens.annotations.file.gutter.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|

|
||||||
|`gitlens.annotations.file.gutter.compact`|Specifies whether or not to compact (deduplicate) matching adjacent gutter blame annotations
|
|
||||||
|`gitlens.annotations.file.gutter.heatmap.enabled`|Specifies whether or not to provide a heatmap indicator in the gutter blame annotations
|
- Quickly see the set of files changed in the stash, complete with status indicators for adds, changes, renames, and deletes
|
||||||
|`gitlens.annotations.file.gutter.heatmap.location`|Specifies where the heatmap indicators will be shown in the gutter blame annotations<br />`left` - adds a heatmap indicator on the left edge of the gutter blame annotations<br />`right` - adds a heatmap indicator on the right edge of the gutter blame annotations
|
- Provides entries to `Copy Message to Clipboard`, `Directory Compare`, and `Open Changed Files`
|
||||||
|`gitlens.annotations.file.gutter.hover.details`|Specifies whether or not to provide a commit details hover annotation over the gutter blame annotations
|
- Provides entries to `Apply Stashed Changes` and `Delete Stashed Changes` — both require a confirmation
|
||||||
|`gitlens.annotations.file.gutter.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
- Navigate back to the previous quick pick menu via `alt+left arrow`, if available
|
||||||
|`gitlens.annotations.file.hover.heatmap.enabled`|Specifies whether or not to provide heatmap indicators on the left edge of each line
|
- Use the `alt+right arrow` shortcut on an entry to execute it without closing the quick pick menu, if possible — commands that open windows outside of VS Code will still close the quick pick menu unless [`"gitlens.advanced.quickPick.closeOnFocusOut": false`](#extension-settings) is set
|
||||||
|`gitlens.annotations.file.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
- 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
|
||||||
|
|
||||||
#### Line Blame Annotation Settings
|
- Adds a `Show Last Opened Quick Pick` command (`gitlens.showLastQuickPick`) with a shortcut of `alt+-` to quickly get back to where you were when the last GitLens quick pick menu closed
|
||||||
|
|
||||||
|Name | Description
|
- Adds a `Open File History Explorer` command (`gitlens.showFileHistory`) to show a **file history explorer** (peek style) to visualize the history of a file
|
||||||
|-----|------------
|
- Likely to be deprecated in a future release, add your voice to [#66](https://github.com/eamodio/vscode-gitlens/issues/66) if you feel it should not be removed
|
||||||
|`gitlens.blame.line.enabled`|Specifies whether or not to provide a blame annotation for the current line, by default<br />Use the `gitlens.toggleLineBlame` command to toggle the annotations on and off for the current session
|
|
||||||
|`gitlens.blame.line.annotationType`|Specifies the type of blame annotations that will be shown for the current line<br />`trailing` - adds an annotation to the end of the current line<br />`hover` - shows annotations when hovering over the current line
|
- Adds a `Open Blame History Explorer` command (`gitlens.showBlameHistory`) to show a **blame history explorer** (peek style) to visualize the blame history of a file or code block
|
||||||
|`gitlens.annotations.line.trailing.format`|Specifies the format of the trailing blame annotations<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.annotations.line.trailing.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
- Likely to be deprecated in a future release, add your voice to [#66](https://github.com/eamodio/vscode-gitlens/issues/66) if you feel it should not be removed
|
||||||
|`gitlens.annotations.line.trailing.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
|
||||||
|`gitlens.annotations.line.trailing.hover.details`|Specifies whether or not to provide a commit details hover annotation over the trailing blame annotations
|
### And More
|
||||||
|`gitlens.annotations.line.trailing.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over the trailing blame annotations
|
|
||||||
|`gitlens.annotations.line.trailing.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
- Adds a `Copy Commit ID to Clipboard` command (`gitlens.copyShaToClipboard`) to copy the commit id (sha) of the active line to the clipboard or from the most recent commit to the current branch, if there is no active editor
|
||||||
|`gitlens.annotations.line.hover.details`|Specifies whether or not to provide a commit details hover annotation for the current line
|
|
||||||
|`gitlens.annotations.line.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation for the current line
|
- Adds a `Copy Commit Message to Clipboard` command (`gitlens.copyMessageToClipboard`) to copy the commit message of the active line to the clipboard or from the most recent commit to the current branch, if there is no active editor
|
||||||
|
|
||||||
### File Recent Changes Annotation Settings
|
- Adds a `Open Changed Files` command (`gitlens.openChangedFiles`) to open any files with working tree changes
|
||||||
|
|
||||||
|Name | Description
|
- Adds a `Close Unchanged Files` command (`gitlens.closeUnchangedFiles`) to close any files without working tree changes
|
||||||
|-----|------------
|
|
||||||
|`gitlens.recentChanges.file.lineHighlight.locations`|Specifies where the highlights of the recently changed lines will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
|
- Adds a `Apply Stashed Changes` command (`gitlens.stashApply`) to chose a stash entry to apply to the working tree from a quick pick menu
|
||||||
|`gitlens.annotations.file.recentChanges.hover.details`|Specifies whether or not to provide a commit details hover annotation
|
|
||||||
|`gitlens.annotations.file.recentChanges.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation
|
- Adds a `Stash Changes` command (`gitlens.stashSave`) to save any working tree changes to the stash — can optionally provide a stash message
|
||||||
|`gitlens.annotations.file.recentChanges.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
- Also adds the command to the Source Control items context menu to stash an individual or group of files, works with multi-select too!
|
||||||
|
|
||||||
### Code Lens Settings
|
## Insiders
|
||||||
|
|
||||||
|Name | Description
|
Add [`"gitlens.insiders": true`](#general-extension-settings) to your settings to join the insiders channel and get early access to upcoming features. Be aware that because this provides early access expect there to be issues.
|
||||||
|-----|------------
|
|
||||||
|`gitlens.codeLens.enabled`|Specifies whether or not to provide any Git code lens, by default<br />Use the `gitlens.toggleCodeLens` command to toggle the Git code lens on and off for the current session
|
## Extension Settings
|
||||||
|`gitlens.codeLens.recentChange.enabled`|Specifies whether or not to show a `recent change` code lens showing the author and date of the most recent commit for the file or code block
|
|
||||||
|`gitlens.codeLens.recentChange.command`|Specifies the command to be executed when the `recent change` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
GitLens is highly customizable and provides many configuration settings to allow the personalization of almost all features
|
||||||
|`gitlens.codeLens.authors.enabled`|Specifies whether or not to show an `authors` code lens showing number of authors of the file or code block and the most prominent author (if there is more than one)
|
|
||||||
|`gitlens.codeLens.authors.command`|Specifies the command to be executed when the `authors` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
### General Settings
|
||||||
|`gitlens.codeLens.locations`|Specifies where Git code lens will be shown in the document<br />`document` - adds code lens at the top of the document<br />`containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)<br />`blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines<br />`custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`
|
|
||||||
|`gitlens.codeLens.customLocationSymbols`|Specifies the set of document symbols where Git code lens will be shown in the document
|
|Name | Description
|
||||||
|`gitlens.codeLens.perLanguageLocations`|Specifies where Git code lens will be shown in the document for the specified languages
|
|-----|------------
|
||||||
|
|`gitlens.defaultDateFormat`|Specifies how all absolute dates will be formatted by default<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
||||||
### Git Stashes Explorer Settings
|
|`gitlens.insiders`|Opts into the insiders channel -- provides access to upcoming features
|
||||||
|
|`gitlens.outputLevel`|Specifies how much (if any) output will be sent to the GitLens output channel
|
||||||
|Name | Description
|
|
||||||
|-----|------------
|
### Blame Settings
|
||||||
|`gitlens.stashExplorer.stashFormat`|Specifies the format of stashed changes in the `Git Stashes` explorer <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 /> ${authorAgo} - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
|
||||||
|`gitlens.stashExplorer.stashFileFormat`|Specifies the format of a stashed file in the `Git Stashes` explorer <br />Available tokens<br /> ${file} - file name<br /> ${path} - file path
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
### Status Bar Settings
|
|`gitlens.blame.ignoreWhitespace`|Specifies whether or not to ignore whitespace when comparing revisions during blame operations
|
||||||
|
|
||||||
|Name | Description
|
#### File Blame Annotation Settings
|
||||||
|-----|------------
|
|
||||||
|`gitlens.statusBar.enabled`|Specifies whether or not to provide blame information on the status bar
|
|Name | Description
|
||||||
|`gitlens.statusBar.alignment`|Specifies the blame alignment in the status bar<br />`left` - align to the left, `right` - align to the right
|
|-----|------------
|
||||||
|`gitlens.statusBar.command`|Specifies the command to be executed when the blame status bar item is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current line commit with the previous<br />`gitlens.diffWithWorking` - compares the current line commit with the working tree<br />`gitlens.toggleCodeLens` - toggles Git code lens<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
|`gitlens.blame.file.annotationType`|Specifies the type of blame annotations that will be shown for the current file<br />`gutter` - adds an annotation to the beginning of each line<br />`hover` - shows annotations when hovering over each line
|
||||||
|`gitlens.statusBar.format`|Specifies the format of the blame information on the status bar<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 />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
|`gitlens.blame.file.lineHighlight.enabled`|Specifies whether or not to highlight lines associated with the current line
|
||||||
|`gitlens.statusBar.dateFormat`|Specifies the date format of absolute dates shown in the blame information on the status bar<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
|`gitlens.blame.file.lineHighlight.locations`|Specifies where the associated line highlights will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
|
||||||
|
|`gitlens.annotations.file.gutter.format`|Specifies the format of the gutter blame annotations<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.annotations.file.gutter.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
||||||
### Strings Settings
|
|`gitlens.annotations.file.gutter.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in gutter blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
||||||
|
|`gitlens.annotations.file.gutter.compact`|Specifies whether or not to compact (deduplicate) matching adjacent gutter blame annotations
|
||||||
|Name | Description
|
|`gitlens.annotations.file.gutter.heatmap.enabled`|Specifies whether or not to provide a heatmap indicator in the gutter blame annotations
|
||||||
|-----|------------
|
|`gitlens.annotations.file.gutter.heatmap.location`|Specifies where the heatmap indicators will be shown in the gutter blame annotations<br />`left` - adds a heatmap indicator on the left edge of the gutter blame annotations<br />`right` - adds a heatmap indicator on the right edge of the gutter blame annotations
|
||||||
|`gitlens.strings.codeLens.unsavedChanges.recentChangeAndAuthors`|Specifies the string to be shown in place of both the `recent change` and `authors` code lens when there are unsaved changes
|
|`gitlens.annotations.file.gutter.hover.details`|Specifies whether or not to provide a commit details hover annotation over the gutter blame annotations
|
||||||
|`gitlens.strings.codeLens.unsavedChanges.recentChangeOnly`|Specifies the string to be shown in place of the `recent change` code lens when there are unsaved changes
|
|`gitlens.annotations.file.gutter.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
||||||
|`gitlens.strings.codeLens.unsavedChanges.authorsOnly`|Specifies the string to be shown in place of the `authors` code lens when there are unsaved changes
|
|`gitlens.annotations.file.hover.heatmap.enabled`|Specifies whether or not to provide heatmap indicators on the left edge of each line
|
||||||
|
|`gitlens.annotations.file.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
||||||
### Theme Settings
|
|
||||||
|
#### Line Blame Annotation Settings
|
||||||
|Name | Description
|
|
||||||
|-----|------------
|
|Name | Description
|
||||||
|`gitlens.theme.annotations.file.gutter.separateLines`|Specifies whether or not gutter blame annotations will have line separators
|
|-----|------------
|
||||||
|`gitlens.theme.annotations.file.gutter.dark.backgroundColor`|Specifies the dark theme background color of the gutter blame annotations
|
|`gitlens.blame.line.enabled`|Specifies whether or not to provide a blame annotation for the current line, by default<br />Use the `gitlens.toggleLineBlame` command to toggle the annotations on and off for the current session
|
||||||
|`gitlens.theme.annotations.file.gutter.light.backgroundColor`|Specifies the light theme background color of the gutter blame annotations
|
|`gitlens.blame.line.annotationType`|Specifies the type of blame annotations that will be shown for the current line<br />`trailing` - adds an annotation to the end of the current line<br />`hover` - shows annotations when hovering over the current line
|
||||||
|`gitlens.theme.annotations.file.gutter.dark.foregroundColor`|Specifies the dark theme foreground color of the gutter blame annotations
|
|`gitlens.annotations.line.trailing.format`|Specifies the format of the trailing blame annotations<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.annotations.line.trailing.dateFormat`)<br />`${authorAgo}` - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
||||||
|`gitlens.theme.annotations.file.gutter.light.foregroundColor`|Specifies the light theme foreground color of the gutter blame annotations
|
|`gitlens.annotations.line.trailing.dateFormat`|Specifies how to format absolute dates (using the `${date}` token) in trailing blame annotations<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
||||||
|`gitlens.theme.annotations.file.gutter.dark.uncommittedForegroundColor`|Specifies the dark theme foreground color of an uncommitted line in the gutter blame annotations
|
|`gitlens.annotations.line.trailing.hover.details`|Specifies whether or not to provide a commit details hover annotation over the trailing blame annotations
|
||||||
|`gitlens.theme.annotations.file.gutter.light.uncommittedForegroundColor`|Specifies the light theme foreground color of an uncommitted line in the gutter blame annotations
|
|`gitlens.annotations.line.trailing.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation over the trailing blame annotations
|
||||||
|`gitlens.theme.annotations.line.trailing.dark.backgroundColor`|Specifies the dark theme background color of the trailing blame annotation
|
|`gitlens.annotations.line.trailing.hover.wholeLine`|Specifies whether or not to trigger hover annotations over the whole line
|
||||||
|`gitlens.theme.annotations.line.trailing.light.backgroundColor`|Specifies the light theme background color of the trailing blame annotation
|
|`gitlens.annotations.line.hover.details`|Specifies whether or not to provide a commit details hover annotation for the current line
|
||||||
|`gitlens.theme.annotations.line.trailing.dark.foregroundColor`|Specifies the dark theme foreground color of the trailing blame annotation
|
|`gitlens.annotations.line.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation for the current line
|
||||||
|`gitlens.theme.annotations.line.trailing.light.foregroundColor`|Specifies the light theme foreground color of the trailing blame annotation
|
|
||||||
|`gitlens.theme.lineHighlight.dark.backgroundColor`|Specifies the dark theme background color of the associated line highlights in blame annotations. Must be a valid css color
|
### File Recent Changes Annotation Settings
|
||||||
|`gitlens.theme.lineHighlight.light.backgroundColor`|Specifies the light theme background color of the associated line highlights in blame annotations. Must be a valid css color
|
|
||||||
|`gitlens.theme.lineHighlight.dark.overviewRulerColor`|Specifies the dark theme overview ruler color of the associated line highlights in blame annotations
|
|Name | Description
|
||||||
|`gitlens.theme.lineHighlight.light.overviewRulerColor`|Specifies the light theme overview ruler color of the associated line highlights in blame annotations
|
|-----|------------
|
||||||
|
|`gitlens.recentChanges.file.lineHighlight.locations`|Specifies where the highlights of the recently changed lines will be shown<br />`gutter` - adds a gutter glyph<br />`line` - adds a full-line highlight background color<br />`overviewRuler` - adds a decoration to the overviewRuler (scroll bar)
|
||||||
### Advanced Settings
|
|`gitlens.annotations.file.recentChanges.hover.details`|Specifies whether or not to provide a commit details hover annotation
|
||||||
|
|`gitlens.annotations.file.recentChanges.hover.changes`|Specifies whether or not to provide a changes (diff) hover annotation
|
||||||
|Name | Description
|
|
||||||
|-----|------------
|
### Code Lens Settings
|
||||||
|`gitlens.advanced.telemetry.enabled`|Specifies whether or not to enable GitLens telemetry (even if enabled still abides by the overall `telemetry.enableTelemetry` setting
|
|
||||||
|`gitlens.advanced.menus`|Specifies which commands will be added to which menus
|
|Name | Description
|
||||||
|`gitlens.advanced.caching.enabled`|Specifies whether git output will be cached
|
|-----|------------
|
||||||
|`gitlens.advanced.caching.maxLines`|Specifies the threshold for caching larger documents
|
|`gitlens.codeLens.enabled`|Specifies whether or not to provide any Git code lens, by default<br />Use the `gitlens.toggleCodeLens` command to toggle the Git code lens on and off for the current session
|
||||||
|`gitlens.advanced.git`|Specifies the git path to use
|
|`gitlens.codeLens.recentChange.enabled`|Specifies whether or not to show a `recent change` code lens showing the author and date of the most recent commit for the file or code block
|
||||||
|`gitlens.advanced.gitignore.enabled`|Specifies whether or not to parse the root .gitignore file for better performance (i.e. avoids blaming excluded files)
|
|`gitlens.codeLens.recentChange.command`|Specifies the command to be executed when the `recent change` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
||||||
|`gitlens.advanced.maxQuickHistory`|Specifies the maximum number of QuickPick history entries to show
|
|`gitlens.codeLens.authors.enabled`|Specifies whether or not to show an `authors` code lens showing number of authors of the file or code block and the most prominent author (if there is more than one)
|
||||||
|`gitlens.advanced.quickPick.closeOnFocusOut`|Specifies whether or not to close the QuickPick menu when focus is lost
|
|`gitlens.codeLens.authors.command`|Specifies the command to be executed when the `authors` code lens is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current committed file with the previous commit<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
||||||
|
|`gitlens.codeLens.locations`|Specifies where Git code lens will be shown in the document<br />`document` - adds code lens at the top of the document<br />`containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)<br />`blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines<br />`custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`
|
||||||
## Known Issues
|
|`gitlens.codeLens.customLocationSymbols`|Specifies the set of document symbols where Git code lens will be shown in the document
|
||||||
|
|`gitlens.codeLens.perLanguageLocations`|Specifies where Git code lens will be shown in the document for the specified languages
|
||||||
- If the `Copy to * clipboard` commands don't work on Linux -- `xclip` needs to be installed. You can install it via `sudo apt-get install xclip`
|
|
||||||
|
### GitLens Custom View Settings
|
||||||
## Contributors
|
|
||||||
|
|Name | Description
|
||||||
A big thanks to the people that have contributed to this project:
|
|-----|------------
|
||||||
|
|`gitlens.gitExplorer.enabled`|Specifies whether or not to show the `GitLens` custom view"
|
||||||
- Peng Lyu ([@rebornix](https://github.com/rebornix)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=rebornix))
|
|`gitlens.gitExplorer.view`|Specifies the starting view (mode) of the `GitLens` custom view<br /> `auto` - shows the last selected view, defaults to `repository`<br />`history` - shows the commit history of the active file<br />`repository` - shows a repository explorer"
|
||||||
- Aurelio Ogliari ([@nobitagit](https://github.com/nobitagit)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=nobitagit)
|
|`gitlens.gitExplorer.files.layout`|Specifies how the `GitLens` custom view will display files<br /> `auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.gitExplorer.files.threshold` setting and the number of files at each nesting level<br /> `list` - displays files as a list<br /> `tree` - displays files as a tree
|
||||||
- Johannes Rieken ([@jrieken](https://github.com/jrieken)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=jrieken))
|
|`gitlens.gitExplorer.files.compact`|Specifies whether or not to compact (flatten) unnecessary file nesting in the `GitLens` custom view<br />Only applies when displaying files as a `tree` or `auto`
|
||||||
- Zack Schuster ([@zackschuster](https://github.com/zackschuster)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=zackschuster)
|
|`gitlens.gitExplorer.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 `GitLens` custom view<br />Only applies when displaying files as `auto`
|
||||||
|
|`gitlens.gitExplorer.includeWorkingTree`|Specifies whether or not to include working tree files inside the `Repository Status` node of the `GitLens` custom view
|
||||||
|
|`gitlens.gitExplorer.showTrackingBranch`|Specifies whether or not to show the tracking branch when displaying local branches in the `GitLens` custom view"
|
||||||
|
|`gitlens.gitExplorer.commitFormat`|Specifies the format of committed changes in the `GitLens` custom view<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 /> ${authorAgo} - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
||||||
|
|`gitlens.gitExplorer.commitFileFormat`|Specifies the format of a committed file in the `GitLens` custom view<br />Available tokens<br /> ${directory} - directory name<br /> ${file} - file name<br /> ${filePath} - formatted file name and path<br /> ${path} - full file path
|
||||||
|
|`gitlens.gitExplorer.stashFormat`|Specifies the format of stashed changes in the `GitLens` custom view<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 /> ${authorAgo} - commit author, relative commit date<br />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
||||||
|
|`gitlens.gitExplorer.stashFileFormat`|Specifies the format of a stashed file in the `GitLens` custom view<br />Available tokens<br /> ${directory} - directory name<br /> ${file} - file name<br /> ${filePath} - formatted file name and path<br /> ${path} - full file path
|
||||||
|
|`gitlens.gitExplorer.statusFileFormat`|Specifies the format of the status of a working or committed file in the `GitLens` custom 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
|
||||||
|
|
||||||
|
### Custom Remotes Settings
|
||||||
|
|
||||||
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
|
|`gitlens.remotes`|Specifies any custom domains for remote (code-hosting) services<br />Example: ```"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]```
|
||||||
|
|
||||||
|
### Status Bar Settings
|
||||||
|
|
||||||
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
|
|`gitlens.statusBar.enabled`|Specifies whether or not to provide blame information on the status bar
|
||||||
|
|`gitlens.statusBar.alignment`|Specifies the blame alignment in the status bar<br />`left` - align to the left, `right` - align to the right
|
||||||
|
|`gitlens.statusBar.command`|Specifies the command to be executed when the blame status bar item is clicked<br />`gitlens.toggleFileBlame` - toggles file blame annotations<br />`gitlens.showBlameHistory` - opens the blame history explorer<br />`gitlens.showFileHistory` - opens the file history explorer<br />`gitlens.diffWithPrevious` - compares the current line commit with the previous<br />`gitlens.diffWithWorking` - compares the current line commit with the working tree<br />`gitlens.toggleCodeLens` - toggles Git code lens<br />`gitlens.showQuickCommitDetails` - shows a commit details quick pick<br />`gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick<br />`gitlens.showQuickFileHistory` - shows a file history quick pick<br />`gitlens.showQuickRepoHistory` - shows a branch history quick pick
|
||||||
|
|`gitlens.statusBar.format`|Specifies the format of the blame information on the status bar<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 />See https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting
|
||||||
|
|`gitlens.statusBar.dateFormat`|Specifies the date format of absolute dates shown in the blame information on the status bar<br />See https://momentjs.com/docs/#/displaying/format/ for valid formats
|
||||||
|
|
||||||
|
### Strings Settings
|
||||||
|
|
||||||
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
|
|`gitlens.strings.codeLens.unsavedChanges.recentChangeAndAuthors`|Specifies the string to be shown in place of both the `recent change` and `authors` code lens when there are unsaved changes
|
||||||
|
|`gitlens.strings.codeLens.unsavedChanges.recentChangeOnly`|Specifies the string to be shown in place of the `recent change` code lens when there are unsaved changes
|
||||||
|
|`gitlens.strings.codeLens.unsavedChanges.authorsOnly`|Specifies the string to be shown in place of the `authors` code lens when there are unsaved changes
|
||||||
|
|
||||||
|
### Theme Settings
|
||||||
|
|
||||||
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
|
|`gitlens.theme.annotations.file.gutter.separateLines`|Specifies whether or not gutter blame annotations will have line separators
|
||||||
|
|`gitlens.theme.annotations.file.gutter.dark.backgroundColor`|Specifies the dark theme background color of the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.file.gutter.light.backgroundColor`|Specifies the light theme background color of the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.file.gutter.dark.foregroundColor`|Specifies the dark theme foreground color of the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.file.gutter.light.foregroundColor`|Specifies the light theme foreground color of the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.file.gutter.dark.uncommittedForegroundColor`|Specifies the dark theme foreground color of an uncommitted line in the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.file.gutter.light.uncommittedForegroundColor`|Specifies the light theme foreground color of an uncommitted line in the gutter blame annotations
|
||||||
|
|`gitlens.theme.annotations.line.trailing.dark.backgroundColor`|Specifies the dark theme background color of the trailing blame annotation
|
||||||
|
|`gitlens.theme.annotations.line.trailing.light.backgroundColor`|Specifies the light theme background color of the trailing blame annotation
|
||||||
|
|`gitlens.theme.annotations.line.trailing.dark.foregroundColor`|Specifies the dark theme foreground color of the trailing blame annotation
|
||||||
|
|`gitlens.theme.annotations.line.trailing.light.foregroundColor`|Specifies the light theme foreground color of the trailing blame annotation
|
||||||
|
|`gitlens.theme.lineHighlight.dark.backgroundColor`|Specifies the dark theme background color of the associated line highlights in blame annotations. Must be a valid css color
|
||||||
|
|`gitlens.theme.lineHighlight.light.backgroundColor`|Specifies the light theme background color of the associated line highlights in blame annotations. Must be a valid css color
|
||||||
|
|`gitlens.theme.lineHighlight.dark.overviewRulerColor`|Specifies the dark theme overview ruler color of the associated line highlights in blame annotations
|
||||||
|
|`gitlens.theme.lineHighlight.light.overviewRulerColor`|Specifies the light theme overview ruler color of the associated line highlights in blame annotations
|
||||||
|
|
||||||
|
### Advanced Settings
|
||||||
|
|
||||||
|
|Name | Description
|
||||||
|
|-----|------------
|
||||||
|
|`gitlens.advanced.telemetry.enabled`|Specifies whether or not to enable GitLens telemetry (even if enabled still abides by the overall `telemetry.enableTelemetry` setting
|
||||||
|
|`gitlens.advanced.menus`|Specifies which commands will be added to which menus
|
||||||
|
|`gitlens.advanced.caching.enabled`|Specifies whether git output will be cached
|
||||||
|
|`gitlens.advanced.caching.maxLines`|Specifies the threshold for caching larger documents
|
||||||
|
|`gitlens.advanced.git`|Specifies the git path to use
|
||||||
|
|`gitlens.advanced.gitignore.enabled`|Specifies whether or not to parse the root .gitignore file for better performance (i.e. avoids blaming excluded files)
|
||||||
|
|`gitlens.advanced.maxQuickHistory`|Specifies the maximum number of QuickPick history entries to show
|
||||||
|
|`gitlens.advanced.quickPick.closeOnFocusOut`|Specifies whether or not to close the QuickPick menu when focus is lost
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
- If the `Copy to * clipboard` commands don't work on Linux -- `xclip` needs to be installed. You can install it via `sudo apt-get install xclip`
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
A big thanks to the people that have contributed to this project:
|
||||||
|
|
||||||
|
- Amanda Cameron ([@AmandaCameron](https://github.com/AmandaCameron)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=AmandaCameron))
|
||||||
|
- Peng Lyu ([@rebornix](https://github.com/rebornix)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=rebornix))
|
||||||
|
- Aurelio Ogliari ([@nobitagit](https://github.com/nobitagit)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=nobitagit)
|
||||||
|
- Johannes Rieken ([@jrieken](https://github.com/jrieken)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=jrieken))
|
||||||
|
- Zack Schuster ([@zackschuster](https://github.com/zackschuster)) — [contributions](https://github.com/eamodio/vscode-gitlens/commits?author=zackschuster)
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><title>Layer 1</title><rect height="11" width="3" y="3" x="7" fill="#C5C5C5"/><rect height="3" width="11" y="7" x="3" fill="#C5C5C5"/></svg>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#C5C5C5" x="6.5" y="5.5" width="3" height="11"/>
|
||||||
|
<rect fill="#C5C5C5" x="2.5" y="9.5" width="11" height="3"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 253 B |
4
images/dark/icon-branch.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m13,8c0,-1.11 -0.89,-2 -2,-2c-1.11,0 -2,0.89 -2,2c0,0.73 0.41,1.38 1,1.72l0,0.3c-0.02,0.52 -0.23,0.98 -0.63,1.38c-0.4,0.4 -0.86,0.61 -1.38,0.63c-0.83,0.02 -1.48,0.16 -2,0.45l0,-4.76c0.59,-0.34 1,-0.98 1,-1.72c0,-1.11 -0.89,-2 -2,-2c-1.11,0 -1.99,0.89 -1.99,2c0,0.73 0.41,1.38 1,1.72l0,6.56c-0.59,0.35 -1,0.99 -1,1.72c0,1.11 0.89,2 2,2c1.11,0 2,-0.89 2,-2c0,-0.53 -0.2,-1 -0.53,-1.36c0.09,-0.06 0.48,-0.41 0.59,-0.47c0.25,-0.11 0.56,-0.17 0.94,-0.17c1.05,-0.05 1.95,-0.45 2.75,-1.25c0.8,-0.8 1.2,-1.98 1.25,-3.02l-0.02,0c0.61,-0.36 1.02,-1 1.02,-1.73l0,0zm-8,-3.2c0.66,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2c-0.65,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2l0,0zm0,12.41c-0.66,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2c0.65,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2l0,0zm6,-8c-0.66,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2c0.65,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="256" height="256" viewBox="0 0 14 16" xml:space="preserve">
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill="#C5C5C5" d="M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z"></path>
|
<path fill="#C5C5C5" d="m11.86,10c-0.45,-1.72 -2,-3 -3.86,-3c-1.86,0 -3.41,1.28 -3.86,3l-3.14,0l0,2l3.14,0c0.45,1.72 2,3 3.86,3c1.86,0 3.41,-1.28 3.86,-3l3.14,0l0,-2l-3.14,0zm-3.86,3.2c-1.22,0 -2.2,-0.98 -2.2,-2.2c0,-1.22 0.98,-2.2 2.2,-2.2c1.22,0 2.2,0.98 2.2,2.2c0,1.22 -0.98,2.2 -2.2,2.2z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 428 B |
4
images/dark/icon-diff.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m7.5,10l2,0l0,1l-2,0l0,2l-1,0l0,-2l-2,0l0,-1l2,0l0,-2l1,0l0,2l0,0zm-3,6l5,0l0,-1l-5,0l0,1l0,0zm4.5,-11l3.5,3.5l0,9.5c0,0.55 -0.45,1 -1,1l-9,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l6.5,0l0,0zm2.5,4l-3,-3l-6,0l0,12l9,0l0,-9l0,0zm-1.5,-6l-5.5,0l0,1l5,0l4,4l0,8l1,0l0,-8.5l-4.5,-4.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 437 B |
4
images/dark/icon-download.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m9,15l2,0l-3,3l-3,-3l2,0l0,-5l2,0l0,5l0,0zm3,-8c0,-0.44 -0.91,-3 -4.5,-3c-2.42,0 -4.5,1.92 -4.5,4c-1.98,0 -3,1.52 -3,3c0,1.53 1,3 3,3l3,0l0,-1.3l-3,0c-1.62,0 -1.7,-1.42 -1.7,-1.7c0,-0.17 0.05,-1.7 1.7,-1.7l1.3,0l0,-1.3c0,-1.39 1.56,-2.7 3.2,-2.7c2.55,0 3.13,1.55 3.2,1.8l0,1.2l1.3,0c0.81,0 2.7,0.22 2.7,2.2c0,2.09 -2.25,2.2 -2.7,2.2l-2,0l0,1.3l2,0c2.08,0 4,-1.16 4,-3.5c0,-2.44 -1.92,-3.5 -4,-3.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 557 B |
4
images/dark/icon-history.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m9,16l-2,0l0,-7l5,0l0,2l-3,0l0,5l0,0zm-1,-12c-2.19,0 -4.13,1.02 -5.41,2.59l-1.59,-1.59l0,4l4,0l-1.5,-1.5c1.05,-1.33 2.67,-2.2 4.5,-2.2c3.14,0 5.7,2.56 5.7,5.7c0,3.14 -2.56,5.7 -5.7,5.7c-3.14,0 -5.7,-2.56 -5.7,-5.7c0,-0.34 0.03,-0.67 0.09,-1l-1.31,0c-0.05,0.33 -0.08,0.66 -0.08,1c0,3.86 3.14,7 7,7c3.86,0 7,-3.14 7,-7c0,-3.86 -3.14,-7 -7,-7l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 500 B |
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16">
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3a2.98 2.98 0 0 1-2.107-.868 2.98 2.98 0 0 1-.873-2.111 3.004 3.004 0 0 1 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012L13.115 4.1 8.196 0H7.059v2.404A6.759 6.759 0 0 0 .938 9.125c0 1.809.707 3.508 1.986 4.782a6.707 6.707 0 0 0 4.784 1.988 6.758 6.758 0 0 0 6.75-6.75 6.741 6.741 0 0 0-1.007-3.536z" fill="#2D2D30"/>
|
<path fill="#C5C5C5" d="m12.901149,9.091851l-0.094,0.071c-0.269,0.333 -0.746,1.096 -0.91,2.375c0.057,0.277 0.092,0.495 0.092,0.545c0,2.206 -1.794,4 -4,4a3.986,3.986 0 0 1 -2.817,-1.164a3.987,3.987 0 0 1 -1.163,-2.815c0,-2.206 1.794,-4 4,-4l0.351,0.025l0,1.85s1.626,-1.342 1.631,-1.339l1.869,-1.577l-3.5,-2.917l0,2.218l-0.371,-0.03a5.75,5.75 0 0 0 -4.055,9.826a5.75,5.75 0 0 0 9.826,-4.056a5.725,5.725 0 0 0 -0.859,-3.012z" />
|
||||||
<path d="M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4a3.986 3.986 0 0 1-2.817-1.164 3.987 3.987 0 0 1-1.163-2.815c0-2.206 1.794-4 4-4l.351.025v1.85S9.685 5.679 9.69 5.682l1.869-1.577-3.5-2.917v2.218l-.371-.03a5.75 5.75 0 0 0-4.055 9.826 5.75 5.75 0 0 0 9.826-4.056 5.725 5.725 0 0 0-.859-3.012z" fill="#C5C5C5"/>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 553 B |
4
images/dark/icon-remote.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m12.519592,15.157073l-9.039184,0c-1.367793,0 -2.480539,-1.112828 -2.480539,-2.480622s1.112746,-2.480539 2.480539,-2.480539l0.281314,0c0.349178,-0.47173 0.888523,-0.771191 1.476341,-0.815025c0.321917,-1.471535 1.619609,-2.537962 3.165139,-2.537962c1.221543,0 2.341663,0.699516 2.889377,1.772488c0.083027,-0.008618 0.166386,-0.012926 0.250076,-0.012926c1.190221,0 2.194667,0.874105 2.378785,2.027867c0.670514,0.460047 1.07869,1.225023 1.07869,2.046096c0,1.367793 -1.112828,2.480622 -2.480539,2.480622z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 655 B |
5
images/dark/icon-repo-green.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#32cd32" stroke="#C5C5C5" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
5
images/dark/icon-repo-red.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#cd3131" stroke="#C5C5C5" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
5
images/dark/icon-repo-yellow.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#cdcd32" stroke="#C5C5C5" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
4
images/dark/icon-repo.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 490 B |
4
images/dark/icon-search.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m14.414133,16.199437l-3.415492,-3.433421c0.627518,-0.878526 0.995065,-1.945307 0.995065,-3.110698c0,-2.967265 -2.411463,-5.378728 -5.378728,-5.378728c-2.967265,0 -5.378728,2.411463 -5.378728,5.378728c0,2.967265 2.411463,5.378728 5.378728,5.378728c1.165391,0 2.223207,-0.367546 3.110698,-0.995065l3.433421,3.415492c0.170326,0.179291 0.403405,0.268936 0.627518,0.268936c0.224114,0 0.466156,-0.080681 0.627518,-0.268936c0.349617,-0.349617 0.349617,-0.914384 0,-1.264001l0,0.008965zm-7.799155,-2.330782c-2.321817,0 -4.213337,-1.891519 -4.213337,-4.213337c0,-2.321817 1.891519,-4.213337 4.213337,-4.213337c2.321817,0 4.213337,1.891519 4.213337,4.213337c0,2.321817 -1.891519,4.213337 -4.213337,4.213337l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 857 B |
4
images/dark/icon-stash.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m14.687501,11.955358l-1.079554,-6.821251c-0.076429,-0.458572 -0.477679,-0.821607 -0.955357,-0.821607l-9.30518,0c-0.477679,0 -0.878929,0.363036 -0.955357,0.821607l-1.079554,6.821251l0,4.776787c0,0.525447 0.429911,0.955357 0.955357,0.955357l11.464288,0c0.525447,0 0.955357,-0.429911 0.955357,-0.955357l0,-4.776787l0,0zm-3.133572,0.525447l-0.420357,0.850268c-0.162411,0.324821 -0.496786,0.535 -0.869375,0.535l-4.547501,0c-0.363036,0 -0.687857,-0.210179 -0.850268,-0.525447l-0.420357,-0.869375c-0.162411,-0.315268 -0.496786,-0.525447 -0.850268,-0.525447l-1.327947,0l0.955357,-6.687501l9.553573,0l0.955357,6.687501l-1.318393,0c-0.372589,0 -0.697411,0.210179 -0.869375,0.525447l0.009554,0.009554z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 846 B |
@@ -1,6 +1,6 @@
|
|||||||
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect fill="#7F4E7E" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
<rect fill="#7F4E7E" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
||||||
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
||||||
C
|
!
|
||||||
</text>
|
</text>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 431 B |
6
images/dark/icon-status-unknown.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#6C6C6C" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
||||||
|
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
||||||
|
?
|
||||||
|
</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 431 B |
4
images/dark/icon-sync.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m12.24,10.4c0.19,1.28 -0.2,2.62 -1.2,3.6c-1.47,1.45 -3.74,1.63 -5.41,0.54l1.17,-1.14l-4.3,-0.6l0.6,4.2l1.31,-1.26c2.36,1.74 5.7,1.57 7.84,-0.54c1.24,-1.23 1.81,-2.85 1.74,-4.46l-1.75,-0.34l0,0zm-7.28,-2.4c1.47,-1.45 3.74,-1.63 5.41,-0.54l-1.17,1.14l4.3,0.6l-0.6,-4.2l-1.31,1.26c-2.36,-1.74 -5.7,-1.57 -7.85,0.54c-1.24,1.23 -1.8,2.85 -1.73,4.46l1.75,0.35c-0.19,-1.28 0.2,-2.63 1.2,-3.61l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 546 B |
4
images/dark/icon-unfold.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m12.5,11l2.5,2.5c0,0.55 -0.45,1 -1,1l-4,0l0,-1l3.5,0l-2,-2l-7,0l-2,2l3.5,0l0,1l-4,0c-0.55,0 -1,-0.45 -1,-1l2.5,-2.5l-2.5,-2.5c0,-0.55 0.45,-1 1,-1l4,0l0,1l-3.5,0l2,2l7,0l2,-2l-3.5,0l0,-1l4,0c0.55,0 1,0.45 1,1l-2.5,2.5l0,0zm-5.5,-1.5l2,0l0,-3l2,0l-3,-3l-3,3l2,0l0,3l0,0zm2,3l-2,0l0,3l-2,0l3,3l3,-3l-2,0l0,-3l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 467 B |
4
images/dark/icon-upload.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#C5C5C5" d="m7,12l-2,0l3,-3l3,3l-2,0l0,5l-2,0l0,-5l0,0zm5,-4c0,-0.44 -0.91,-3 -4.5,-3c-2.42,0 -4.5,1.92 -4.5,4c-1.98,0 -3,1.52 -3,3c0,1.53 1,3 3,3l3,0l0,-1.3l-3,0c-1.62,0 -1.7,-1.42 -1.7,-1.7c0,-0.17 0.05,-1.7 1.7,-1.7l1.3,0l0,-1.3c0,-1.39 1.56,-2.7 3.2,-2.7c2.55,0 3.13,1.55 3.2,1.8l0,1.2l1.3,0c0.81,0 2.7,0.22 2.7,2.2c0,2.09 -2.25,2.2 -2.7,2.2l-2,0l0,1.3l2,0c2.08,0 4,-1.16 4,-3.5c0,-2.44 -1.92,-3.5 -4,-3.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 558 B |
@@ -1 +1,5 @@
|
|||||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><title>Layer 1</title><rect height="11" width="3" y="3" x="7" fill="#424242"/><rect height="3" width="11" y="7" x="3" fill="#424242"/></svg>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#424242" x="6.5" y="5.5" width="3" height="11"/>
|
||||||
|
<rect fill="#424242" x="2.5" y="9.5" width="11" height="3"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 253 B |
4
images/light/icon-branch.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m13,8c0,-1.11 -0.89,-2 -2,-2c-1.11,0 -2,0.89 -2,2c0,0.73 0.41,1.38 1,1.72l0,0.3c-0.02,0.52 -0.23,0.98 -0.63,1.38c-0.4,0.4 -0.86,0.61 -1.38,0.63c-0.83,0.02 -1.48,0.16 -2,0.45l0,-4.76c0.59,-0.34 1,-0.98 1,-1.72c0,-1.11 -0.89,-2 -2,-2c-1.11,0 -1.99,0.89 -1.99,2c0,0.73 0.41,1.38 1,1.72l0,6.56c-0.59,0.35 -1,0.99 -1,1.72c0,1.11 0.89,2 2,2c1.11,0 2,-0.89 2,-2c0,-0.53 -0.2,-1 -0.53,-1.36c0.09,-0.06 0.48,-0.41 0.59,-0.47c0.25,-0.11 0.56,-0.17 0.94,-0.17c1.05,-0.05 1.95,-0.45 2.75,-1.25c0.8,-0.8 1.2,-1.98 1.25,-3.02l-0.02,0c0.61,-0.36 1.02,-1 1.02,-1.73l0,0zm-8,-3.2c0.66,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2c-0.65,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2l0,0zm0,12.41c-0.66,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2c0.65,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2l0,0zm6,-8c-0.66,0 -1.2,-0.55 -1.2,-1.2c0,-0.65 0.55,-1.2 1.2,-1.2c0.65,0 1.2,0.55 1.2,1.2c0,0.65 -0.55,1.2 -1.2,1.2l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="256" height="256" viewBox="0 0 14 16" xml:space="preserve">
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path fill="#6c6c6c" d="M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z"></path>
|
<path fill="#424242" d="m11.86,10c-0.45,-1.72 -2,-3 -3.86,-3c-1.86,0 -3.41,1.28 -3.86,3l-3.14,0l0,2l3.14,0c0.45,1.72 2,3 3.86,3c1.86,0 3.41,-1.28 3.86,-3l3.14,0l0,-2l-3.14,0zm-3.86,3.2c-1.22,0 -2.2,-0.98 -2.2,-2.2c0,-1.22 0.98,-2.2 2.2,-2.2c1.22,0 2.2,0.98 2.2,2.2c0,1.22 -0.98,2.2 -2.2,2.2z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 428 B |
4
images/light/icon-diff.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m7.5,10l2,0l0,1l-2,0l0,2l-1,0l0,-2l-2,0l0,-1l2,0l0,-2l1,0l0,2l0,0zm-3,6l5,0l0,-1l-5,0l0,1l0,0zm4.5,-11l3.5,3.5l0,9.5c0,0.55 -0.45,1 -1,1l-9,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l6.5,0l0,0zm2.5,4l-3,-3l-6,0l0,12l9,0l0,-9l0,0zm-1.5,-6l-5.5,0l0,1l5,0l4,4l0,8l1,0l0,-8.5l-4.5,-4.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 437 B |
4
images/light/icon-download.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m9,15l2,0l-3,3l-3,-3l2,0l0,-5l2,0l0,5l0,0zm3,-8c0,-0.44 -0.91,-3 -4.5,-3c-2.42,0 -4.5,1.92 -4.5,4c-1.98,0 -3,1.52 -3,3c0,1.53 1,3 3,3l3,0l0,-1.3l-3,0c-1.62,0 -1.7,-1.42 -1.7,-1.7c0,-0.17 0.05,-1.7 1.7,-1.7l1.3,0l0,-1.3c0,-1.39 1.56,-2.7 3.2,-2.7c2.55,0 3.13,1.55 3.2,1.8l0,1.2l1.3,0c0.81,0 2.7,0.22 2.7,2.2c0,2.09 -2.25,2.2 -2.7,2.2l-2,0l0,1.3l2,0c2.08,0 4,-1.16 4,-3.5c0,-2.44 -1.92,-3.5 -4,-3.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 557 B |
4
images/light/icon-history.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m9,16l-2,0l0,-7l5,0l0,2l-3,0l0,5l0,0zm-1,-12c-2.19,0 -4.13,1.02 -5.41,2.59l-1.59,-1.59l0,4l4,0l-1.5,-1.5c1.05,-1.33 2.67,-2.2 4.5,-2.2c3.14,0 5.7,2.56 5.7,5.7c0,3.14 -2.56,5.7 -5.7,5.7c-3.14,0 -5.7,-2.56 -5.7,-5.7c0,-0.34 0.03,-0.67 0.09,-1l-1.31,0c-0.05,0.33 -0.08,0.66 -0.08,1c0,3.86 3.14,7 7,7c3.86,0 7,-3.14 7,-7c0,-3.86 -3.14,-7 -7,-7l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 500 B |
@@ -1,5 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16">
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d='M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3a2.98 2.98 0 0 1-2.107-.868 2.98 2.98 0 0 1-.873-2.111 3.004 3.004 0 0 1 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012L13.115 4.1 8.196 0H7.059v2.404A6.759 6.759 0 0 0 .938 9.125c0 1.809.707 3.508 1.986 4.782a6.707 6.707 0 0 0 4.784 1.988 6.758 6.758 0 0 0 6.75-6.75 6.741 6.741 0 0 0-1.007-3.536z' fill='#F6F6F6'/>
|
<path fill="#424242" d="m12.901149,9.091851l-0.094,0.071c-0.269,0.333 -0.746,1.096 -0.91,2.375c0.057,0.277 0.092,0.495 0.092,0.545c0,2.206 -1.794,4 -4,4a3.986,3.986 0 0 1 -2.817,-1.164a3.987,3.987 0 0 1 -1.163,-2.815c0,-2.206 1.794,-4 4,-4l0.351,0.025l0,1.85s1.626,-1.342 1.631,-1.339l1.869,-1.577l-3.5,-2.917l0,2.218l-0.371,-0.03a5.75,5.75 0 0 0 -4.055,9.826a5.75,5.75 0 0 0 9.826,-4.056a5.725,5.725 0 0 0 -0.859,-3.012z" />
|
||||||
<path d='M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4a3.986 3.986 0 0 1-2.817-1.164 3.987 3.987 0 0 1-1.163-2.815c0-2.206 1.794-4 4-4l.351.025v1.85S9.685 5.679 9.69 5.682l1.869-1.577-3.5-2.917v2.218l-.371-.03a5.75 5.75 0 0 0-4.055 9.826 5.75 5.75 0 0 0 9.826-4.056 5.725 5.725 0 0 0-.859-3.012z' fill='#424242'/>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 553 B |
4
images/light/icon-remote.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m12.519592,15.157073l-9.039184,0c-1.367793,0 -2.480539,-1.112828 -2.480539,-2.480622s1.112746,-2.480539 2.480539,-2.480539l0.281314,0c0.349178,-0.47173 0.888523,-0.771191 1.476341,-0.815025c0.321917,-1.471535 1.619609,-2.537962 3.165139,-2.537962c1.221543,0 2.341663,0.699516 2.889377,1.772488c0.083027,-0.008618 0.166386,-0.012926 0.250076,-0.012926c1.190221,0 2.194667,0.874105 2.378785,2.027867c0.670514,0.460047 1.07869,1.225023 1.07869,2.046096c0,1.367793 -1.112828,2.480622 -2.480539,2.480622z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 655 B |
5
images/light/icon-repo-green.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#32cd32" stroke="#424242" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
5
images/light/icon-repo-red.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#cd3131" stroke="#424242" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
5
images/light/icon-repo-yellow.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
<ellipse fill="#cdcd32" stroke="#424242" stroke-width="0.5" rx="3" ry="3" cx="13" cy="4" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 586 B |
4
images/light/icon-repo.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m6,12l-1,0l0,-1l1,0l0,1l0,0zm0,-3l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm0,-2l-1,0l0,1l1,0l0,-1l0,0zm8,-1l0,12c0,0.55 -0.45,1 -1,1l-5,0l0,2l-1.5,-1.5l-1.5,1.5l0,-2l-2,0c-0.55,0 -1,-0.45 -1,-1l0,-12c0,-0.55 0.45,-1 1,-1l10,0c0.55,0 1,0.45 1,1l0,0zm-1,10l-10,0l0,2l2,0l0,-1l3,0l0,1l5,0l0,-2l0,0zm0,-10l-9,0l0,9l9,0l0,-9l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 490 B |
4
images/light/icon-search.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m14.414133,16.199437l-3.415492,-3.433421c0.627518,-0.878526 0.995065,-1.945307 0.995065,-3.110698c0,-2.967265 -2.411463,-5.378728 -5.378728,-5.378728c-2.967265,0 -5.378728,2.411463 -5.378728,5.378728c0,2.967265 2.411463,5.378728 5.378728,5.378728c1.165391,0 2.223207,-0.367546 3.110698,-0.995065l3.433421,3.415492c0.170326,0.179291 0.403405,0.268936 0.627518,0.268936c0.224114,0 0.466156,-0.080681 0.627518,-0.268936c0.349617,-0.349617 0.349617,-0.914384 0,-1.264001l0,0.008965zm-7.799155,-2.330782c-2.321817,0 -4.213337,-1.891519 -4.213337,-4.213337c0,-2.321817 1.891519,-4.213337 4.213337,-4.213337c2.321817,0 4.213337,1.891519 4.213337,4.213337c0,2.321817 -1.891519,4.213337 -4.213337,4.213337l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 857 B |
4
images/light/icon-stash.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m14.687501,11.955358l-1.079554,-6.821251c-0.076429,-0.458572 -0.477679,-0.821607 -0.955357,-0.821607l-9.30518,0c-0.477679,0 -0.878929,0.363036 -0.955357,0.821607l-1.079554,6.821251l0,4.776787c0,0.525447 0.429911,0.955357 0.955357,0.955357l11.464288,0c0.525447,0 0.955357,-0.429911 0.955357,-0.955357l0,-4.776787l0,0zm-3.133572,0.525447l-0.420357,0.850268c-0.162411,0.324821 -0.496786,0.535 -0.869375,0.535l-4.547501,0c-0.363036,0 -0.687857,-0.210179 -0.850268,-0.525447l-0.420357,-0.869375c-0.162411,-0.315268 -0.496786,-0.525447 -0.850268,-0.525447l-1.327947,0l0.955357,-6.687501l9.553573,0l0.955357,6.687501l-1.318393,0c-0.372589,0 -0.697411,0.210179 -0.869375,0.525447l0.009554,0.009554z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 846 B |
@@ -1,6 +1,6 @@
|
|||||||
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect fill="#9B4F96" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
<rect fill="#9B4F96" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
||||||
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
||||||
C
|
!
|
||||||
</text>
|
</text>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 431 B |
6
images/light/icon-status-unknown.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="14px" height="14px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#6C6C6C" x="0" y="0" width="100" height="100" rx="35" ry="35"/>
|
||||||
|
<text x="50" y="75" font-size="75" text-anchor="middle" style="font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback";" fill="white">
|
||||||
|
?
|
||||||
|
</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 431 B |
4
images/light/icon-sync.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m12.24,10.4c0.19,1.28 -0.2,2.62 -1.2,3.6c-1.47,1.45 -3.74,1.63 -5.41,0.54l1.17,-1.14l-4.3,-0.6l0.6,4.2l1.31,-1.26c2.36,1.74 5.7,1.57 7.84,-0.54c1.24,-1.23 1.81,-2.85 1.74,-4.46l-1.75,-0.34l0,0zm-7.28,-2.4c1.47,-1.45 3.74,-1.63 5.41,-0.54l-1.17,1.14l4.3,0.6l-0.6,-4.2l-1.31,1.26c-2.36,-1.74 -5.7,-1.57 -7.85,0.54c-1.24,1.23 -1.8,2.85 -1.73,4.46l1.75,0.35c-0.19,-1.28 0.2,-2.63 1.2,-3.61l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 546 B |
4
images/light/icon-unfold.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m12.5,11l2.5,2.5c0,0.55 -0.45,1 -1,1l-4,0l0,-1l3.5,0l-2,-2l-7,0l-2,2l3.5,0l0,1l-4,0c-0.55,0 -1,-0.45 -1,-1l2.5,-2.5l-2.5,-2.5c0,-0.55 0.45,-1 1,-1l4,0l0,1l-3.5,0l2,2l7,0l2,-2l-3.5,0l0,-1l4,0c0.55,0 1,0.45 1,1l-2.5,2.5l0,0zm-5.5,-1.5l2,0l0,-3l2,0l-3,-3l-3,3l2,0l0,3l0,0zm2,3l-2,0l0,3l-2,0l3,3l3,-3l-2,0l0,-3l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 467 B |
4
images/light/icon-upload.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg width="16" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#424242" d="m7,12l-2,0l3,-3l3,3l-2,0l0,5l-2,0l0,-5l0,0zm5,-4c0,-0.44 -0.91,-3 -4.5,-3c-2.42,0 -4.5,1.92 -4.5,4c-1.98,0 -3,1.52 -3,3c0,1.53 1,3 3,3l3,0l0,-1.3l-3,0c-1.62,0 -1.7,-1.42 -1.7,-1.7c0,-0.17 0.05,-1.7 1.7,-1.7l1.3,0l0,-1.3c0,-1.39 1.56,-2.7 3.2,-2.7c2.55,0 3.13,1.55 3.2,1.8l0,1.2l1.3,0c0.81,0 2.7,0.22 2.7,2.2c0,2.09 -2.25,2.2 -2.7,2.2l-2,0l0,1.3l2,0c2.08,0 4,-1.16 4,-3.5c0,-2.44 -1.92,-3.5 -4,-3.5l0,0z" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 558 B |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 64 KiB |
BIN
images/screenshot-git-custom-view-history.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
images/screenshot-git-custom-view-repository.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 12 KiB |
364
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlens",
|
"name": "gitlens",
|
||||||
"version": "4.4.1",
|
"version": "5.3.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -16,19 +16,19 @@
|
|||||||
"integrity": "sha1-qjuL2ivlErGuCgV7lC6GnDcKVWk=",
|
"integrity": "sha1-qjuL2ivlErGuCgV7lC6GnDcKVWk=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "8.0.24"
|
"@types/node": "8.0.31"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/mocha": {
|
"@types/mocha": {
|
||||||
"version": "2.2.42",
|
"version": "2.2.43",
|
||||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.42.tgz",
|
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.43.tgz",
|
||||||
"integrity": "sha512-b6gVDoxEbAQGwbV7gSzeFw/hy3/eEAokztktdzl4bHvGgb9K5zW4mVQDlVYch2w31m8t/J7L2iqhQvz3r5edCQ==",
|
"integrity": "sha512-xNlAmH+lRJdUMXClMTI9Y0pRqIojdxfm7DHsIxoB2iTzu3fnPmSMEN8SsSx0cdwV36d02PWCWaDUoZPDSln+xw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "8.0.24",
|
"version": "8.0.31",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.24.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.31.tgz",
|
||||||
"integrity": "sha512-c3Npme+2JGqxW8+B+aXdN5SPIlCf1C8WxQC6Ea39rO/ASPosnMkWVR16mDJtRE+2dr2xwOQ7DiLxb+wO/TWuPg==",
|
"integrity": "sha512-R+LdMJHJQwRd/Ca0Nr5KnwbSWHxTD3DWz4ivqoPeNH+YPcuirMWK+Ti9Mx32jOecmPhHOCd+6CefU5e1eVq2Ew==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/tmp": {
|
"@types/tmp": {
|
||||||
@@ -38,19 +38,22 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "4.11.8",
|
"version": "5.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz",
|
||||||
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
|
"integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"co": "4.6.0",
|
"co": "4.6.0",
|
||||||
|
"fast-deep-equal": "1.0.0",
|
||||||
|
"json-schema-traverse": "0.3.1",
|
||||||
"json-stable-stringify": "1.0.1"
|
"json-stable-stringify": "1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "3.0.0",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"ansi-styles": {
|
"ansi-styles": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
@@ -249,21 +252,6 @@
|
|||||||
"supports-color": "2.0.0"
|
"supports-color": "2.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"strip-ansi": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
|
||||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-regex": "2.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"supports-color": {
|
"supports-color": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||||
@@ -348,7 +336,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/copy-paste/-/copy-paste-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/copy-paste/-/copy-paste-1.3.0.tgz",
|
||||||
"integrity": "sha1-p+bEocKP3t8rCB5yuX3y75X0ce0=",
|
"integrity": "sha1-p+bEocKP3t8rCB5yuX3y75X0ce0=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"iconv-lite": "0.4.18",
|
"iconv-lite": "0.4.19",
|
||||||
"sync-exec": "0.6.2"
|
"sync-exec": "0.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -385,15 +373,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dateformat": {
|
"dateformat": {
|
||||||
"version": "2.0.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
|
||||||
"integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=",
|
"integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "2.6.8",
|
"version": "2.6.9",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
@@ -597,6 +585,12 @@
|
|||||||
"time-stamp": "1.1.0"
|
"time-stamp": "1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fast-deep-equal": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"fd-slicer": {
|
"fd-slicer": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
||||||
@@ -660,7 +654,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"asynckit": "0.4.0",
|
"asynckit": "0.4.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.5",
|
||||||
"mime-types": "2.1.16"
|
"mime-types": "2.1.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
@@ -684,7 +678,7 @@
|
|||||||
"graceful-fs": "4.1.11",
|
"graceful-fs": "4.1.11",
|
||||||
"inherits": "2.0.3",
|
"inherits": "2.0.3",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"rimraf": "2.6.1"
|
"rimraf": "2.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"generate-function": {
|
"generate-function": {
|
||||||
@@ -999,11 +993,11 @@
|
|||||||
"is-typedarray": "1.0.0",
|
"is-typedarray": "1.0.0",
|
||||||
"isstream": "0.1.2",
|
"isstream": "0.1.2",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"mime-types": "2.1.16",
|
"mime-types": "2.1.17",
|
||||||
"oauth-sign": "0.8.2",
|
"oauth-sign": "0.8.2",
|
||||||
"qs": "6.3.2",
|
"qs": "6.3.2",
|
||||||
"stringstream": "0.0.5",
|
"stringstream": "0.0.5",
|
||||||
"tough-cookie": "2.3.2",
|
"tough-cookie": "2.3.3",
|
||||||
"tunnel-agent": "0.4.3",
|
"tunnel-agent": "0.4.3",
|
||||||
"uuid": "3.1.0"
|
"uuid": "3.1.0"
|
||||||
}
|
}
|
||||||
@@ -1086,7 +1080,7 @@
|
|||||||
"array-uniq": "1.0.3",
|
"array-uniq": "1.0.3",
|
||||||
"beeper": "1.1.1",
|
"beeper": "1.1.1",
|
||||||
"chalk": "1.1.3",
|
"chalk": "1.1.3",
|
||||||
"dateformat": "2.0.0",
|
"dateformat": "2.2.0",
|
||||||
"fancy-log": "1.3.0",
|
"fancy-log": "1.3.0",
|
||||||
"gulplog": "1.0.0",
|
"gulplog": "1.0.0",
|
||||||
"has-gulplog": "0.1.0",
|
"has-gulplog": "0.1.0",
|
||||||
@@ -1187,9 +1181,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"har-schema": {
|
"har-schema": {
|
||||||
"version": "1.0.5",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
|
||||||
"integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
|
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"har-validator": {
|
"har-validator": {
|
||||||
@@ -1211,14 +1205,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "2.1.1"
|
"ansi-regex": "2.1.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ansi-regex": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
@@ -1248,6 +1234,12 @@
|
|||||||
"sntp": "1.0.9"
|
"sntp": "1.0.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"he": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "2.16.3",
|
"version": "2.16.3",
|
||||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
|
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
|
||||||
@@ -1266,14 +1258,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.4.18",
|
"version": "0.4.19",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||||
"integrity": "sha512-sr1ZQph3UwHTR0XftSbK85OvBbxe/abLGzEnPENCQwmHf7sck8Oyu4ob3LgBxWWxRoM+QszeUyl7jbqapu2TqA=="
|
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
|
||||||
},
|
},
|
||||||
"ignore": {
|
"ignore": {
|
||||||
"version": "3.3.3",
|
"version": "3.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.5.tgz",
|
||||||
"integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0="
|
"integrity": "sha512-JLH93mL8amZQhh/p6mfQgVBH3M6epNq3DfsXsTSuSrInVjwyYlFE1nv2AgfRCC8PoOhM0jwQ5v8s9LgbK7yGDw=="
|
||||||
},
|
},
|
||||||
"inflight": {
|
"inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
@@ -1330,11 +1322,6 @@
|
|||||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
|
||||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
|
||||||
},
|
|
||||||
"is-glob": {
|
"is-glob": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
|
||||||
@@ -1453,6 +1440,12 @@
|
|||||||
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
|
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"json-schema-traverse": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
|
||||||
|
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"json-stable-stringify": {
|
"json-stable-stringify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
|
||||||
@@ -1728,7 +1721,7 @@
|
|||||||
"normalize-path": "2.1.1",
|
"normalize-path": "2.1.1",
|
||||||
"object.omit": "2.0.1",
|
"object.omit": "2.0.1",
|
||||||
"parse-glob": "3.0.4",
|
"parse-glob": "3.0.4",
|
||||||
"regex-cache": "0.4.3"
|
"regex-cache": "0.4.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"is-extglob": {
|
"is-extglob": {
|
||||||
@@ -1749,18 +1742,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.29.0",
|
"version": "1.30.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
|
||||||
"integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=",
|
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mime-types": {
|
"mime-types": {
|
||||||
"version": "2.1.16",
|
"version": "2.1.17",
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz",
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
|
||||||
"integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=",
|
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mime-db": "1.29.0"
|
"mime-db": "1.30.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
@@ -1788,9 +1781,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mocha": {
|
"mocha": {
|
||||||
"version": "3.5.0",
|
"version": "3.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/mocha/-/mocha-3.5.3.tgz",
|
||||||
"integrity": "sha512-pIU2PJjrPYvYRqVpjXzj76qltO9uBYI7woYAMoxbSefsa+vqAfptjoeevd6bUgwD0mPIO+hv9f7ltvsNreL2PA==",
|
"integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"browser-stdout": "1.3.0",
|
"browser-stdout": "1.3.0",
|
||||||
@@ -1800,10 +1793,22 @@
|
|||||||
"escape-string-regexp": "1.0.5",
|
"escape-string-regexp": "1.0.5",
|
||||||
"glob": "7.1.1",
|
"glob": "7.1.1",
|
||||||
"growl": "1.9.2",
|
"growl": "1.9.2",
|
||||||
|
"he": "1.1.1",
|
||||||
"json3": "3.3.2",
|
"json3": "3.3.2",
|
||||||
"lodash.create": "3.1.1",
|
"lodash.create": "3.1.1",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"supports-color": "3.1.2"
|
"supports-color": "3.1.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
||||||
|
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
"moment": {
|
||||||
@@ -1964,9 +1969,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"performance-now": {
|
"performance-now": {
|
||||||
"version": "0.2.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||||
"integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
|
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pinkie": {
|
"pinkie": {
|
||||||
@@ -2080,13 +2085,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regex-cache": {
|
"regex-cache": {
|
||||||
"version": "0.4.3",
|
"version": "0.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
|
||||||
"integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=",
|
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-equal-shallow": "0.1.3",
|
"is-equal-shallow": "0.1.3"
|
||||||
"is-primitive": "2.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"remove-trailing-separator": {
|
"remove-trailing-separator": {
|
||||||
@@ -2114,57 +2118,147 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"request": {
|
"request": {
|
||||||
"version": "2.81.0",
|
"version": "2.82.0",
|
||||||
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
|
"resolved": "https://registry.npmjs.org/request/-/request-2.82.0.tgz",
|
||||||
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
|
"integrity": "sha512-/QWqfmyTfQ4OYs6EhB1h2wQsX9ZxbuNePCvCm0Mdz/mxw73mjdg0D4QdIl0TQBFs35CZmMXLjk0iCGK395CUDg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"aws-sign2": "0.6.0",
|
"aws-sign2": "0.7.0",
|
||||||
"aws4": "1.6.0",
|
"aws4": "1.6.0",
|
||||||
"caseless": "0.12.0",
|
"caseless": "0.12.0",
|
||||||
"combined-stream": "1.0.5",
|
"combined-stream": "1.0.5",
|
||||||
"extend": "3.0.1",
|
"extend": "3.0.1",
|
||||||
"forever-agent": "0.6.1",
|
"forever-agent": "0.6.1",
|
||||||
"form-data": "2.1.4",
|
"form-data": "2.3.1",
|
||||||
"har-validator": "4.2.1",
|
"har-validator": "5.0.3",
|
||||||
"hawk": "3.1.3",
|
"hawk": "6.0.2",
|
||||||
"http-signature": "1.1.1",
|
"http-signature": "1.2.0",
|
||||||
"is-typedarray": "1.0.0",
|
"is-typedarray": "1.0.0",
|
||||||
"isstream": "0.1.2",
|
"isstream": "0.1.2",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"mime-types": "2.1.16",
|
"mime-types": "2.1.17",
|
||||||
"oauth-sign": "0.8.2",
|
"oauth-sign": "0.8.2",
|
||||||
"performance-now": "0.2.0",
|
"performance-now": "2.1.0",
|
||||||
"qs": "6.4.0",
|
"qs": "6.5.1",
|
||||||
"safe-buffer": "5.1.1",
|
"safe-buffer": "5.1.1",
|
||||||
"stringstream": "0.0.5",
|
"stringstream": "0.0.5",
|
||||||
"tough-cookie": "2.3.2",
|
"tough-cookie": "2.3.3",
|
||||||
"tunnel-agent": "0.6.0",
|
"tunnel-agent": "0.6.0",
|
||||||
"uuid": "3.1.0"
|
"uuid": "3.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"assert-plus": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"aws-sign2": {
|
||||||
|
"version": "0.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||||
|
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"boom": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
|
||||||
|
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"hoek": "4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"caseless": {
|
"caseless": {
|
||||||
"version": "0.12.0",
|
"version": "0.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
||||||
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
|
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"har-validator": {
|
"cryptiles": {
|
||||||
"version": "4.2.1",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
|
||||||
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
|
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ajv": "4.11.8",
|
"boom": "5.2.0"
|
||||||
"har-schema": "1.0.5"
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"boom": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"hoek": "4.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"form-data": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz",
|
||||||
|
"integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"asynckit": "0.4.0",
|
||||||
|
"combined-stream": "1.0.5",
|
||||||
|
"mime-types": "2.1.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"har-validator": {
|
||||||
|
"version": "5.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
|
||||||
|
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ajv": "5.2.3",
|
||||||
|
"har-schema": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hawk": {
|
||||||
|
"version": "6.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
|
||||||
|
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"boom": "4.3.1",
|
||||||
|
"cryptiles": "3.1.2",
|
||||||
|
"hoek": "4.2.0",
|
||||||
|
"sntp": "2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hoek": {
|
||||||
|
"version": "4.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
|
||||||
|
"integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"http-signature": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"assert-plus": "1.0.0",
|
||||||
|
"jsprim": "1.4.1",
|
||||||
|
"sshpk": "1.13.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.4.0",
|
"version": "6.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
|
||||||
"integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
|
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"sntp": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"hoek": "4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tunnel-agent": {
|
"tunnel-agent": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||||
@@ -2192,9 +2286,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rimraf": {
|
"rimraf": {
|
||||||
"version": "2.6.1",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
||||||
"integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
|
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "7.1.1"
|
"glob": "7.1.1"
|
||||||
@@ -2235,9 +2329,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"source-map-support": {
|
"source-map-support": {
|
||||||
"version": "0.4.16",
|
"version": "0.4.18",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.16.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
|
||||||
"integrity": "sha512-A6vlydY7H/ljr4L2UOhDSajQdZQ6dMD7cLH0pzwcmwLyc9u8PNI4WGtnfDDzX7uzGL6c/T+ORL97Zlh+S4iOrg==",
|
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"source-map": "0.5.7"
|
"source-map": "0.5.7"
|
||||||
@@ -2254,7 +2348,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-2.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-2.0.11.tgz",
|
||||||
"integrity": "sha1-ZUUa1lZigB2up1VJgyp4LeAEjb8=",
|
"integrity": "sha1-ZUUa1lZigB2up1VJgyp4LeAEjb8=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "2.6.8",
|
"debug": "2.6.9",
|
||||||
"lodash.assign": "4.2.0",
|
"lodash.assign": "4.2.0",
|
||||||
"rxjs": "5.4.3"
|
"rxjs": "5.4.3"
|
||||||
}
|
}
|
||||||
@@ -2337,15 +2431,6 @@
|
|||||||
"safe-buffer": "5.1.1"
|
"safe-buffer": "5.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string-width": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
|
||||||
"requires": {
|
|
||||||
"is-fullwidth-code-point": "2.0.0",
|
|
||||||
"strip-ansi": "4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stringstream": {
|
"stringstream": {
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
||||||
@@ -2353,11 +2438,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "4.0.0",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "3.0.0"
|
"ansi-regex": "2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strip-bom": {
|
"strip-bom": {
|
||||||
@@ -2460,9 +2546,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
"version": "2.3.2",
|
"version": "2.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
|
||||||
"integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
|
"integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"punycode": "1.4.1"
|
"punycode": "1.4.1"
|
||||||
@@ -2475,9 +2561,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tslint": {
|
"tslint": {
|
||||||
"version": "5.6.0",
|
"version": "5.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.7.0.tgz",
|
||||||
"integrity": "sha1-CIqmxgJmIzOGULKQCCirPt9Z9s8=",
|
"integrity": "sha1-wl4NDJL6EgHCvDDoROCOaCtPNVI=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"babel-code-frame": "6.26.0",
|
"babel-code-frame": "6.26.0",
|
||||||
@@ -2489,13 +2575,13 @@
|
|||||||
"resolve": "1.4.0",
|
"resolve": "1.4.0",
|
||||||
"semver": "5.4.1",
|
"semver": "5.4.1",
|
||||||
"tslib": "1.7.1",
|
"tslib": "1.7.1",
|
||||||
"tsutils": "2.8.1"
|
"tsutils": "2.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
"version": "2.8.1",
|
"version": "2.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.9.0.tgz",
|
||||||
"integrity": "sha1-N3FATnyp8L7fXZGaR6SxiQpo7/8=",
|
"integrity": "sha1-fhU3tVa6tocvp+ZIXf9FsHbVUz0=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "1.7.1"
|
"tslib": "1.7.1"
|
||||||
@@ -2515,9 +2601,9 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "2.4.2",
|
"version": "2.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.5.3.tgz",
|
||||||
"integrity": "sha1-+DlfhdRZJ2BnyYiqQYN6j4KHCEQ=",
|
"integrity": "sha512-ptLSQs2S4QuS6/OD1eAKG+S5G8QQtrU5RT32JULdZQtM1L3WTi34Wsu48Yndzi8xsObRAB9RPt/KhA9wlpEF6w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"unique-stream": {
|
"unique-stream": {
|
||||||
@@ -2708,10 +2794,10 @@
|
|||||||
"gulp-symdest": "1.1.0",
|
"gulp-symdest": "1.1.0",
|
||||||
"gulp-untar": "0.0.6",
|
"gulp-untar": "0.0.6",
|
||||||
"gulp-vinyl-zip": "1.4.0",
|
"gulp-vinyl-zip": "1.4.0",
|
||||||
"mocha": "3.5.0",
|
"mocha": "3.5.3",
|
||||||
"request": "2.81.0",
|
"request": "2.82.0",
|
||||||
"semver": "5.4.1",
|
"semver": "5.4.1",
|
||||||
"source-map-support": "0.4.16",
|
"source-map-support": "0.4.18",
|
||||||
"url-parse": "1.1.9",
|
"url-parse": "1.1.9",
|
||||||
"vinyl-source-stream": "1.1.0"
|
"vinyl-source-stream": "1.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
631
package.json
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "gitlens",
|
"name": "gitlens",
|
||||||
"version": "4.4.1",
|
"version": "5.3.0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Eric Amodio",
|
"name": "Eric Amodio",
|
||||||
"email": "eamodio@gmail.com"
|
"email": "eamodio@gmail.com"
|
||||||
},
|
},
|
||||||
"publisher": "eamodio",
|
"publisher": "eamodio",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.15.0"
|
"vscode": "^1.16.0"
|
||||||
},
|
},
|
||||||
"license": "SEE LICENSE IN LICENSE",
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
"displayName": "Git Lens \u2014 git blame annotations, code lens, and more",
|
"displayName": "Git Lens \u2014 git blame annotations, code lens, and more",
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
"badges": [
|
"badges": [
|
||||||
{
|
{
|
||||||
"url": "https://img.shields.io/badge/chat-on%20slack-brightgreen.svg",
|
"url": "https://img.shields.io/badge/chat-on%20slack-brightgreen.svg",
|
||||||
"href": "https://join.slack.com/t/vscode-gitlens/shared_invite/MjIxOTgxNDE3NzM0LTE1MDE2Nzk1MTgtMjkwMmZjMzcxNQ",
|
"href": "https://join.slack.com/t/vscode-dev-community/shared_invite/enQtMjIxOTgxNDE3NzM0LWU5M2ZiZDU1YjBlMzdlZjA2YjBjYzRhYTM5NTgzMTAxMjdiNWU0ZmQzYWI3MWU5N2Q1YjBiYmQ4MzY0NDE1MzY",
|
||||||
"description": "Chat at https://vscode-gitlens.slack.com/"
|
"description": "Chat at https://vscode-dev-community.slack.com/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"categories": [
|
"categories": [
|
||||||
@@ -132,11 +132,6 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"description": "Specifies whether or not to provide a changes (diff) hover annotation"
|
"description": "Specifies whether or not to provide a changes (diff) hover annotation"
|
||||||
},
|
},
|
||||||
"gitlens.annotations.file.recentChanges.hover.wholeLine": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true,
|
|
||||||
"description": "Specifies whether or not to trigger hover annotations over the whole line"
|
|
||||||
},
|
|
||||||
"gitlens.annotations.line.hover.details": {
|
"gitlens.annotations.line.hover.details": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
@@ -172,6 +167,11 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"description": "Specifies whether or not to trigger hover annotations over the whole line"
|
"description": "Specifies whether or not to trigger hover annotations over the whole line"
|
||||||
},
|
},
|
||||||
|
"gitlens.blame.ignoreWhitespace": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Specifies whether or not to ignore whitespace when comparing revisions during blame operations"
|
||||||
|
},
|
||||||
"gitlens.blame.file.annotationType": {
|
"gitlens.blame.file.annotationType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "gutter",
|
"default": "gutter",
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
"minItems": 1,
|
"minItems": 1,
|
||||||
"maxItems": 4,
|
"maxItems": 4,
|
||||||
"uniqueItems": true,
|
"uniqueItems": true,
|
||||||
"description": "Specifies where Git code lens will be shown in the document\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`"
|
"description": "Specifies where Git code lens will be shown in the document\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `gitlens.codeLens.locationCustomSymbols`"
|
||||||
},
|
},
|
||||||
"gitlens.codeLens.customLocationSymbols": {
|
"gitlens.codeLens.customLocationSymbols": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@@ -388,7 +388,7 @@
|
|||||||
"minItems": 1,
|
"minItems": 1,
|
||||||
"maxItems": 4,
|
"maxItems": 4,
|
||||||
"uniqueItems": true,
|
"uniqueItems": true,
|
||||||
"description": "Specifies where Git code lens will be shown in the document for the specified language\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `customSymbols`"
|
"description": "Specifies where Git code lens will be shown in the document for the specified language\n `document` - adds code lens at the top of the document\n `containers` - adds code lens at the start of container-like symbols (modules, classes, interfaces, etc)\n `blocks` - adds code lens at the start of block-like symbols (functions, methods, properties, etc) lines\n `custom` - adds code lens at the start of symbols contained in `customSymbols`"
|
||||||
},
|
},
|
||||||
"customSymbols": {
|
"customSymbols": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@@ -413,15 +413,104 @@
|
|||||||
"default": null,
|
"default": null,
|
||||||
"description": "Specifies how all absolute dates will be formatted by default\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats"
|
"description": "Specifies how all absolute dates will be formatted by default\nSee https://momentjs.com/docs/#/displaying/format/ for valid formats"
|
||||||
},
|
},
|
||||||
"gitlens.stashExplorer.stashFormat": {
|
"gitlens.gitExplorer.commitFormat": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "${message} \u00a0\u2022\u00a0 ${authorAgo} \u00a0 (${id})",
|
||||||
|
"description": "Specifies the format of committed changes in the `GitLens` custom view\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 ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.commitFileFormat": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "${filePath}",
|
||||||
|
"description": "Specifies the format of a committed file in the `GitLens` custom view\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.enabled": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Specifies whether or not to show the `GitLens` custom view"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.files.layout": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "auto",
|
||||||
|
"enum": [
|
||||||
|
"auto",
|
||||||
|
"list",
|
||||||
|
"tree"
|
||||||
|
],
|
||||||
|
"description": "Specifies how the `GitLens` custom view will display files\n `auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.gitExplorer.files.threshold` setting and the number of files at each nesting level\n `list` - displays files as a list\n `tree` - displays files as a tree"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.files.compact": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Specifies whether or not to compact (flatten) unnecessary file nesting in the `GitLens` custom view\nOnly applies when displaying files as a `tree` or `auto`"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.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 `GitLens` custom view\nOnly applies when displaying files as `auto`"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.includeWorkingTree": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Specifies whether or not to include working tree files inside the `Repository Status` node of the `GitLens` custom view"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.showTrackingBranch": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Specifies whether or not to show the tracking branch when displaying local branches in the `GitLens` custom view"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.stashFormat": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "${message}",
|
"default": "${message}",
|
||||||
"description": "Specifies the format of stashed changes in the `Git Stashes` explorer\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 ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
|
"description": "Specifies the format of stashed changes in the `GitLens` custom view\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 ${authorAgo} - commit author, relative commit date\nSee https://github.com/eamodio/vscode-gitlens/wiki/Advanced-Formatting for advanced formatting"
|
||||||
},
|
},
|
||||||
"gitlens.stashExplorer.stashFileFormat": {
|
"gitlens.gitExplorer.stashFileFormat": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "${file} \u00a0\u2022\u00a0 ${path}",
|
"default": "${filePath}",
|
||||||
"description": "Specifies the format of a stashed file in the `Git Stashes` explorer\nAvailable tokens\n ${file} - file name\n ${path} - file path"
|
"description": "Specifies the format of a stashed file in the `GitLens` custom view\nAvailable tokens\n ${directory} - directory name\n ${file} - file name\n ${filePath} - formatted file name and path\n ${path} - full file path"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.statusFileFormat": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "${working}${filePath}",
|
||||||
|
"description": "Specifies the format of the status of a working or committed file in the `GitLens` custom 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"
|
||||||
|
},
|
||||||
|
"gitlens.gitExplorer.view": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "auto",
|
||||||
|
"enum": [
|
||||||
|
"auto",
|
||||||
|
"history",
|
||||||
|
"repository"
|
||||||
|
],
|
||||||
|
"description": "Specifies the starting view (mode) of the `GitLens` custom view\n `auto` - shows the last selected view, defaults to `repository`\n `history` - shows the commit history of the active file\n `repository` - shows a repository explorer"
|
||||||
|
},
|
||||||
|
"gitlens.remotes": {
|
||||||
|
"type": "array",
|
||||||
|
"default": null,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"domain"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"Bitbucket",
|
||||||
|
"BitbucketServer",
|
||||||
|
"GitHub",
|
||||||
|
"GitLab"
|
||||||
|
],
|
||||||
|
"description": "Specifies the type of the custom remote service\n `Bitbucket`, `BitbucketServer`, `GitHub`, or `GitLab`"
|
||||||
|
},
|
||||||
|
"domain": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Specifies the domain name of the custom remote service"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uniqueItems": true,
|
||||||
|
"description": "Specifies any custom domains for remote (code-hosting) services"
|
||||||
},
|
},
|
||||||
"gitlens.statusBar.enabled": {
|
"gitlens.statusBar.enabled": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@@ -593,16 +682,16 @@
|
|||||||
},
|
},
|
||||||
"editorTitle": {
|
"editorTitle": {
|
||||||
"blame": true,
|
"blame": true,
|
||||||
"fileDiff": true,
|
"fileDiff": false,
|
||||||
"history": true,
|
"history": false,
|
||||||
"remote": true,
|
"remote": false,
|
||||||
"status": true
|
"status": false
|
||||||
},
|
},
|
||||||
"editorTitleContext": {
|
"editorTitleContext": {
|
||||||
"blame": true,
|
"blame": false,
|
||||||
"fileDiff": true,
|
"fileDiff": false,
|
||||||
"history": true,
|
"history": false,
|
||||||
"remote": true
|
"remote": false
|
||||||
},
|
},
|
||||||
"explorerContext": {
|
"explorerContext": {
|
||||||
"fileDiff": true,
|
"fileDiff": true,
|
||||||
@@ -760,6 +849,11 @@
|
|||||||
"title": "Directory Compare",
|
"title": "Directory Compare",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.diffWith",
|
||||||
|
"title": "Compare File Revisions",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithBranch",
|
"command": "gitlens.diffWithBranch",
|
||||||
"title": "Compare File with Branch...",
|
"title": "Compare File with Branch...",
|
||||||
@@ -767,17 +861,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithNext",
|
"command": "gitlens.diffWithNext",
|
||||||
"title": "Compare File with Next Commit",
|
"title": "Compare File with Next Revision",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithPrevious",
|
"command": "gitlens.diffWithPrevious",
|
||||||
"title": "Compare File with Previous",
|
"title": "Compare File with Previous Revision",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffLineWithPrevious",
|
"command": "gitlens.diffLineWithPrevious",
|
||||||
"title": "Compare Line Commit with Previous",
|
"title": "Compare Line Revision with Previous",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -787,12 +881,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithWorking",
|
"command": "gitlens.diffWithWorking",
|
||||||
"title": "Compare File with Working Tree",
|
"title": "Compare File with Working Revision",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffLineWithWorking",
|
"command": "gitlens.diffLineWithWorking",
|
||||||
"title": "Compare Line Commit with Working Tree",
|
"title": "Compare Line Revision with Working",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -859,7 +953,11 @@
|
|||||||
{
|
{
|
||||||
"command": "gitlens.showCommitSearch",
|
"command": "gitlens.showCommitSearch",
|
||||||
"title": "Search Commits",
|
"title": "Search Commits",
|
||||||
"category": "GitLens"
|
"category": "GitLens",
|
||||||
|
"icon": {
|
||||||
|
"dark": "images/dark/icon-search.svg",
|
||||||
|
"light": "images/light/icon-search.svg"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.showFileHistory",
|
"command": "gitlens.showFileHistory",
|
||||||
@@ -926,6 +1024,11 @@
|
|||||||
"title": "Open Changed Files",
|
"title": "Open Changed Files",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openBranchesInRemote",
|
||||||
|
"title": "Open Branches in Remote",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openBranchInRemote",
|
"command": "gitlens.openBranchInRemote",
|
||||||
"title": "Open Branch in Remote",
|
"title": "Open Branch in Remote",
|
||||||
@@ -965,6 +1068,11 @@
|
|||||||
"light": "images/light/icon-add.svg"
|
"light": "images/light/icon-add.svg"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.externalDiff",
|
||||||
|
"title": "Open Changes (with difftool)",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.resetSuppressedWarnings",
|
"command": "gitlens.resetSuppressedWarnings",
|
||||||
"title": "Reset Suppressed Warnings",
|
"title": "Reset Suppressed Warnings",
|
||||||
@@ -980,32 +1088,71 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.refresh",
|
"command": "gitlens.gitExplorer.switchToHistoryView",
|
||||||
"title": "Refresh",
|
"title": "Switch to History View",
|
||||||
"category": "GitLens",
|
"category": "GitLens",
|
||||||
"icon": {
|
"icon": {
|
||||||
"dark": "images/dark/icon-refresh.svg",
|
"dark": "images/dark/icon-history.svg",
|
||||||
"light": "images/light/icon-refresh.svg"
|
"light": "images/light/icon-history.svg"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openChanges",
|
"command": "gitlens.gitExplorer.switchToRepositoryView",
|
||||||
|
"title": "Switch to Repository View",
|
||||||
|
"category": "GitLens",
|
||||||
|
"icon": {
|
||||||
|
"dark": "images/dark/icon-repo.svg",
|
||||||
|
"light": "images/light/icon-repo.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChanges",
|
||||||
"title": "Open Changes",
|
"title": "Open Changes",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openFile",
|
"command": "gitlens.gitExplorer.openChangesWithWorking",
|
||||||
|
"title": "Open Changes with Working Tree",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
"title": "Open File",
|
"title": "Open File",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openStashedFile",
|
"command": "gitlens.gitExplorer.openFileRevision",
|
||||||
"title": "Open Stashed File",
|
"title": "Open Revision",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openFileInRemote",
|
"command": "gitlens.gitExplorer.openFileRevisionInRemote",
|
||||||
"title": "Open File in Remote",
|
"title": "Open Revision in Remote",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFiles",
|
||||||
|
"title": "Open Files",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChanges",
|
||||||
|
"title": "Open All Changes",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChangesWithWorking",
|
||||||
|
"title": "Open All Changes with Working Tree",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileRevisions",
|
||||||
|
"title": "Open Revisions",
|
||||||
|
"category": "GitLens"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.applyChanges",
|
||||||
|
"title": "Apply Changes",
|
||||||
"category": "GitLens"
|
"category": "GitLens"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1015,6 +1162,10 @@
|
|||||||
"command": "gitlens.diffDirectory",
|
"command": "gitlens.diffDirectory",
|
||||||
"when": "gitlens:enabled"
|
"when": "gitlens:enabled"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.diffWith",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithBranch",
|
"command": "gitlens.diffWithBranch",
|
||||||
"when": "gitlens:isTracked"
|
"when": "gitlens:isTracked"
|
||||||
@@ -1131,6 +1282,10 @@
|
|||||||
"command": "gitlens.openChangedFiles",
|
"command": "gitlens.openChangedFiles",
|
||||||
"when": "gitlens:enabled"
|
"when": "gitlens:enabled"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openBranchesInRemote",
|
||||||
|
"when": "gitlens:hasRemotes"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openBranchInRemote",
|
"command": "gitlens.openBranchInRemote",
|
||||||
"when": "gitlens:hasRemotes"
|
"when": "gitlens:hasRemotes"
|
||||||
@@ -1161,26 +1316,54 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.gitExplorer.refresh",
|
"command": "gitlens.gitExplorer.refresh",
|
||||||
"when": "gitlens:enabled"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashExplorer.refresh",
|
|
||||||
"when": "gitlens:enabled"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashExplorer.openChanges",
|
|
||||||
"when": "false"
|
"when": "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openFile",
|
"command": "gitlens.gitExplorer.switchToHistoryView",
|
||||||
|
"when": "gitlens:gitExplorer:view == repository"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.switchToRepositoryView",
|
||||||
|
"when": "gitlens:gitExplorer:view == history"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChanges",
|
||||||
"when": "false"
|
"when": "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openStashedFile",
|
"command": "gitlens.gitExplorer.openChangesWithWorking",
|
||||||
"when": "false"
|
"when": "false"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openFileInRemote",
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevision",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevisionInRemote",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFiles",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChanges",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChangesWithWorking",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileRevisions",
|
||||||
|
"when": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.applyChanges",
|
||||||
"when": "false"
|
"when": "false"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1255,12 +1438,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openFileInRemote",
|
"command": "gitlens.openFileInRemote",
|
||||||
"when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote",
|
"when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitle.remote",
|
||||||
"group": "1_gitlens"
|
"group": "1_gitlens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openRepoInRemote",
|
"command": "gitlens.openRepoInRemote",
|
||||||
"when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote",
|
"when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitle.remote",
|
||||||
"group": "1_gitlens"
|
"group": "1_gitlens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1292,7 +1475,7 @@
|
|||||||
"editor/title/context": [
|
"editor/title/context": [
|
||||||
{
|
{
|
||||||
"command": "gitlens.openFileInRemote",
|
"command": "gitlens.openFileInRemote",
|
||||||
"when": "gitlens:enabled && config.gitlens.advanced.menus.editorTitleContext.remote",
|
"when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.editorTitleContext.remote",
|
||||||
"group": "1_gitlens"
|
"group": "1_gitlens"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1319,7 +1502,7 @@
|
|||||||
"explorer/context": [
|
"explorer/context": [
|
||||||
{
|
{
|
||||||
"command": "gitlens.openFileInRemote",
|
"command": "gitlens.openFileInRemote",
|
||||||
"when": "gitlens:enabled && config.gitlens.advanced.menus.explorerContext.remote",
|
"when": "gitlens:enabled && gitlens:hasRemotes && config.gitlens.advanced.menus.explorerContext.remote",
|
||||||
"group": "navigation@100"
|
"group": "navigation@100"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1342,12 +1525,22 @@
|
|||||||
{
|
{
|
||||||
"command": "gitlens.openChangedFiles",
|
"command": "gitlens.openChangedFiles",
|
||||||
"when": "gitlens:enabled",
|
"when": "gitlens:enabled",
|
||||||
"group": "1_gitlens@1"
|
"group": "2_gitlens@1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.closeUnchangedFiles",
|
"command": "gitlens.closeUnchangedFiles",
|
||||||
"when": "gitlens:enabled",
|
"when": "gitlens:enabled",
|
||||||
"group": "1_gitlens@2"
|
"group": "2_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.externalDiff",
|
||||||
|
"when": "gitlens:enabled",
|
||||||
|
"group": "2_gitlens@3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.stashSave",
|
||||||
|
"when": "gitlens:enabled",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"scm/resourceState/context": [
|
"scm/resourceState/context": [
|
||||||
@@ -1356,6 +1549,11 @@
|
|||||||
"when": "gitlens:enabled && gitlens:hasRemotes",
|
"when": "gitlens:enabled && gitlens:hasRemotes",
|
||||||
"group": "navigation"
|
"group": "navigation"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.externalDiff",
|
||||||
|
"when": "gitlens:enabled",
|
||||||
|
"group": "navigation"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithRevision",
|
"command": "gitlens.diffWithRevision",
|
||||||
"when": "gitlens:enabled",
|
"when": "gitlens:enabled",
|
||||||
@@ -1365,80 +1563,280 @@
|
|||||||
"command": "gitlens.showQuickFileHistory",
|
"command": "gitlens.showQuickFileHistory",
|
||||||
"when": "gitlens:enabled",
|
"when": "gitlens:enabled",
|
||||||
"group": "1_gitlens_1@1"
|
"group": "1_gitlens_1@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.stashSave",
|
||||||
|
"when": "gitlens:enabled",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"view/title": [
|
"view/title": [
|
||||||
{
|
{
|
||||||
"command": "gitlens.gitExplorer.refresh",
|
"command": "gitlens.showCommitSearch",
|
||||||
"when": "gitlens:enabled && view == gitlens.gitExplorer",
|
"when": "view == gitlens.gitExplorer",
|
||||||
"group": "navigation"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashSave",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer",
|
|
||||||
"group": "navigation@1"
|
"group": "navigation@1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.refresh",
|
"command": "gitlens.gitExplorer.switchToHistoryView",
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer",
|
"when": "view == gitlens.gitExplorer && gitlens:gitExplorer:view == repository",
|
||||||
"group": "navigation@2"
|
"group": "navigation@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.switchToRepositoryView",
|
||||||
|
"when": "view == gitlens.gitExplorer && gitlens:gitExplorer:view == history",
|
||||||
|
"group": "navigation@3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.refresh",
|
||||||
|
"when": "view == gitlens.gitExplorer",
|
||||||
|
"group": "navigation@4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"view/item/context": [
|
"view/item/context": [
|
||||||
|
{
|
||||||
|
"command": "gitlens.openBranchesInRemote",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:branches:remote",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openBranchInRemote",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:branch-history:remote",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openCommitInRemote",
|
"command": "gitlens.openCommitInRemote",
|
||||||
"when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == commit",
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChangesWithWorking",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFiles",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileRevisions",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "3_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.copyShaToClipboard",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "4_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.copyMessageToClipboard",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "4_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickCommitDetails",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit",
|
||||||
|
"group": "5_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangesWithWorking",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "1_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevision",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "2_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openFileInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevisionInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "3_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.applyChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "4_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickFileHistory",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file && gitlens:gitExplorer:view == repository",
|
||||||
|
"group": "5_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickCommitFileDetails",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:commit-file",
|
||||||
|
"group": "5_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:file-history",
|
||||||
"group": "1_gitlens@1"
|
"group": "1_gitlens@1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.openFileInRemote",
|
"command": "gitlens.openFileInRemote",
|
||||||
"when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == commit-file",
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:file-history",
|
||||||
"group": "1_gitlens@1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.diffWithPrevious",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == commit-file",
|
|
||||||
"group": "2_gitlens@1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.diffWithWorking",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.gitExplorer && viewItem == commit-file",
|
|
||||||
"group": "2_gitlens@2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashApply",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == stash-commit",
|
|
||||||
"group": "3_gitlens@1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashDelete",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == stash-commit",
|
|
||||||
"group": "3_gitlens@1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashExplorer.openChanges",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == commit-file",
|
|
||||||
"group": "1_gitlens@1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"command": "gitlens.stashExplorer.openFile",
|
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == commit-file",
|
|
||||||
"group": "1_gitlens@2"
|
"group": "1_gitlens@2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openStashedFile",
|
"command": "gitlens.openBranchesInRemote",
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == commit-file",
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:remote",
|
||||||
"group": "1_gitlens@3"
|
"group": "1_gitlens@1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.stashExplorer.openFileInRemote",
|
"command": "gitlens.openRepoInRemote",
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == commit-file",
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:remote",
|
||||||
"group": "1_gitlens@4"
|
"group": "1_gitlens@2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "gitlens.diffWithWorking",
|
"command": "gitlens.stashSave",
|
||||||
"when": "gitlens:enabled && view == gitlens.stashExplorer && viewItem == commit-file",
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stashes",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.stashApply",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.stashDelete",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "1_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileChangesWithWorking",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFiles",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangedFileRevisions",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "3_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.copyMessageToClipboard",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash",
|
||||||
|
"group": "4_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.applyChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangesWithWorking",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
"group": "2_gitlens@2"
|
"group": "2_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevision",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "3_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openFileInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "4_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickFileHistory",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:stash-file",
|
||||||
|
"group": "5_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openRepoInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:status",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChanges",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openChangesWithWorking",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "1_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "2_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFileRevision",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "2_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openFileInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "3_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickFileHistory",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file && gitlens:gitExplorer:view == repository",
|
||||||
|
"group": "5_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.showQuickCommitFileDetails",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file",
|
||||||
|
"group": "5_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.openFile",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem == gitlens:status-file-commits",
|
||||||
|
"group": "1_gitlens@1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.openFileInRemote",
|
||||||
|
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:status-file-commits",
|
||||||
|
"group": "1_gitlens@2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "gitlens.gitExplorer.refresh",
|
||||||
|
"when": "view == gitlens.gitExplorer && viewItem != gitlens:commit-file && viewItem != gitlens:stash-file && viewItem != gitlens:status-file",
|
||||||
|
"group": "9_gitlens@1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1537,9 +1935,9 @@
|
|||||||
"views": {
|
"views": {
|
||||||
"explorer": [
|
"explorer": [
|
||||||
{
|
{
|
||||||
"id": "gitlens.stashExplorer",
|
"id": "gitlens.gitExplorer",
|
||||||
"name": "Git Stashes",
|
"name": "GitLens",
|
||||||
"when": "gitlens:enabled"
|
"when": "gitlens:enabled && config.gitlens.gitExplorer.enabled"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1561,26 +1959,25 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"applicationinsights": "0.21.0",
|
"applicationinsights": "0.21.0",
|
||||||
"copy-paste": "1.3.0",
|
"copy-paste": "1.3.0",
|
||||||
"iconv-lite": "0.4.18",
|
"iconv-lite": "0.4.19",
|
||||||
"ignore": "3.3.3",
|
"ignore": "3.3.5",
|
||||||
"lodash.debounce": "4.0.8",
|
"lodash.debounce": "4.0.8",
|
||||||
"lodash.escaperegexp": "4.1.2",
|
"lodash.escaperegexp": "4.1.2",
|
||||||
"lodash.isequal": "4.5.0",
|
"lodash.isequal": "4.5.0",
|
||||||
"lodash.once": "4.1.1",
|
"lodash.once": "4.1.1",
|
||||||
"moment": "2.18.1",
|
"moment": "2.18.1",
|
||||||
"spawn-rx": "2.0.11",
|
"spawn-rx": "2.0.11",
|
||||||
"string-width": "2.1.1",
|
|
||||||
"tmp": "0.0.33"
|
"tmp": "0.0.33"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/copy-paste": "1.1.30",
|
"@types/copy-paste": "1.1.30",
|
||||||
"@types/iconv-lite": "0.0.1",
|
"@types/iconv-lite": "0.0.1",
|
||||||
"@types/mocha": "2.2.42",
|
"@types/mocha": "2.2.43",
|
||||||
"@types/node": "8.0.24",
|
"@types/node": "8.0.31",
|
||||||
"@types/tmp": "0.0.33",
|
"@types/tmp": "0.0.33",
|
||||||
"mocha": "3.5.0",
|
"mocha": "3.5.3",
|
||||||
"tslint": "5.6.0",
|
"tslint": "5.7.0",
|
||||||
"typescript": "2.4.2",
|
"typescript": "2.5.3",
|
||||||
"vscode": "1.1.5"
|
"vscode": "1.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ export class AnnotationController extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getProvider(editor: TextEditor | undefined): AnnotationProviderBase | undefined {
|
getProvider(editor: TextEditor | undefined): AnnotationProviderBase | undefined {
|
||||||
if (!editor || !editor.document || !this.git.isEditorBlameable(editor)) return undefined;
|
if (editor === undefined || editor.document === undefined || !this.git.isEditorBlameable(editor)) return undefined;
|
||||||
|
|
||||||
return this._annotationProviders.get(editor.viewColumn || -1);
|
return this._annotationProviders.get(editor.viewColumn || -1);
|
||||||
}
|
}
|
||||||
@@ -233,7 +233,7 @@ export class AnnotationController extends Disposable {
|
|||||||
if (!editor || !editor.document || !this.git.isEditorBlameable(editor)) return false;
|
if (!editor || !editor.document || !this.git.isEditorBlameable(editor)) return false;
|
||||||
|
|
||||||
const currentProvider = this._annotationProviders.get(editor.viewColumn || -1);
|
const currentProvider = this._annotationProviders.get(editor.viewColumn || -1);
|
||||||
if (currentProvider && TextEditorComparer.equals(currentProvider.editor, editor)) {
|
if (currentProvider !== undefined && TextEditorComparer.equals(currentProvider.editor, editor)) {
|
||||||
await currentProvider.selection(shaOrLine);
|
await currentProvider.selection(shaOrLine);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Strings } from '../system';
|
import { Dates, Objects, Strings } from '../system';
|
||||||
import { DecorationInstanceRenderOptions, DecorationOptions, ThemableDecorationRenderOptions } from 'vscode';
|
import { DecorationInstanceRenderOptions, DecorationOptions, MarkdownString, ThemableDecorationRenderOptions } from 'vscode';
|
||||||
|
import { DiffWithCommand, OpenCommitInRemoteCommand, ShowQuickCommitDetailsCommand } from '../commands';
|
||||||
import { IThemeConfig, themeDefaults } from '../configuration';
|
import { IThemeConfig, themeDefaults } from '../configuration';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { CommitFormatter, GitCommit, GitDiffChunkLine, GitService, GitUri, ICommitFormatOptions } from '../gitService';
|
import { CommitFormatter, GitCommit, GitDiffChunkLine, GitService, GitUri, ICommitFormatOptions } from '../gitService';
|
||||||
import * as moment from 'moment';
|
|
||||||
|
|
||||||
interface IHeatmapConfig {
|
interface IHeatmapConfig {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
@@ -27,13 +27,13 @@ const escapeMarkdownRegEx = /[`\>\#\*\_\-\+\.]/g;
|
|||||||
|
|
||||||
export class Annotations {
|
export class Annotations {
|
||||||
|
|
||||||
static applyHeatmap(decoration: DecorationOptions, date: Date, now: moment.Moment) {
|
static applyHeatmap(decoration: DecorationOptions, date: Date, now: number) {
|
||||||
const color = this._getHeatmapColor(now, date);
|
const color = this._getHeatmapColor(now, date);
|
||||||
(decoration.renderOptions!.before! as any).borderColor = color;
|
(decoration.renderOptions!.before! as any).borderColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static _getHeatmapColor(now: moment.Moment, date: Date) {
|
private static _getHeatmapColor(now: number, date: Date) {
|
||||||
const days = now.diff(moment(date), 'days');
|
const days = Dates.dateDaysFromNow(date, now);
|
||||||
|
|
||||||
if (days <= 2) return '#ffeca7';
|
if (days <= 2) return '#ffeca7';
|
||||||
if (days <= 7) return '#ffdd8c';
|
if (days <= 7) return '#ffdd8c';
|
||||||
@@ -47,7 +47,7 @@ export class Annotations {
|
|||||||
return '#793738';
|
return '#793738';
|
||||||
}
|
}
|
||||||
|
|
||||||
static getHoverMessage(commit: GitCommit, dateFormat: string | null): string | string[] {
|
static getHoverMessage(commit: GitCommit, dateFormat: string | null, hasRemotes: boolean): MarkdownString {
|
||||||
if (dateFormat === null) {
|
if (dateFormat === null) {
|
||||||
dateFormat = 'MMMM Do, YYYY h:MMa';
|
dateFormat = 'MMMM Do, YYYY h:MMa';
|
||||||
}
|
}
|
||||||
@@ -63,16 +63,25 @@ export class Annotations {
|
|||||||
.replace(/\n/g, ' \n');
|
.replace(/\n/g, ' \n');
|
||||||
message = `\n\n> ${message}`;
|
message = `\n\n> ${message}`;
|
||||||
}
|
}
|
||||||
return `\`${commit.shortSha}\` __${commit.author}__, ${moment(commit.date).fromNow()} _(${moment(commit.date).format(dateFormat)})_${message}`;
|
|
||||||
|
const openInRemoteCommand = hasRemotes
|
||||||
|
? `${' '.repeat(3)} [\`${GlyphChars.ArrowUpRight}\`](${OpenCommitInRemoteCommand.getMarkdownCommandArgs(commit.sha)} "Open in Remote")`
|
||||||
|
: '';
|
||||||
|
|
||||||
|
const markdown = new MarkdownString(`[\`${commit.shortSha}\`](${ShowQuickCommitDetailsCommand.getMarkdownCommandArgs(commit.sha)} "Show Commit Details") __${commit.author}__, ${commit.fromNow()} _(${commit.formatDate(dateFormat)})_ ${openInRemoteCommand} ${message}`);
|
||||||
|
markdown.isTrusted = true;
|
||||||
|
return markdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getHoverDiffMessage(commit: GitCommit, chunkLine: GitDiffChunkLine | undefined): string | undefined {
|
static getHoverDiffMessage(commit: GitCommit, chunkLine: GitDiffChunkLine | undefined): MarkdownString | undefined {
|
||||||
if (chunkLine === undefined) return undefined;
|
if (chunkLine === undefined) return undefined;
|
||||||
|
|
||||||
const codeDiff = this._getCodeDiff(chunkLine);
|
const codeDiff = this._getCodeDiff(chunkLine);
|
||||||
return commit.isUncommitted
|
const markdown = new MarkdownString(commit.isUncommitted
|
||||||
? `\`Changes\` ${GlyphChars.Dash} _uncommitted_\n${codeDiff}`
|
? `[\`Changes\`](${DiffWithCommand.getMarkdownCommandArgs(commit)} "Open Changes") ${GlyphChars.Dash} _uncommitted_\n${codeDiff}`
|
||||||
: `\`Changes\` ${GlyphChars.Dash} \`${commit.previousShortSha}\` ${GlyphChars.ArrowLeftRight} \`${commit.shortSha}\`\n${codeDiff}`;
|
: `[\`Changes\`](${DiffWithCommand.getMarkdownCommandArgs(commit)} "Open Changes") ${GlyphChars.Dash} [\`${commit.previousShortSha}\`](${ShowQuickCommitDetailsCommand.getMarkdownCommandArgs(commit.previousSha!)} "Show Commit Details") ${GlyphChars.ArrowLeftRight} [\`${commit.shortSha}\`](${ShowQuickCommitDetailsCommand.getMarkdownCommandArgs(commit.sha)} "Show Commit Details")\n${codeDiff}`);
|
||||||
|
markdown.isTrusted = true;
|
||||||
|
return markdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static _getCodeDiff(chunkLine: GitDiffChunkLine): string {
|
private static _getCodeDiff(chunkLine: GitDiffChunkLine): string {
|
||||||
@@ -92,22 +101,22 @@ export class Annotations {
|
|||||||
} as DecorationOptions;
|
} as DecorationOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static detailsHover(commit: GitCommit, dateFormat: string | null): DecorationOptions {
|
static detailsHover(commit: GitCommit, dateFormat: string | null, hasRemotes: boolean): DecorationOptions {
|
||||||
const message = this.getHoverMessage(commit, dateFormat);
|
const message = this.getHoverMessage(commit, dateFormat, hasRemotes);
|
||||||
return {
|
return {
|
||||||
hoverMessage: message
|
hoverMessage: message
|
||||||
} as DecorationOptions;
|
} as DecorationOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gutter(commit: GitCommit, format: string, dateFormatOrFormatOptions: string | null | ICommitFormatOptions, renderOptions: IRenderOptions): DecorationOptions {
|
static gutter(commit: GitCommit, format: string, dateFormatOrFormatOptions: string | null | ICommitFormatOptions, renderOptions: IRenderOptions): DecorationOptions {
|
||||||
const content = Strings.pad(CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions), 1, 1);
|
const message = CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
renderOptions: {
|
renderOptions: {
|
||||||
before: {
|
before: {
|
||||||
...renderOptions.before,
|
...renderOptions.before,
|
||||||
...{
|
...{
|
||||||
contentText: content
|
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
@@ -124,9 +133,23 @@ export class Annotations {
|
|||||||
} as DecorationOptions;
|
} as DecorationOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gutterRenderOptions(cfgTheme: IThemeConfig, heatmap: IHeatmapConfig): IRenderOptions {
|
static gutterRenderOptions(cfgTheme: IThemeConfig, heatmap: IHeatmapConfig, options: ICommitFormatOptions): IRenderOptions {
|
||||||
const cfgFileTheme = cfgTheme.annotations.file.gutter;
|
const cfgFileTheme = cfgTheme.annotations.file.gutter;
|
||||||
|
|
||||||
|
// Try to get the width of the string, if there is a cap
|
||||||
|
let width = 4; // Start with a padding
|
||||||
|
for (const token of Objects.values(options.tokenOptions!)) {
|
||||||
|
if (token === undefined) continue;
|
||||||
|
|
||||||
|
// If any token is uncapped, kick out and set no max
|
||||||
|
if (token.truncateTo == null) {
|
||||||
|
width = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
width += token.truncateTo;
|
||||||
|
}
|
||||||
|
|
||||||
let borderStyle = undefined;
|
let borderStyle = undefined;
|
||||||
let borderWidth = undefined;
|
let borderWidth = undefined;
|
||||||
if (heatmap.enabled) {
|
if (heatmap.enabled) {
|
||||||
@@ -143,7 +166,8 @@ export class Annotations {
|
|||||||
borderStyle: borderStyle,
|
borderStyle: borderStyle,
|
||||||
borderWidth: borderWidth,
|
borderWidth: borderWidth,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
margin: '0 26px -1px 0'
|
margin: '0 26px -1px 0',
|
||||||
|
width: (width > 4) ? `${width}ch` : undefined
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
backgroundColor: cfgFileTheme.dark.backgroundColor || undefined,
|
backgroundColor: cfgFileTheme.dark.backgroundColor || undefined,
|
||||||
@@ -158,11 +182,12 @@ export class Annotations {
|
|||||||
} as IRenderOptions;
|
} as IRenderOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
static hover(commit: GitCommit, renderOptions: IRenderOptions, heatmap: boolean, dateFormat: string | null): DecorationOptions {
|
static hover(commit: GitCommit, renderOptions: IRenderOptions, now: number): DecorationOptions {
|
||||||
return {
|
const decoration = {
|
||||||
hoverMessage: this.getHoverMessage(commit, dateFormat),
|
renderOptions: { before: { ...renderOptions.before } }
|
||||||
renderOptions: heatmap ? { before: { ...renderOptions.before } } : undefined
|
|
||||||
} as DecorationOptions;
|
} as DecorationOptions;
|
||||||
|
this.applyHeatmap(decoration, commit.date, now);
|
||||||
|
return decoration;
|
||||||
}
|
}
|
||||||
|
|
||||||
static hoverRenderOptions(cfgTheme: IThemeConfig, heatmap: IHeatmapConfig): IRenderOptions {
|
static hoverRenderOptions(cfgTheme: IThemeConfig, heatmap: IHeatmapConfig): IRenderOptions {
|
||||||
@@ -181,11 +206,15 @@ export class Annotations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static trailing(commit: GitCommit, format: string, dateFormat: string | null, cfgTheme: IThemeConfig): DecorationOptions {
|
static trailing(commit: GitCommit, format: string, dateFormat: string | null, cfgTheme: IThemeConfig): DecorationOptions {
|
||||||
const message = CommitFormatter.fromTemplate(format, commit, dateFormat);
|
const message = CommitFormatter.fromTemplate(format, commit, {
|
||||||
|
truncateMessageAtNewLine: true,
|
||||||
|
dateFormat: dateFormat
|
||||||
|
} as ICommitFormatOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
renderOptions: {
|
renderOptions: {
|
||||||
after: {
|
after: {
|
||||||
contentText: Strings.pad(message, 1, 1)
|
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
after: {
|
after: {
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Iterables } from '../system';
|
import { Iterables } from '../system';
|
||||||
import { ExtensionContext, Range, TextEditor, TextEditorDecorationType } from 'vscode';
|
import { CancellationToken, Disposable, ExtensionContext, Hover, HoverProvider, languages, Position, Range, TextDocument, TextEditor, TextEditorDecorationType } from 'vscode';
|
||||||
import { AnnotationProviderBase } from './annotationProvider';
|
import { AnnotationProviderBase } from './annotationProvider';
|
||||||
import { GitBlame, GitService, GitUri } from '../gitService';
|
import { Annotations, endOfLineIndex } from './annotations';
|
||||||
|
import { GitBlame, GitCommit, GitService, GitUri } from '../gitService';
|
||||||
import { WhitespaceController } from './whitespaceController';
|
import { WhitespaceController } from './whitespaceController';
|
||||||
|
|
||||||
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
|
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase implements HoverProvider {
|
||||||
|
|
||||||
protected _blame: Promise<GitBlame | undefined>;
|
protected _blame: Promise<GitBlame | undefined>;
|
||||||
|
protected _hoverProviderDisposable: Disposable;
|
||||||
|
|
||||||
constructor(context: ExtensionContext, editor: TextEditor, decoration: TextEditorDecorationType | undefined, highlightDecoration: TextEditorDecorationType | undefined, whitespaceController: WhitespaceController | undefined, protected git: GitService, protected uri: GitUri) {
|
constructor(context: ExtensionContext, editor: TextEditor, decoration: TextEditorDecorationType | undefined, highlightDecoration: TextEditorDecorationType | undefined, whitespaceController: WhitespaceController | undefined, protected git: GitService, protected uri: GitUri) {
|
||||||
super(context, editor, decoration, highlightDecoration, whitespaceController);
|
super(context, editor, decoration, highlightDecoration, whitespaceController);
|
||||||
@@ -15,6 +17,11 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
|
|||||||
this._blame = this.git.getBlameForFile(this.uri);
|
this._blame = this.git.getBlameForFile(this.uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clear() {
|
||||||
|
this._hoverProviderDisposable && this._hoverProviderDisposable.dispose();
|
||||||
|
super.clear();
|
||||||
|
}
|
||||||
|
|
||||||
async selection(shaOrLine?: string | number, blame?: GitBlame) {
|
async selection(shaOrLine?: string | number, blame?: GitBlame) {
|
||||||
if (!this.highlightDecoration) return;
|
if (!this.highlightDecoration) return;
|
||||||
|
|
||||||
@@ -56,6 +63,7 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
|
|||||||
const blame = await this._blame;
|
const blame = await this._blame;
|
||||||
return blame !== undefined && blame.lines.length !== 0;
|
return blame !== undefined && blame.lines.length !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async getBlame(requiresWhitespaceHack: boolean): Promise<GitBlame | undefined> {
|
protected async getBlame(requiresWhitespaceHack: boolean): Promise<GitBlame | undefined> {
|
||||||
let whitespacePromise: Promise<void> | undefined;
|
let whitespacePromise: Promise<void> | undefined;
|
||||||
// HACK: Until https://github.com/Microsoft/vscode/issues/11485 is fixed -- override whitespace (turn off)
|
// HACK: Until https://github.com/Microsoft/vscode/issues/11485 is fixed -- override whitespace (turn off)
|
||||||
@@ -64,18 +72,47 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
let blame: GitBlame | undefined;
|
let blame: GitBlame | undefined;
|
||||||
if (whitespacePromise) {
|
if (whitespacePromise !== undefined) {
|
||||||
[blame] = await Promise.all([this._blame, whitespacePromise]);
|
[blame] = await Promise.all([this._blame, whitespacePromise]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
blame = await this._blame;
|
blame = await this._blame;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blame === undefined || !blame.lines.length) {
|
if (blame === undefined || blame.lines.length === 0) {
|
||||||
this.whitespaceController && await this.whitespaceController.restore();
|
this.whitespaceController && await this.whitespaceController.restore();
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return blame;
|
return blame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registerHoverProvider() {
|
||||||
|
this._hoverProviderDisposable = languages.registerHoverProvider({ pattern: this.uri.fsPath }, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
async provideHover(document: TextDocument, position: Position, token: CancellationToken): Promise<Hover | undefined> {
|
||||||
|
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
||||||
|
if (this._config.blame.line.enabled && this.editor.selection.start.line === position.line) return undefined;
|
||||||
|
|
||||||
|
const cfg = this._config.annotations.file.gutter;
|
||||||
|
if (!cfg.hover.wholeLine && position.character !== 0) return undefined;
|
||||||
|
|
||||||
|
const blame = await this.getBlame(true);
|
||||||
|
if (blame === undefined) return undefined;
|
||||||
|
|
||||||
|
const line = blame.lines[position.line - this.uri.offset];
|
||||||
|
|
||||||
|
const commit = blame.commits.get(line.sha);
|
||||||
|
if (commit === undefined) return undefined;
|
||||||
|
|
||||||
|
// Get the full commit message -- since blame only returns the summary
|
||||||
|
let logCommit: GitCommit | undefined = undefined;
|
||||||
|
if (!commit.isUncommitted) {
|
||||||
|
logCommit = await this.git.getLogCommit(commit.repoPath, commit.uri.fsPath, commit.sha);
|
||||||
|
}
|
||||||
|
|
||||||
|
const message = Annotations.getHoverMessage(logCommit || commit, this._config.defaultDateFormat, this.git.hasRemotes(commit.repoPath));
|
||||||
|
return new Hover(message, document.validateRange(new Range(position.line, 0, position.line, endOfLineIndex)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
import { Strings } from '../system';
|
import { Strings } from '../system';
|
||||||
import { DecorationOptions, Range } from 'vscode';
|
import { DecorationOptions, Range } from 'vscode';
|
||||||
import { FileAnnotationType } from './annotationController';
|
import { FileAnnotationType } from './annotationController';
|
||||||
import { Annotations, endOfLineIndex } from './annotations';
|
import { Annotations } from './annotations';
|
||||||
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
|
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitBlameCommit, ICommitFormatOptions } from '../gitService';
|
import { GitBlameCommit, ICommitFormatOptions } from '../gitService';
|
||||||
import * as moment from 'moment';
|
import { Logger } from '../logger';
|
||||||
|
|
||||||
export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
|||||||
const blame = await this.getBlame(true);
|
const blame = await this.getBlame(true);
|
||||||
if (blame === undefined) return false;
|
if (blame === undefined) return false;
|
||||||
|
|
||||||
// console.time('Computing blame annotations...');
|
const start = process.hrtime();
|
||||||
|
|
||||||
const cfg = this._config.annotations.file.gutter;
|
const cfg = this._config.annotations.file.gutter;
|
||||||
|
|
||||||
@@ -32,59 +32,53 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
|||||||
tokenOptions: tokenOptions
|
tokenOptions: tokenOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
const now = moment();
|
const now = Date.now();
|
||||||
const offset = this.uri.offset;
|
const offset = this.uri.offset;
|
||||||
const renderOptions = Annotations.gutterRenderOptions(this._config.theme, cfg.heatmap);
|
const renderOptions = Annotations.gutterRenderOptions(this._config.theme, cfg.heatmap, options);
|
||||||
const dateFormat = this._config.defaultDateFormat;
|
|
||||||
const separateLines = this._config.theme.annotations.file.gutter.separateLines;
|
const separateLines = this._config.theme.annotations.file.gutter.separateLines;
|
||||||
|
|
||||||
const decorations: DecorationOptions[] = [];
|
const decorations: DecorationOptions[] = [];
|
||||||
const document = this.document;
|
const decorationsMap: { [sha: string]: DecorationOptions | undefined } = Object.create(null);
|
||||||
|
|
||||||
let commit: GitBlameCommit | undefined;
|
let commit: GitBlameCommit | undefined;
|
||||||
let compacted = false;
|
let compacted = false;
|
||||||
let details: DecorationOptions | undefined;
|
|
||||||
let gutter: DecorationOptions | undefined;
|
let gutter: DecorationOptions | undefined;
|
||||||
let previousSha: string | undefined;
|
let previousSha: string | undefined;
|
||||||
|
|
||||||
for (const l of blame.lines) {
|
for (const l of blame.lines) {
|
||||||
commit = blame.commits.get(l.sha);
|
|
||||||
if (commit === undefined) continue;
|
|
||||||
|
|
||||||
const line = l.line + offset;
|
const line = l.line + offset;
|
||||||
|
|
||||||
if (previousSha === l.sha) {
|
if (previousSha === l.sha) {
|
||||||
// Use a shallow copy of the previous decoration options
|
// Use a shallow copy of the previous decoration options
|
||||||
gutter = { ...gutter } as DecorationOptions;
|
gutter = { ...gutter } as DecorationOptions;
|
||||||
|
|
||||||
if (cfg.compact && !compacted) {
|
if (cfg.compact && !compacted) {
|
||||||
// Since we are wiping out the contextText make sure to copy the objects
|
// Since we are wiping out the contextText make sure to copy the objects
|
||||||
gutter.renderOptions = { ...gutter.renderOptions };
|
gutter.renderOptions = {
|
||||||
gutter.renderOptions.before = {
|
...gutter.renderOptions,
|
||||||
...gutter.renderOptions.before,
|
before: {
|
||||||
...{ contentText: GlyphChars.Space.repeat(gutter.renderOptions!.before!.contentText!.length) }
|
...gutter.renderOptions!.before,
|
||||||
|
contentText: GlyphChars.Space.repeat(Strings.width(gutter.renderOptions!.before!.contentText!))
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (separateLines) {
|
if (separateLines) {
|
||||||
gutter.renderOptions.dark = { ...gutter.renderOptions.dark };
|
gutter.renderOptions.dark = {
|
||||||
gutter.renderOptions.dark.before = { ...gutter.renderOptions.dark.before, ...{ textDecoration: 'none' } };
|
...gutter.renderOptions.dark,
|
||||||
gutter.renderOptions.light = { ...gutter.renderOptions.light };
|
before: { ...gutter.renderOptions.dark!.before, textDecoration: 'none' }
|
||||||
gutter.renderOptions.light.before = { ...gutter.renderOptions.light.before, ...{ textDecoration: 'none' } };
|
};
|
||||||
|
gutter.renderOptions.light = {
|
||||||
|
...gutter.renderOptions.light,
|
||||||
|
before: { ...gutter.renderOptions.light!.before, textDecoration: 'none' }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
compacted = true;
|
compacted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const endIndex = document.lineAt(line).firstNonWhitespaceCharacterIndex;
|
gutter.range = new Range(line, 0, line, 0);
|
||||||
gutter.range = new Range(line, 0, line, endIndex);
|
|
||||||
decorations.push(gutter);
|
|
||||||
|
|
||||||
if (details !== undefined) {
|
decorations.push(gutter);
|
||||||
details = { ...details } as DecorationOptions;
|
|
||||||
details.range = cfg.hover.wholeLine
|
|
||||||
? document.validateRange(new Range(line, 0, line, endOfLineIndex))
|
|
||||||
: gutter.range;
|
|
||||||
decorations.push(details);
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -92,30 +86,43 @@ export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
|||||||
compacted = false;
|
compacted = false;
|
||||||
previousSha = l.sha;
|
previousSha = l.sha;
|
||||||
|
|
||||||
|
gutter = decorationsMap[l.sha];
|
||||||
|
if (gutter !== undefined) {
|
||||||
|
gutter = {
|
||||||
|
...gutter,
|
||||||
|
range: new Range(line, 0, line, 0)
|
||||||
|
} as DecorationOptions;
|
||||||
|
|
||||||
|
decorations.push(gutter);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
commit = blame.commits.get(l.sha);
|
||||||
|
if (commit === undefined) continue;
|
||||||
|
|
||||||
gutter = Annotations.gutter(commit, cfg.format, options, renderOptions);
|
gutter = Annotations.gutter(commit, cfg.format, options, renderOptions);
|
||||||
|
|
||||||
if (cfg.heatmap.enabled) {
|
if (cfg.heatmap.enabled) {
|
||||||
Annotations.applyHeatmap(gutter, commit.date, now);
|
Annotations.applyHeatmap(gutter, commit.date, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
const endIndex = document.lineAt(line).firstNonWhitespaceCharacterIndex;
|
gutter.range = new Range(line, 0, line, 0);
|
||||||
gutter.range = new Range(line, 0, line, endIndex);
|
|
||||||
decorations.push(gutter);
|
|
||||||
|
|
||||||
if (cfg.hover.details) {
|
decorations.push(gutter);
|
||||||
details = Annotations.detailsHover(commit, dateFormat);
|
decorationsMap[l.sha] = gutter;
|
||||||
details.range = cfg.hover.wholeLine
|
|
||||||
? document.validateRange(new Range(line, 0, line, endOfLineIndex))
|
|
||||||
: gutter.range;
|
|
||||||
decorations.push(details);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decorations.length) {
|
if (decorations.length) {
|
||||||
this.editor.setDecorations(this.decoration!, decorations);
|
this.editor.setDecorations(this.decoration!, decorations);
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.timeEnd('Computing blame annotations...');
|
const duration = process.hrtime(start);
|
||||||
|
Logger.log(`${(duration[0] * 1000) + Math.floor(duration[1] / 1000000)} ms to compute gutter blame annotations`);
|
||||||
|
|
||||||
|
if (cfg.hover.details) {
|
||||||
|
this.registerHoverProvider();
|
||||||
|
}
|
||||||
|
|
||||||
this.selection(shaOrLine, blame);
|
this.selection(shaOrLine, blame);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,63 +1,70 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { DecorationOptions, Range } from 'vscode';
|
import { DecorationOptions, Range } from 'vscode';
|
||||||
import { FileAnnotationType } from './annotationController';
|
import { FileAnnotationType } from './annotationController';
|
||||||
import { Annotations, endOfLineIndex } from './annotations';
|
import { Annotations } from './annotations';
|
||||||
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
|
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
|
||||||
import { GitBlameCommit } from '../gitService';
|
import { GitBlameCommit } from '../gitService';
|
||||||
import * as moment from 'moment';
|
import { Logger } from '../logger';
|
||||||
|
|
||||||
export class HoverBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
export class HoverBlameAnnotationProvider extends BlameAnnotationProviderBase {
|
||||||
|
|
||||||
async provideAnnotation(shaOrLine?: string | number): Promise<boolean> {
|
async provideAnnotation(shaOrLine?: string | number): Promise<boolean> {
|
||||||
this.annotationType = FileAnnotationType.Hover;
|
this.annotationType = FileAnnotationType.Hover;
|
||||||
|
|
||||||
const blame = await this.getBlame(this._config.annotations.file.hover.heatmap.enabled);
|
|
||||||
if (blame === undefined) return false;
|
|
||||||
|
|
||||||
// console.time('Computing blame annotations...');
|
|
||||||
|
|
||||||
const cfg = this._config.annotations.file.hover;
|
const cfg = this._config.annotations.file.hover;
|
||||||
|
|
||||||
const now = moment();
|
const blame = await this.getBlame(cfg.heatmap.enabled);
|
||||||
const offset = this.uri.offset;
|
if (blame === undefined) return false;
|
||||||
const renderOptions = Annotations.hoverRenderOptions(this._config.theme, cfg.heatmap);
|
|
||||||
const dateFormat = this._config.defaultDateFormat;
|
|
||||||
|
|
||||||
const decorations: DecorationOptions[] = [];
|
if (cfg.heatmap.enabled) {
|
||||||
const document = this.document;
|
const start = process.hrtime();
|
||||||
|
|
||||||
let commit: GitBlameCommit | undefined;
|
const now = Date.now();
|
||||||
let hover: DecorationOptions | undefined;
|
const offset = this.uri.offset;
|
||||||
|
const renderOptions = Annotations.hoverRenderOptions(this._config.theme, cfg.heatmap);
|
||||||
|
|
||||||
for (const l of blame.lines) {
|
const decorations: DecorationOptions[] = [];
|
||||||
commit = blame.commits.get(l.sha);
|
const decorationsMap: { [sha: string]: DecorationOptions } = Object.create(null);
|
||||||
if (commit === undefined) continue;
|
|
||||||
|
|
||||||
const line = l.line + offset;
|
let commit: GitBlameCommit | undefined;
|
||||||
|
let hover: DecorationOptions | undefined;
|
||||||
|
|
||||||
hover = Annotations.hover(commit, renderOptions, cfg.heatmap.enabled, dateFormat);
|
for (const l of blame.lines) {
|
||||||
|
const line = l.line + offset;
|
||||||
|
|
||||||
|
hover = decorationsMap[l.sha];
|
||||||
|
|
||||||
|
if (hover !== undefined) {
|
||||||
|
hover = {
|
||||||
|
...hover,
|
||||||
|
range: new Range(line, 0, line, 0)
|
||||||
|
} as DecorationOptions;
|
||||||
|
|
||||||
|
decorations.push(hover);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
commit = blame.commits.get(l.sha);
|
||||||
|
if (commit === undefined) continue;
|
||||||
|
|
||||||
|
hover = Annotations.hover(commit, renderOptions, now);
|
||||||
|
hover.range = new Range(line, 0, line, 0);
|
||||||
|
|
||||||
|
decorations.push(hover);
|
||||||
|
decorationsMap[l.sha] = hover;
|
||||||
|
|
||||||
if (cfg.wholeLine) {
|
|
||||||
hover.range = document.validateRange(new Range(line, 0, line, endOfLineIndex));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const endIndex = document.lineAt(line).firstNonWhitespaceCharacterIndex;
|
|
||||||
hover.range = new Range(line, 0, line, endIndex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.heatmap.enabled) {
|
if (decorations.length) {
|
||||||
Annotations.applyHeatmap(hover, commit.date, now);
|
this.editor.setDecorations(this.decoration!, decorations);
|
||||||
}
|
}
|
||||||
|
|
||||||
decorations.push(hover);
|
const duration = process.hrtime(start);
|
||||||
|
Logger.log(`${(duration[0] * 1000) + Math.floor(duration[1] / 1000000)} ms to compute hover blame annotations`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (decorations.length) {
|
this.registerHoverProvider();
|
||||||
this.editor.setDecorations(this.decoration!, decorations);
|
|
||||||
}
|
|
||||||
|
|
||||||
// console.timeEnd('Computing blame annotations...');
|
|
||||||
|
|
||||||
this.selection(shaOrLine, blame);
|
this.selection(shaOrLine, blame);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { DecorationOptions, ExtensionContext, Position, Range, TextEditor, TextEditorDecorationType } from 'vscode';
|
import { DecorationOptions, ExtensionContext, MarkdownString, Position, Range, TextEditor, TextEditorDecorationType } from 'vscode';
|
||||||
import { Annotations, endOfLineIndex } from './annotations';
|
import { Annotations, endOfLineIndex } from './annotations';
|
||||||
import { FileAnnotationType } from './annotationController';
|
import { FileAnnotationType } from './annotationController';
|
||||||
import { AnnotationProviderBase } from './annotationProvider';
|
import { AnnotationProviderBase } from './annotationProvider';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
|
import { Logger } from '../logger';
|
||||||
|
|
||||||
export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
|
export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
|
||||||
|
|
||||||
@@ -20,6 +21,8 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
|
|||||||
const diff = await this.git.getDiffForFile(this.uri, commit.previousSha);
|
const diff = await this.git.getDiffForFile(this.uri, commit.previousSha);
|
||||||
if (diff === undefined) return false;
|
if (diff === undefined) return false;
|
||||||
|
|
||||||
|
const start = process.hrtime();
|
||||||
|
|
||||||
const cfg = this._config.annotations.file.recentChanges;
|
const cfg = this._config.annotations.file.recentChanges;
|
||||||
const dateFormat = this._config.defaultDateFormat;
|
const dateFormat = this._config.defaultDateFormat;
|
||||||
|
|
||||||
@@ -34,21 +37,16 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
|
|||||||
|
|
||||||
if (line.state === 'unchanged') continue;
|
if (line.state === 'unchanged') continue;
|
||||||
|
|
||||||
let endingIndex = 0;
|
const range = this.editor.document.validateRange(new Range(new Position(count, 0), new Position(count, endOfLineIndex)));
|
||||||
if (cfg.hover.details || cfg.hover.changes) {
|
|
||||||
endingIndex = cfg.hover.wholeLine ? endOfLineIndex : this.editor.document.lineAt(count).firstNonWhitespaceCharacterIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
const range = this.editor.document.validateRange(new Range(new Position(count, 0), new Position(count, endingIndex)));
|
|
||||||
|
|
||||||
if (cfg.hover.details) {
|
if (cfg.hover.details) {
|
||||||
decorators.push({
|
decorators.push({
|
||||||
hoverMessage: Annotations.getHoverMessage(commit, dateFormat),
|
hoverMessage: Annotations.getHoverMessage(commit, dateFormat, this.git.hasRemotes(commit.repoPath)),
|
||||||
range: range
|
range: range
|
||||||
} as DecorationOptions);
|
} as DecorationOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
let message: string | undefined = undefined;
|
let message: MarkdownString | undefined = undefined;
|
||||||
if (cfg.hover.changes) {
|
if (cfg.hover.changes) {
|
||||||
message = Annotations.getHoverDiffMessage(commit, line);
|
message = Annotations.getHoverDiffMessage(commit, line);
|
||||||
}
|
}
|
||||||
@@ -62,6 +60,9 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
|
|||||||
|
|
||||||
this.editor.setDecorations(this.highlightDecoration!, decorators);
|
this.editor.setDecorations(this.highlightDecoration!, decorators);
|
||||||
|
|
||||||
|
const duration = process.hrtime(start);
|
||||||
|
Logger.log(`${(duration[0] * 1000) + Math.floor(duration[1] / 1000000)} ms to compute recent changes annotations`);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
81
src/codeLensController.ts
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
'use strict';
|
||||||
|
import { Objects } from './system';
|
||||||
|
import { Disposable, ExtensionContext, languages, TextEditor, workspace } from 'vscode';
|
||||||
|
import { IConfig } from './configuration';
|
||||||
|
import { CommandContext, ExtensionKey, setCommandContext } from './constants';
|
||||||
|
import { GitCodeLensProvider } from './gitCodeLensProvider';
|
||||||
|
import { GitService } from './gitService';
|
||||||
|
import { Logger } from './logger';
|
||||||
|
|
||||||
|
export class CodeLensController extends Disposable {
|
||||||
|
|
||||||
|
private _codeLensProvider: GitCodeLensProvider | undefined;
|
||||||
|
private _codeLensProviderDisposable: Disposable | undefined;
|
||||||
|
private _config: IConfig;
|
||||||
|
private _disposable: Disposable | undefined;
|
||||||
|
|
||||||
|
constructor(private context: ExtensionContext, private git: GitService) {
|
||||||
|
super(() => this.dispose());
|
||||||
|
|
||||||
|
this._onConfigurationChanged();
|
||||||
|
|
||||||
|
const subscriptions: Disposable[] = [];
|
||||||
|
|
||||||
|
subscriptions.push(workspace.onDidChangeConfiguration(this._onConfigurationChanged, this));
|
||||||
|
subscriptions.push(git.onDidChangeGitCache(this._onGitCacheChanged, this));
|
||||||
|
|
||||||
|
this._disposable = Disposable.from(...subscriptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose() {
|
||||||
|
this._disposable && this._disposable.dispose();
|
||||||
|
|
||||||
|
this._codeLensProviderDisposable && this._codeLensProviderDisposable.dispose();
|
||||||
|
this._codeLensProviderDisposable = undefined;
|
||||||
|
this._codeLensProvider = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
private _onConfigurationChanged() {
|
||||||
|
const cfg = workspace.getConfiguration().get<IConfig>(ExtensionKey)!;
|
||||||
|
|
||||||
|
if (!Objects.areEquivalent(cfg.codeLens, this._config && this._config.codeLens)) {
|
||||||
|
Logger.log('CodeLens config changed; resetting CodeLens provider');
|
||||||
|
if (cfg.codeLens.enabled && (cfg.codeLens.recentChange.enabled || cfg.codeLens.authors.enabled)) {
|
||||||
|
if (this._codeLensProvider) {
|
||||||
|
this._codeLensProvider.reset();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._codeLensProvider = new GitCodeLensProvider(this.context, this.git);
|
||||||
|
this._codeLensProviderDisposable = languages.registerCodeLensProvider(GitCodeLensProvider.selector, this._codeLensProvider);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._codeLensProviderDisposable && this._codeLensProviderDisposable.dispose();
|
||||||
|
this._codeLensProviderDisposable = undefined;
|
||||||
|
this._codeLensProvider = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
setCommandContext(CommandContext.CanToggleCodeLens, cfg.codeLens.recentChange.enabled || cfg.codeLens.authors.enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._config = cfg;
|
||||||
|
}
|
||||||
|
|
||||||
|
private _onGitCacheChanged() {
|
||||||
|
Logger.log('Git cache changed; resetting CodeLens provider');
|
||||||
|
this._codeLensProvider && this._codeLensProvider.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleCodeLens(editor: TextEditor) {
|
||||||
|
if (!this._config.codeLens.recentChange.enabled && !this._config.codeLens.authors.enabled) return;
|
||||||
|
|
||||||
|
Logger.log(`toggleCodeLens()`);
|
||||||
|
if (this._codeLensProviderDisposable) {
|
||||||
|
this._codeLensProviderDisposable.dispose();
|
||||||
|
this._codeLensProviderDisposable = undefined;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._codeLensProviderDisposable = languages.registerCodeLensProvider(GitCodeLensProvider.selector, new GitCodeLensProvider(this.context, this.git));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,12 +8,15 @@ export * from './commands/copyShaToClipboard';
|
|||||||
export * from './commands/diffDirectory';
|
export * from './commands/diffDirectory';
|
||||||
export * from './commands/diffLineWithPrevious';
|
export * from './commands/diffLineWithPrevious';
|
||||||
export * from './commands/diffLineWithWorking';
|
export * from './commands/diffLineWithWorking';
|
||||||
|
export * from './commands/diffWith';
|
||||||
export * from './commands/diffWithBranch';
|
export * from './commands/diffWithBranch';
|
||||||
export * from './commands/diffWithNext';
|
export * from './commands/diffWithNext';
|
||||||
export * from './commands/diffWithPrevious';
|
export * from './commands/diffWithPrevious';
|
||||||
export * from './commands/diffWithRevision';
|
export * from './commands/diffWithRevision';
|
||||||
export * from './commands/diffWithWorking';
|
export * from './commands/diffWithWorking';
|
||||||
|
export * from './commands/externalDiff';
|
||||||
export * from './commands/openChangedFiles';
|
export * from './commands/openChangedFiles';
|
||||||
|
export * from './commands/openBranchesInRemote';
|
||||||
export * from './commands/openBranchInRemote';
|
export * from './commands/openBranchInRemote';
|
||||||
export * from './commands/openCommitInRemote';
|
export * from './commands/openCommitInRemote';
|
||||||
export * from './commands/openFileInRemote';
|
export * from './commands/openFileInRemote';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, Disposable, SourceControlResourceGroup, SourceControlResourceState, TextDocumentShowOptions, TextEditor, TextEditorEdit, Uri, window, workspace } from 'vscode';
|
import { commands, Disposable, SourceControlResourceGroup, SourceControlResourceState, TextDocumentShowOptions, TextEditor, TextEditorEdit, Uri, window, workspace } from 'vscode';
|
||||||
import { ExplorerNode } from '../views/explorerNodes';
|
import { ExplorerNode } from '../views/explorerNodes';
|
||||||
|
import { GitBranch, GitCommit, GitRemote } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Telemetry } from '../telemetry';
|
import { Telemetry } from '../telemetry';
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ export type Commands =
|
|||||||
'gitlens.copyMessageToClipboard' |
|
'gitlens.copyMessageToClipboard' |
|
||||||
'gitlens.copyShaToClipboard' |
|
'gitlens.copyShaToClipboard' |
|
||||||
'gitlens.diffDirectory' |
|
'gitlens.diffDirectory' |
|
||||||
|
'gitlens.diffWith' |
|
||||||
'gitlens.diffWithBranch' |
|
'gitlens.diffWithBranch' |
|
||||||
'gitlens.diffWithNext' |
|
'gitlens.diffWithNext' |
|
||||||
'gitlens.diffWithPrevious' |
|
'gitlens.diffWithPrevious' |
|
||||||
@@ -17,7 +19,9 @@ export type Commands =
|
|||||||
'gitlens.diffWithRevision' |
|
'gitlens.diffWithRevision' |
|
||||||
'gitlens.diffWithWorking' |
|
'gitlens.diffWithWorking' |
|
||||||
'gitlens.diffLineWithWorking' |
|
'gitlens.diffLineWithWorking' |
|
||||||
|
'gitlens.externalDiff' |
|
||||||
'gitlens.openChangedFiles' |
|
'gitlens.openChangedFiles' |
|
||||||
|
'gitlens.openBranchesInRemote' |
|
||||||
'gitlens.openBranchInRemote' |
|
'gitlens.openBranchInRemote' |
|
||||||
'gitlens.openCommitInRemote' |
|
'gitlens.openCommitInRemote' |
|
||||||
'gitlens.openFileInRemote' |
|
'gitlens.openFileInRemote' |
|
||||||
@@ -50,6 +54,7 @@ export const Commands = {
|
|||||||
CopyMessageToClipboard: 'gitlens.copyMessageToClipboard' as Commands,
|
CopyMessageToClipboard: 'gitlens.copyMessageToClipboard' as Commands,
|
||||||
CopyShaToClipboard: 'gitlens.copyShaToClipboard' as Commands,
|
CopyShaToClipboard: 'gitlens.copyShaToClipboard' as Commands,
|
||||||
DiffDirectory: 'gitlens.diffDirectory' as Commands,
|
DiffDirectory: 'gitlens.diffDirectory' as Commands,
|
||||||
|
DiffWith: 'gitlens.diffWith' as Commands,
|
||||||
DiffWithBranch: 'gitlens.diffWithBranch' as Commands,
|
DiffWithBranch: 'gitlens.diffWithBranch' as Commands,
|
||||||
DiffWithNext: 'gitlens.diffWithNext' as Commands,
|
DiffWithNext: 'gitlens.diffWithNext' as Commands,
|
||||||
DiffWithPrevious: 'gitlens.diffWithPrevious' as Commands,
|
DiffWithPrevious: 'gitlens.diffWithPrevious' as Commands,
|
||||||
@@ -57,7 +62,9 @@ export const Commands = {
|
|||||||
DiffWithRevision: 'gitlens.diffWithRevision' as Commands,
|
DiffWithRevision: 'gitlens.diffWithRevision' as Commands,
|
||||||
DiffWithWorking: 'gitlens.diffWithWorking' as Commands,
|
DiffWithWorking: 'gitlens.diffWithWorking' as Commands,
|
||||||
DiffLineWithWorking: 'gitlens.diffLineWithWorking' as Commands,
|
DiffLineWithWorking: 'gitlens.diffLineWithWorking' as Commands,
|
||||||
|
ExternalDiff: 'gitlens.externalDiff' as Commands,
|
||||||
OpenChangedFiles: 'gitlens.openChangedFiles' as Commands,
|
OpenChangedFiles: 'gitlens.openChangedFiles' as Commands,
|
||||||
|
OpenBranchesInRemote: 'gitlens.openBranchesInRemote' as Commands,
|
||||||
OpenBranchInRemote: 'gitlens.openBranchInRemote' as Commands,
|
OpenBranchInRemote: 'gitlens.openBranchInRemote' as Commands,
|
||||||
OpenCommitInRemote: 'gitlens.openCommitInRemote' as Commands,
|
OpenCommitInRemote: 'gitlens.openCommitInRemote' as Commands,
|
||||||
OpenFileInRemote: 'gitlens.openFileInRemote' as Commands,
|
OpenFileInRemote: 'gitlens.openFileInRemote' as Commands,
|
||||||
@@ -125,6 +132,22 @@ export interface CommandViewContext extends CommandBaseContext {
|
|||||||
node: ExplorerNode;
|
node: ExplorerNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isCommandViewContextWithBranch(context: CommandContext): context is CommandViewContext & { node: (ExplorerNode & { branch: GitBranch }) } {
|
||||||
|
return context.type === 'view' && (context.node as any).branch && (context.node as any).branch instanceof GitBranch;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ICommandViewContextWithCommit<T extends GitCommit> extends CommandViewContext {
|
||||||
|
node: (ExplorerNode & { commit: T });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isCommandViewContextWithCommit<T extends GitCommit>(context: CommandContext): context is ICommandViewContextWithCommit<T> {
|
||||||
|
return context.type === 'view' && (context.node as any).commit && (context.node as any).commit instanceof GitCommit;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isCommandViewContextWithRemote(context: CommandContext): context is CommandViewContext & { node: (ExplorerNode & { remote: GitRemote }) } {
|
||||||
|
return context.type === 'view' && (context.node as any).remote && (context.node as any).remote instanceof GitRemote;
|
||||||
|
}
|
||||||
|
|
||||||
export type CommandContext = CommandScmGroupsContext | CommandScmStatesContext | CommandUnknownContext | CommandUriContext | CommandViewContext;
|
export type CommandContext = CommandScmGroupsContext | CommandScmStatesContext | CommandUnknownContext | CommandUriContext | CommandViewContext;
|
||||||
|
|
||||||
function isScmResourceGroup(group: any): group is SourceControlResourceGroup {
|
function isScmResourceGroup(group: any): group is SourceControlResourceGroup {
|
||||||
@@ -147,6 +170,10 @@ function isTextEditor(editor: any): editor is TextEditor {
|
|||||||
|
|
||||||
export abstract class Command extends Disposable {
|
export abstract class Command extends Disposable {
|
||||||
|
|
||||||
|
static getMarkdownCommandArgsCore<T>(command: Commands, args: T): string {
|
||||||
|
return `command:${command}?${encodeURIComponent(JSON.stringify(args))}`;
|
||||||
|
}
|
||||||
|
|
||||||
protected readonly contextParsingOptions: CommandContextParsingOptions = { editor: false, uri: false };
|
protected readonly contextParsingOptions: CommandContextParsingOptions = { editor: false, uri: false };
|
||||||
|
|
||||||
private _disposable: Disposable;
|
private _disposable: Disposable;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Iterables } from '../system';
|
import { Iterables } from '../system';
|
||||||
import { TextEditor, Uri, window } from 'vscode';
|
import { TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { copy } from 'copy-paste';
|
import { copy } from 'copy-paste';
|
||||||
@@ -17,6 +17,16 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
|
|||||||
super(Commands.CopyMessageToClipboard);
|
super(Commands.CopyMessageToClipboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: CopyMessageToClipboardCommandArgs = {}): Promise<any> {
|
||||||
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.sha = context.node.commit.sha;
|
||||||
|
return this.execute(context.editor, context.node.commit.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri, args: CopyMessageToClipboardCommandArgs = {}): Promise<any> {
|
async execute(editor?: TextEditor, uri?: Uri, args: CopyMessageToClipboardCommandArgs = {}): Promise<any> {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
|
|
||||||
@@ -64,7 +74,7 @@ export class CopyMessageToClipboardCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
// Get the full commit message -- since blame only returns the summary
|
// Get the full commit message -- since blame only returns the summary
|
||||||
const commit = await this.git.getLogCommit(gitUri.repoPath, gitUri.fsPath, args.sha);
|
const commit = await this.git.getLogCommit(gitUri.repoPath, gitUri.fsPath, args.sha);
|
||||||
if (!commit) return undefined;
|
if (commit === undefined) return undefined;
|
||||||
|
|
||||||
args.message = commit.message;
|
args.message = commit.message;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Iterables } from '../system';
|
import { Iterables } from '../system';
|
||||||
import { TextEditor, Uri, window } from 'vscode';
|
import { TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { copy } from 'copy-paste';
|
import { copy } from 'copy-paste';
|
||||||
@@ -16,6 +16,16 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
|
|||||||
super(Commands.CopyShaToClipboard);
|
super(Commands.CopyShaToClipboard);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: CopyShaToClipboardCommandArgs = {}): Promise<any> {
|
||||||
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.sha = context.node.commit.sha;
|
||||||
|
return this.execute(context.editor, context.node.commit.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri, args: CopyShaToClipboardCommandArgs = {}): Promise<any> {
|
async execute(editor?: TextEditor, uri?: Uri, args: CopyShaToClipboardCommandArgs = {}): Promise<any> {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
|
|
||||||
@@ -45,7 +55,7 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const blame = await this.git.getBlameForLine(gitUri, blameline);
|
const blame = await this.git.getBlameForLine(gitUri, blameline);
|
||||||
if (!blame) return undefined;
|
if (blame === undefined) return undefined;
|
||||||
|
|
||||||
args.sha = blame.commit.sha;
|
args.sha = blame.commit.sha;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { DiffWithPreviousCommandArgs } from './diffWithPrevious';
|
|
||||||
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
|
|
||||||
import { GitCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
export interface DiffLineWithPreviousCommandArgs {
|
export interface DiffLineWithPreviousCommandArgs {
|
||||||
commit?: GitCommit;
|
commit?: GitCommit;
|
||||||
|
|
||||||
line?: number;
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
@@ -43,56 +41,26 @@ export class DiffLineWithPreviousCommand extends ActiveEditorCommand {
|
|||||||
if (blame === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
|
if (blame === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
|
||||||
|
|
||||||
args.commit = blame.commit;
|
args.commit = blame.commit;
|
||||||
|
|
||||||
// If we don't have a sha or the current commit matches the blame, show the previous
|
|
||||||
if (gitUri.sha === undefined || gitUri.sha === args.commit.sha) {
|
|
||||||
return commands.executeCommand(Commands.DiffWithPrevious, new GitUri(uri, args.commit), {
|
|
||||||
line: args.line,
|
|
||||||
showOptions: args.showOptions
|
|
||||||
} as DiffWithPreviousCommandArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the line is uncommitted, find the previous commit and treat it as a DiffWithWorking
|
|
||||||
if (args.commit.isUncommitted) {
|
|
||||||
uri = args.commit.uri;
|
|
||||||
args.commit = new GitCommit(args.commit.type, args.commit.repoPath, args.commit.previousSha!, args.commit.previousFileName!, args.commit.author, args.commit.date, args.commit.message);
|
|
||||||
args.line = (blame.line.line + 1) + gitUri.offset;
|
|
||||||
|
|
||||||
return commands.executeCommand(Commands.DiffWithWorking, uri, {
|
|
||||||
commit: args.commit,
|
|
||||||
line: args.line,
|
|
||||||
showOptions: args.showOptions
|
|
||||||
} as DiffWithWorkingCommandArgs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error(ex, 'DiffWithPreviousLineCommand', `getBlameForLine(${blameline})`);
|
Logger.error(ex, 'DiffLineWithPreviousCommand', `getBlameForLine(${blameline})`);
|
||||||
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
const [rhs, lhs] = await Promise.all([
|
repoPath: args.commit.repoPath,
|
||||||
this.git.getVersionedFile(gitUri.repoPath, gitUri.fsPath, gitUri.sha!),
|
lhs: {
|
||||||
this.git.getVersionedFile(args.commit.repoPath, args.commit.uri.fsPath, args.commit.sha)
|
sha: args.commit.previousSha !== undefined ? args.commit.previousSha : GitService.fakeSha,
|
||||||
]);
|
uri: args.commit.previousUri
|
||||||
|
},
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
rhs: {
|
||||||
if (args.showOptions === undefined) {
|
sha: args.commit.sha,
|
||||||
args.showOptions = {};
|
uri: args.commit.uri
|
||||||
}
|
},
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
line: args.line,
|
||||||
}
|
showOptions: args.showOptions
|
||||||
|
};
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
Uri.file(lhs),
|
|
||||||
Uri.file(rhs),
|
|
||||||
`${path.basename(args.commit.uri.fsPath)} (${args.commit.shortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(gitUri.fsPath)} (${gitUri.shortSha})`,
|
|
||||||
args.showOptions);
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'DiffWithPreviousLineCommand', 'getVersionedFile');
|
|
||||||
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { GitCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
|
|
||||||
export interface DiffLineWithWorkingCommandArgs {
|
export interface DiffLineWithWorkingCommandArgs {
|
||||||
commit?: GitCommit;
|
commit?: GitCommit;
|
||||||
|
|
||||||
line?: number;
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
@@ -52,6 +53,19 @@ export class DiffLineWithWorkingCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return commands.executeCommand(Commands.DiffWithWorking, uri, args as DiffWithWorkingCommandArgs);
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
|
repoPath: args.commit.repoPath,
|
||||||
|
lhs: {
|
||||||
|
sha: args.commit.sha,
|
||||||
|
uri: args.commit.uri
|
||||||
|
},
|
||||||
|
rhs: {
|
||||||
|
sha: '',
|
||||||
|
uri: args.commit.uri
|
||||||
|
},
|
||||||
|
line: args.line,
|
||||||
|
showOptions: args.showOptions
|
||||||
|
};
|
||||||
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
142
src/commands/diffWith.ts
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
'use strict';
|
||||||
|
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
|
import { ActiveEditorCommand, Commands } from './common';
|
||||||
|
import { BuiltInCommands, GlyphChars } from '../constants';
|
||||||
|
import { GitCommit, GitService } from '../gitService';
|
||||||
|
import { Logger } from '../logger';
|
||||||
|
import * as path from 'path';
|
||||||
|
|
||||||
|
export interface DiffWithCommandArgsRevision {
|
||||||
|
sha: string;
|
||||||
|
uri: Uri;
|
||||||
|
title?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DiffWithCommandArgs {
|
||||||
|
lhs?: DiffWithCommandArgsRevision;
|
||||||
|
rhs?: DiffWithCommandArgsRevision;
|
||||||
|
repoPath?: string;
|
||||||
|
|
||||||
|
line?: number;
|
||||||
|
showOptions?: TextDocumentShowOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DiffWithCommand extends ActiveEditorCommand {
|
||||||
|
|
||||||
|
static getMarkdownCommandArgs(args: DiffWithCommandArgs): string;
|
||||||
|
static getMarkdownCommandArgs(commit1: GitCommit, commit2: GitCommit): string;
|
||||||
|
static getMarkdownCommandArgs(argsOrCommit1: DiffWithCommandArgs | GitCommit, commit2?: GitCommit): string {
|
||||||
|
let args = argsOrCommit1;
|
||||||
|
if (argsOrCommit1 instanceof GitCommit) {
|
||||||
|
const commit1 = argsOrCommit1;
|
||||||
|
|
||||||
|
if (commit2 === undefined) {
|
||||||
|
if (commit1.isUncommitted) {
|
||||||
|
args = {
|
||||||
|
repoPath: commit1.repoPath,
|
||||||
|
lhs: {
|
||||||
|
sha: 'HEAD',
|
||||||
|
uri: commit1.uri
|
||||||
|
},
|
||||||
|
rhs: {
|
||||||
|
sha: '',
|
||||||
|
uri: commit1.uri
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
args = {
|
||||||
|
repoPath: commit1.repoPath,
|
||||||
|
lhs: {
|
||||||
|
sha: commit1.previousSha!,
|
||||||
|
uri: commit1.previousUri!
|
||||||
|
},
|
||||||
|
rhs: {
|
||||||
|
sha: commit1.sha,
|
||||||
|
uri: commit1.uri
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
args = {
|
||||||
|
repoPath: commit1.repoPath,
|
||||||
|
lhs: {
|
||||||
|
sha: commit1.sha,
|
||||||
|
uri: commit1.uri
|
||||||
|
},
|
||||||
|
rhs: {
|
||||||
|
sha: commit2.sha,
|
||||||
|
uri: commit2.uri
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.getMarkdownCommandArgsCore<DiffWithCommandArgs>(Commands.DiffWith, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(private git: GitService) {
|
||||||
|
super(Commands.DiffWith);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(editor?: TextEditor, uri?: Uri, args: DiffWithCommandArgs = {}): Promise<any> {
|
||||||
|
args = { ...args };
|
||||||
|
if (args.repoPath === undefined || args.lhs === undefined || args.rhs === undefined) return undefined;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const [lhs, rhs] = await Promise.all([
|
||||||
|
args.lhs.sha !== '' && !GitService.isUncommitted(args.lhs.sha)
|
||||||
|
? this.git.getVersionedFile(args.repoPath, args.lhs.uri.fsPath, args.lhs.sha)
|
||||||
|
: args.lhs.uri.fsPath,
|
||||||
|
args.rhs.sha !== '' && !GitService.isUncommitted(args.rhs.sha)
|
||||||
|
? this.git.getVersionedFile(args.repoPath, args.rhs.uri.fsPath, args.rhs.sha)
|
||||||
|
: args.rhs.uri.fsPath
|
||||||
|
]);
|
||||||
|
|
||||||
|
if (args.line !== undefined && args.line !== 0) {
|
||||||
|
if (args.showOptions === undefined) {
|
||||||
|
args.showOptions = {};
|
||||||
|
}
|
||||||
|
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
let rhsPrefix = '';
|
||||||
|
if (rhs === undefined) {
|
||||||
|
rhsPrefix = 'deleted in ';
|
||||||
|
}
|
||||||
|
else if (lhs === undefined || args.lhs.sha === GitService.fakeSha) {
|
||||||
|
rhsPrefix = 'added in ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.lhs.title === undefined && lhs !== undefined && args.lhs.sha !== GitService.fakeSha) {
|
||||||
|
args.lhs.title = (args.lhs.sha === '' || GitService.isUncommitted(args.lhs.sha))
|
||||||
|
? `${path.basename(args.lhs.uri.fsPath)}`
|
||||||
|
: `${path.basename(args.lhs.uri.fsPath)} (${GitService.shortenSha(args.lhs.sha)})`;
|
||||||
|
}
|
||||||
|
if (args.rhs.title === undefined && args.rhs.sha !== GitService.fakeSha) {
|
||||||
|
args.rhs.title = (args.rhs.sha === '' || GitService.isUncommitted(args.rhs.sha))
|
||||||
|
? `${path.basename(args.rhs.uri.fsPath)}`
|
||||||
|
: `${path.basename(args.rhs.uri.fsPath)} (${rhsPrefix}${GitService.shortenSha(args.rhs.sha)})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
const title = (args.lhs.title !== undefined && args.rhs.title !== undefined)
|
||||||
|
? `${args.lhs.title} ${GlyphChars.ArrowLeftRight} ${args.rhs.title}`
|
||||||
|
: args.lhs.title || args.rhs.title;
|
||||||
|
|
||||||
|
return await commands.executeCommand(BuiltInCommands.Diff,
|
||||||
|
lhs === undefined
|
||||||
|
? GitService.toGitContentUri(GitService.fakeSha, args.lhs.uri.fsPath, args.repoPath)
|
||||||
|
: Uri.file(lhs),
|
||||||
|
rhs === undefined
|
||||||
|
? GitService.toGitContentUri(GitService.fakeSha, args.rhs.uri.fsPath, args.repoPath)
|
||||||
|
: Uri.file(rhs),
|
||||||
|
title,
|
||||||
|
args.showOptions);
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
Logger.error(ex, 'DiffWithCommand', 'getVersionedFile');
|
||||||
|
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { BranchesQuickPick, CommandQuickPickItem } from '../quickPicks';
|
import { BranchesQuickPick, CommandQuickPickItem } from '../quickPicks';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
@@ -42,25 +42,20 @@ export class DiffWithBranchCommand extends ActiveEditorCommand {
|
|||||||
const branch = pick.branch.name;
|
const branch = pick.branch.name;
|
||||||
if (branch === undefined) return undefined;
|
if (branch === undefined) return undefined;
|
||||||
|
|
||||||
try {
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
const compare = await this.git.getVersionedFile(gitUri.repoPath, gitUri.fsPath, branch);
|
repoPath: gitUri.repoPath,
|
||||||
|
lhs: {
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
sha: pick.branch.remote ? `remotes/${branch}` : branch,
|
||||||
if (args.showOptions === undefined) {
|
uri: gitUri as Uri,
|
||||||
args.showOptions = {};
|
title: `${path.basename(gitUri.fsPath)} (${branch})`
|
||||||
}
|
},
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
rhs: {
|
||||||
}
|
sha: '',
|
||||||
|
uri: gitUri as Uri
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
},
|
||||||
Uri.file(compare),
|
line: args.line,
|
||||||
gitUri.fileUri(),
|
showOptions: args.showOptions
|
||||||
`${path.basename(gitUri.fsPath)} (${branch}) ${GlyphChars.ArrowLeftRight} ${path.basename(gitUri.fsPath)}`,
|
};
|
||||||
args.showOptions);
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'DiffWithBranchCommand', 'getVersionedFile');
|
|
||||||
return window.showErrorMessage(`Unable to open branch compare. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,16 +2,16 @@
|
|||||||
import { Iterables } from '../system';
|
import { Iterables } from '../system';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { GitLogCommit, GitService, GitUri } from '../gitService';
|
import { GitLogCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
export interface DiffWithNextCommandArgs {
|
export interface DiffWithNextCommandArgs {
|
||||||
commit?: GitLogCommit;
|
commit?: GitLogCommit;
|
||||||
line?: number;
|
|
||||||
range?: Range;
|
range?: Range;
|
||||||
|
|
||||||
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,28 +54,19 @@ export class DiffWithNextCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
if (args.commit.nextSha === undefined) return commands.executeCommand(Commands.DiffWithWorking, uri);
|
if (args.commit.nextSha === undefined) return commands.executeCommand(Commands.DiffWithWorking, uri);
|
||||||
|
|
||||||
try {
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
const [rhs, lhs] = await Promise.all([
|
repoPath: args.commit.repoPath,
|
||||||
this.git.getVersionedFile(args.commit.repoPath, args.commit.nextUri.fsPath, args.commit.nextSha),
|
lhs: {
|
||||||
this.git.getVersionedFile(args.commit.repoPath, args.commit.uri.fsPath, args.commit.sha)
|
sha: args.commit.sha,
|
||||||
]);
|
uri: args.commit.uri
|
||||||
|
},
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
rhs: {
|
||||||
if (args.showOptions === undefined) {
|
sha: args.commit.nextSha,
|
||||||
args.showOptions = {};
|
uri: args.commit.nextUri
|
||||||
}
|
},
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
line: args.line,
|
||||||
}
|
showOptions: args.showOptions
|
||||||
|
};
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
Uri.file(lhs),
|
|
||||||
Uri.file(rhs),
|
|
||||||
`${path.basename(args.commit.uri.fsPath)} (${args.commit.shortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(args.commit.nextUri.fsPath)} (${args.commit.nextShortSha})`,
|
|
||||||
args.showOptions);
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'DiffWithNextCommand', 'getVersionedFile');
|
|
||||||
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,17 @@
|
|||||||
import { Iterables } from '../system';
|
import { Iterables } from '../system';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
|
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
|
||||||
import { GitCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
export interface DiffWithPreviousCommandArgs {
|
export interface DiffWithPreviousCommandArgs {
|
||||||
commit?: GitCommit;
|
commit?: GitCommit;
|
||||||
line?: number;
|
|
||||||
range?: Range;
|
range?: Range;
|
||||||
|
|
||||||
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const sha = args.commit === undefined ? gitUri.sha : args.commit.sha;
|
const sha = args.commit === undefined ? gitUri.sha : args.commit.sha;
|
||||||
|
if (sha === GitService.fakeSha) return Messages.showCommitHasNoPreviousCommitWarningMessage();
|
||||||
|
|
||||||
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, sha, { maxCount: 2, range: args.range!, skipMerges: true });
|
const log = await this.git.getLogForFile(gitUri.repoPath, gitUri.fsPath, sha, { maxCount: 2, range: args.range!, skipMerges: true });
|
||||||
if (log === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
|
if (log === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to open compare');
|
||||||
@@ -43,7 +44,9 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
|
|||||||
args.commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());
|
args.commit = (sha && log.commits.get(sha)) || Iterables.first(log.commits.values());
|
||||||
|
|
||||||
// If the sha is missing and the file is uncommitted, then treat it as a DiffWithWorking
|
// If the sha is missing and the file is uncommitted, then treat it as a DiffWithWorking
|
||||||
if (gitUri.sha === undefined && await this.git.isFileUncommitted(gitUri)) return commands.executeCommand(Commands.DiffWithWorking, uri, { commit: args.commit, showOptions: args.showOptions } as DiffWithWorkingCommandArgs);
|
if (gitUri.sha === undefined && await this.git.isFileUncommitted(gitUri)) {
|
||||||
|
return commands.executeCommand(Commands.DiffWithWorking, uri, { commit: args.commit, showOptions: args.showOptions } as DiffWithWorkingCommandArgs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error(ex, 'DiffWithPreviousCommand', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`);
|
Logger.error(ex, 'DiffWithPreviousCommand', `getLogForFile(${gitUri.repoPath}, ${gitUri.fsPath})`);
|
||||||
@@ -51,30 +54,19 @@ export class DiffWithPreviousCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.commit.previousSha === undefined) return Messages.showCommitHasNoPreviousCommitWarningMessage(args.commit);
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
|
repoPath: args.commit.repoPath,
|
||||||
try {
|
lhs: {
|
||||||
const [rhs, lhs] = await Promise.all([
|
sha: args.commit.previousSha !== undefined ? args.commit.previousSha : GitService.fakeSha,
|
||||||
this.git.getVersionedFile(args.commit.repoPath, args.commit.uri.fsPath, args.commit.sha),
|
uri: args.commit.previousUri
|
||||||
this.git.getVersionedFile(args.commit.repoPath, args.commit.previousUri.fsPath, args.commit.previousSha)
|
},
|
||||||
]);
|
rhs: {
|
||||||
|
sha: args.commit.sha,
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
uri: args.commit.uri
|
||||||
if (args.showOptions === undefined) {
|
},
|
||||||
args.showOptions = {};
|
line: args.line,
|
||||||
}
|
showOptions: args.showOptions
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
};
|
||||||
}
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
|
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
|
||||||
Uri.file(lhs),
|
|
||||||
Uri.file(rhs),
|
|
||||||
`${path.basename(args.commit.previousUri.fsPath)} (${args.commit.previousShortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(args.commit.uri.fsPath)} (${args.commit.shortSha})`,
|
|
||||||
args.showOptions);
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'DiffWithPreviousCommand', 'getVersionedFile');
|
|
||||||
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks';
|
import { CommandQuickPickItem, FileHistoryQuickPick } from '../quickPicks';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
export interface DiffWithRevisionCommandArgs {
|
export interface DiffWithRevisionCommandArgs {
|
||||||
line?: number;
|
|
||||||
maxCount?: number;
|
maxCount?: number;
|
||||||
|
|
||||||
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,24 +46,24 @@ export class DiffWithRevisionCommand extends ActiveEditorCommand {
|
|||||||
|
|
||||||
if (pick instanceof CommandQuickPickItem) return pick.execute();
|
if (pick instanceof CommandQuickPickItem) return pick.execute();
|
||||||
|
|
||||||
const compare = await this.git.getVersionedFile(gitUri.repoPath, gitUri.fsPath, pick.commit.sha);
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
|
repoPath: gitUri.repoPath,
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
lhs: {
|
||||||
if (args.showOptions === undefined) {
|
sha: pick.commit.sha,
|
||||||
args.showOptions = {};
|
uri: gitUri as Uri
|
||||||
}
|
},
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
rhs: {
|
||||||
}
|
sha: '',
|
||||||
|
uri: gitUri as Uri
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
},
|
||||||
Uri.file(compare),
|
line: args.line,
|
||||||
gitUri.fileUri(),
|
showOptions: args.showOptions
|
||||||
`${path.basename(gitUri.fsPath)} (${pick.commit.shortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(gitUri.fsPath)}`,
|
};
|
||||||
args.showOptions);
|
return await commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error(ex, 'DiffWithRevisionCommand', 'getVersionedFile');
|
Logger.error(ex, 'DiffWithRevisionCommand');
|
||||||
return window.showErrorMessage(`Unable to open history compare. See output channel for more details`);
|
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { BuiltInCommands, GlyphChars } from '../constants';
|
import { DiffWithCommandArgs } from './diffWith';
|
||||||
import { GitCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
export interface DiffWithWorkingCommandArgs {
|
export interface DiffWithWorkingCommandArgs {
|
||||||
commit?: GitCommit;
|
commit?: GitCommit;
|
||||||
|
|
||||||
line?: number;
|
line?: number;
|
||||||
showOptions?: TextDocumentShowOptions;
|
showOptions?: TextDocumentShowOptions;
|
||||||
}
|
}
|
||||||
@@ -48,25 +48,19 @@ export class DiffWithWorkingCommand extends ActiveEditorCommand {
|
|||||||
const workingFileName = await this.git.findWorkingFileName(gitUri.repoPath, gitUri.fsPath);
|
const workingFileName = await this.git.findWorkingFileName(gitUri.repoPath, gitUri.fsPath);
|
||||||
if (workingFileName === undefined) return undefined;
|
if (workingFileName === undefined) return undefined;
|
||||||
|
|
||||||
try {
|
const diffArgs: DiffWithCommandArgs = {
|
||||||
const compare = await this.git.getVersionedFile(args.commit.repoPath, args.commit.uri.fsPath, args.commit.sha);
|
repoPath: args.commit.repoPath,
|
||||||
|
lhs: {
|
||||||
if (args.line !== undefined && args.line !== 0) {
|
sha: args.commit.sha,
|
||||||
if (args.showOptions === undefined) {
|
uri: args.commit.uri
|
||||||
args.showOptions = {};
|
},
|
||||||
}
|
rhs: {
|
||||||
args.showOptions.selection = new Range(args.line, 0, args.line, 0);
|
sha: '',
|
||||||
}
|
uri: args.commit.uri
|
||||||
|
},
|
||||||
await commands.executeCommand(BuiltInCommands.Diff,
|
line: args.line,
|
||||||
Uri.file(compare),
|
showOptions: args.showOptions
|
||||||
Uri.file(path.resolve(gitUri.repoPath, workingFileName)),
|
};
|
||||||
`${path.basename(args.commit.uri.fsPath)} (${args.commit.shortSha}) ${GlyphChars.ArrowLeftRight} ${path.basename(workingFileName)}`,
|
return commands.executeCommand(Commands.DiffWith, diffArgs);
|
||||||
args.showOptions);
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
Logger.error(ex, 'DiffWithWorkingCommand', 'getVersionedFile');
|
|
||||||
return window.showErrorMessage(`Unable to open compare. See output channel for more details`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
115
src/commands/externalDiff.ts
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
'use strict';
|
||||||
|
import { commands, SourceControlResourceState, Uri, window } from 'vscode';
|
||||||
|
import { Command, Commands } from './common';
|
||||||
|
import { BuiltInCommands } from '../constants';
|
||||||
|
import { CommandContext } from '../commands';
|
||||||
|
import { GitService } from '../gitService';
|
||||||
|
import { Logger } from '../logger';
|
||||||
|
import { Messages } from '../messages';
|
||||||
|
|
||||||
|
enum Status {
|
||||||
|
INDEX_MODIFIED,
|
||||||
|
INDEX_ADDED,
|
||||||
|
INDEX_DELETED,
|
||||||
|
INDEX_RENAMED,
|
||||||
|
INDEX_COPIED,
|
||||||
|
|
||||||
|
MODIFIED,
|
||||||
|
DELETED,
|
||||||
|
UNTRACKED,
|
||||||
|
IGNORED,
|
||||||
|
|
||||||
|
ADDED_BY_US,
|
||||||
|
ADDED_BY_THEM,
|
||||||
|
DELETED_BY_US,
|
||||||
|
DELETED_BY_THEM,
|
||||||
|
BOTH_ADDED,
|
||||||
|
BOTH_DELETED,
|
||||||
|
BOTH_MODIFIED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ResourceGroupType {
|
||||||
|
Merge,
|
||||||
|
Index,
|
||||||
|
WorkingTree
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Resource extends SourceControlResourceState {
|
||||||
|
readonly resourceGroupType: ResourceGroupType;
|
||||||
|
readonly type: Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExternalDiffFile {
|
||||||
|
constructor(public uri: Uri, public staged: boolean) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExternalDiffCommandArgs {
|
||||||
|
files?: ExternalDiffFile[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ExternalDiffCommand extends Command {
|
||||||
|
constructor(private git: GitService) {
|
||||||
|
super(Commands.ExternalDiff);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: ExternalDiffCommandArgs = {}): Promise<any> {
|
||||||
|
if (context.type === 'scm-states') {
|
||||||
|
args = { ...args };
|
||||||
|
args.files = context.scmResourceStates.map<ExternalDiffFile>((_: Resource) => new ExternalDiffFile(_.resourceUri, _.resourceGroupType === ResourceGroupType.Index));
|
||||||
|
|
||||||
|
return this.execute(args);
|
||||||
|
} else if (context.type === 'scm-groups') {
|
||||||
|
const isModified = (status: Status): boolean => status === Status.BOTH_MODIFIED || status === Status.INDEX_MODIFIED || status === Status.MODIFIED;
|
||||||
|
|
||||||
|
args = { ...args };
|
||||||
|
args.files = context.scmResourceGroups[0].resourceStates.filter((_: Resource) => isModified(_.type)).map<ExternalDiffFile>((_: Resource) => new ExternalDiffFile(_.resourceUri, _.resourceGroupType === ResourceGroupType.Index));
|
||||||
|
|
||||||
|
return this.execute(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(args: ExternalDiffCommandArgs = {}) {
|
||||||
|
try {
|
||||||
|
const diffTool = await this.git.getConfig('diff.tool');
|
||||||
|
if (!diffTool) {
|
||||||
|
const result = await window.showWarningMessage(`Unable to open file compare because there is no Git diff tool configured`, 'View Git Docs');
|
||||||
|
if (!result) return undefined;
|
||||||
|
|
||||||
|
return commands.executeCommand(BuiltInCommands.Open, Uri.parse('https://git-scm.com/docs/git-config#git-config-difftool'));
|
||||||
|
}
|
||||||
|
|
||||||
|
const repoPath = await this.git.getRepoPathFromUri(undefined);
|
||||||
|
if (!repoPath) return Messages.showNoRepositoryWarningMessage(`Unable to open changed files`);
|
||||||
|
|
||||||
|
if (!args.files) {
|
||||||
|
const status = await this.git.getStatusForRepo(repoPath);
|
||||||
|
if (status === undefined) return window.showWarningMessage(`Unable to open changed files`);
|
||||||
|
|
||||||
|
args.files = [];
|
||||||
|
|
||||||
|
for (const file of status.files) {
|
||||||
|
if (file.indexStatus === 'M') {
|
||||||
|
args.files.push(new ExternalDiffFile(file.Uri, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file.workTreeStatus === 'M') {
|
||||||
|
args.files.push(new ExternalDiffFile(file.Uri, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const file of args.files) {
|
||||||
|
this.git.openDiffTool(repoPath, file.uri, file.staged);
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
Logger.error(ex, 'ExternalDiffCommand');
|
||||||
|
return window.showErrorMessage(`Unable to open external diff. See output channel for more details`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Arrays } from '../system';
|
|
||||||
import { commands, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithBranch } from './common';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
@@ -10,6 +9,7 @@ import { OpenInRemoteCommandArgs } from './openInRemote';
|
|||||||
|
|
||||||
export interface OpenBranchInRemoteCommandArgs {
|
export interface OpenBranchInRemoteCommandArgs {
|
||||||
branch?: string;
|
branch?: string;
|
||||||
|
remote?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
||||||
@@ -18,6 +18,16 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
|||||||
super(Commands.OpenBranchInRemote);
|
super(Commands.OpenBranchInRemote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: OpenBranchInRemoteCommandArgs = {}): Promise<any> {
|
||||||
|
if (isCommandViewContextWithBranch(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.branch = context.node.branch.name;
|
||||||
|
args.remote = context.node.branch.getRemote();
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri, args: OpenBranchInRemoteCommandArgs = {}) {
|
async execute(editor?: TextEditor, uri?: Uri, args: OpenBranchInRemoteCommandArgs = {}) {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
|
|
||||||
@@ -41,12 +51,14 @@ export class OpenBranchInRemoteCommand extends ActiveEditorCommand {
|
|||||||
if (args.branch === undefined) return undefined;
|
if (args.branch === undefined) return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const remotes = Arrays.uniqueBy(await this.git.getRemotes(repoPath), _ => _.url, _ => !!_.provider);
|
const remotes = (await this.git.getRemotes(repoPath)).filter(r => r.provider !== undefined);
|
||||||
|
|
||||||
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
||||||
resource: {
|
resource: {
|
||||||
type: 'branch',
|
type: 'branch',
|
||||||
branch: args.branch
|
branch: args.branch
|
||||||
},
|
},
|
||||||
|
remote: args.remote,
|
||||||
remotes
|
remotes
|
||||||
} as OpenInRemoteCommandArgs);
|
} as OpenInRemoteCommandArgs);
|
||||||
}
|
}
|
||||||
|
|||||||
51
src/commands/openBranchesInRemote.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
'use strict';
|
||||||
|
import { commands, TextEditor, Uri, window } from 'vscode';
|
||||||
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithRemote } from './common';
|
||||||
|
import { GitService, GitUri } from '../gitService';
|
||||||
|
import { Logger } from '../logger';
|
||||||
|
import { OpenInRemoteCommandArgs } from './openInRemote';
|
||||||
|
|
||||||
|
export interface OpenBranchesInRemoteCommandArgs {
|
||||||
|
remote?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class OpenBranchesInRemoteCommand extends ActiveEditorCommand {
|
||||||
|
|
||||||
|
constructor(private git: GitService) {
|
||||||
|
super(Commands.OpenBranchesInRemote);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: OpenBranchesInRemoteCommandArgs = {}): Promise<any> {
|
||||||
|
if (isCommandViewContextWithRemote(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.remote = context.node.remote.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(editor?: TextEditor, uri?: Uri, args: OpenBranchesInRemoteCommandArgs = {}) {
|
||||||
|
uri = getCommandUri(uri, editor);
|
||||||
|
|
||||||
|
const gitUri = uri && await GitUri.fromUri(uri, this.git);
|
||||||
|
|
||||||
|
const repoPath = gitUri === undefined ? this.git.repoPath : gitUri.repoPath;
|
||||||
|
if (!repoPath) return undefined;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const remotes = (await this.git.getRemotes(repoPath)).filter(r => r.provider !== undefined);
|
||||||
|
|
||||||
|
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
||||||
|
resource: {
|
||||||
|
type: 'branches'
|
||||||
|
},
|
||||||
|
remote: args.remote,
|
||||||
|
remotes
|
||||||
|
} as OpenInRemoteCommandArgs);
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
Logger.error(ex, 'OpenBranchesInRemoteCommand');
|
||||||
|
return window.showErrorMessage(`Unable to open branches in remote provider. See output channel for more details`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Arrays } from '../system';
|
|
||||||
import { commands, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
|
||||||
import { GitBlameCommit, GitService, GitUri } from '../gitService';
|
import { GitBlameCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { OpenInRemoteCommandArgs } from './openInRemote';
|
import { OpenInRemoteCommandArgs } from './openInRemote';
|
||||||
import { CommitNode } from '../views/explorerNodes';
|
|
||||||
|
|
||||||
export interface OpenCommitInRemoteCommandArgs {
|
export interface OpenCommitInRemoteCommandArgs {
|
||||||
sha?: string;
|
sha?: string;
|
||||||
@@ -14,12 +12,21 @@ export interface OpenCommitInRemoteCommandArgs {
|
|||||||
|
|
||||||
export class OpenCommitInRemoteCommand extends ActiveEditorCommand {
|
export class OpenCommitInRemoteCommand extends ActiveEditorCommand {
|
||||||
|
|
||||||
|
static getMarkdownCommandArgs(sha: string): string;
|
||||||
|
static getMarkdownCommandArgs(args: OpenCommitInRemoteCommandArgs): string;
|
||||||
|
static getMarkdownCommandArgs(argsOrSha: OpenCommitInRemoteCommandArgs | string): string {
|
||||||
|
const args = typeof argsOrSha === 'string'
|
||||||
|
? { sha: argsOrSha }
|
||||||
|
: argsOrSha;
|
||||||
|
return super.getMarkdownCommandArgsCore<OpenCommitInRemoteCommandArgs>(Commands.OpenCommitInRemote, args);
|
||||||
|
}
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.OpenCommitInRemote);
|
super(Commands.OpenCommitInRemote);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async preExecute(context: CommandContext, args: OpenCommitInRemoteCommandArgs = {}): Promise<any> {
|
protected async preExecute(context: CommandContext, args: OpenCommitInRemoteCommandArgs = {}): Promise<any> {
|
||||||
if (context.type === 'view' && context.node instanceof CommitNode) {
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
args = { ...args };
|
args = { ...args };
|
||||||
args.sha = context.node.commit.sha;
|
args.sha = context.node.commit.sha;
|
||||||
return this.execute(context.editor, context.node.commit.uri, args);
|
return this.execute(context.editor, context.node.commit.uri, args);
|
||||||
@@ -54,7 +61,8 @@ export class OpenCommitInRemoteCommand extends ActiveEditorCommand {
|
|||||||
args.sha = commit.sha;
|
args.sha = commit.sha;
|
||||||
}
|
}
|
||||||
|
|
||||||
const remotes = Arrays.uniqueBy(await this.git.getRemotes(gitUri.repoPath), _ => _.url, _ => !!_.provider);
|
const remotes = (await this.git.getRemotes(gitUri.repoPath)).filter(r => r.provider !== undefined);
|
||||||
|
|
||||||
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
||||||
resource: {
|
resource: {
|
||||||
type: 'commit',
|
type: 'commit',
|
||||||
|
|||||||
@@ -1,34 +1,58 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Arrays } from '../system';
|
|
||||||
import { commands, Range, TextEditor, Uri, window } from 'vscode';
|
import { commands, Range, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithBranch, isCommandViewContextWithCommit } from './common';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { OpenInRemoteCommandArgs } from './openInRemote';
|
import { OpenInRemoteCommandArgs } from './openInRemote';
|
||||||
|
|
||||||
|
export interface OpenFileInRemoteCommandArgs {
|
||||||
|
branch?: string;
|
||||||
|
range?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export class OpenFileInRemoteCommand extends ActiveEditorCommand {
|
export class OpenFileInRemoteCommand extends ActiveEditorCommand {
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.OpenFileInRemote);
|
super(Commands.OpenFileInRemote);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri) {
|
protected async preExecute(context: CommandContext, args: OpenFileInRemoteCommandArgs = { range: true }): Promise<any> {
|
||||||
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.range = false;
|
||||||
|
if (isCommandViewContextWithBranch(context)) {
|
||||||
|
args.branch = context.node.branch !== undefined ? context.node.branch.name : undefined;
|
||||||
|
}
|
||||||
|
return this.execute(context.editor, context.node.commit.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(editor?: TextEditor, uri?: Uri, args: OpenFileInRemoteCommandArgs = { range: true }) {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
if (uri === undefined) return undefined;
|
if (uri === undefined) return undefined;
|
||||||
|
|
||||||
const gitUri = await GitUri.fromUri(uri, this.git);
|
const gitUri = await GitUri.fromUri(uri, this.git);
|
||||||
if (!gitUri.repoPath) return undefined;
|
if (!gitUri.repoPath) return undefined;
|
||||||
|
|
||||||
const branch = await this.git.getBranch(gitUri.repoPath);
|
if (args.branch === undefined) {
|
||||||
|
const branch = await this.git.getBranch(gitUri.repoPath);
|
||||||
|
if (branch !== undefined) {
|
||||||
|
args.branch = branch.name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const remotes = Arrays.uniqueBy(await this.git.getRemotes(gitUri.repoPath), _ => _.url, _ => !!_.provider);
|
const remotes = (await this.git.getRemotes(gitUri.repoPath)).filter(r => r.provider !== undefined);
|
||||||
const range = editor === undefined ? undefined : new Range(editor.selection.start.with({ line: editor.selection.start.line + 1 }), editor.selection.end.with({ line: editor.selection.end.line + 1 }));
|
const range = (args.range && editor !== undefined)
|
||||||
|
? new Range(editor.selection.start.with({ line: editor.selection.start.line + 1 }), editor.selection.end.with({ line: editor.selection.end.line + 1 }))
|
||||||
|
: undefined;
|
||||||
|
|
||||||
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
||||||
resource: {
|
resource: {
|
||||||
type: 'file',
|
type: gitUri.sha === undefined ? 'file' : 'revision',
|
||||||
branch: branch === undefined ? 'Current' : branch.name,
|
branch: args.branch === undefined ? 'Current' : args.branch,
|
||||||
fileName: gitUri.getRelativePath(),
|
fileName: gitUri.getRelativePath(),
|
||||||
range: range,
|
range: range,
|
||||||
sha: gitUri.sha
|
sha: gitUri.sha
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ import { Strings } from '../system';
|
|||||||
import { TextEditor, Uri, window } from 'vscode';
|
import { TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitLogCommit, GitRemote, RemoteResource } from '../gitService';
|
import { GitLogCommit, GitRemote, GitService, RemoteResource } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { CommandQuickPickItem, OpenRemoteCommandQuickPickItem, RemotesQuickPick } from '../quickPicks';
|
import { CommandQuickPickItem, OpenRemoteCommandQuickPickItem, RemotesQuickPick } from '../quickPicks';
|
||||||
|
|
||||||
export interface OpenInRemoteCommandArgs {
|
export interface OpenInRemoteCommandArgs {
|
||||||
|
remote?: string;
|
||||||
remotes?: GitRemote[];
|
remotes?: GitRemote[];
|
||||||
resource?: RemoteResource;
|
resource?: RemoteResource;
|
||||||
|
|
||||||
@@ -26,8 +27,17 @@ export class OpenInRemoteCommand extends ActiveEditorCommand {
|
|||||||
args = { ...args };
|
args = { ...args };
|
||||||
if (args.remotes === undefined || args.resource === undefined) return undefined;
|
if (args.remotes === undefined || args.resource === undefined) return undefined;
|
||||||
|
|
||||||
|
if (args.remote !== undefined) {
|
||||||
|
const remotes = args.remotes.filter(r => r.name === args.remote);
|
||||||
|
// Only filter if we get some results
|
||||||
|
if (remotes.length > 0) {
|
||||||
|
args.remotes = remotes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (args.remotes.length === 1) {
|
if (args.remotes.length === 1) {
|
||||||
|
this.ensureRemoteBranchName(args);
|
||||||
const command = new OpenRemoteCommandQuickPickItem(args.remotes[0], args.resource);
|
const command = new OpenRemoteCommandQuickPickItem(args.remotes[0], args.resource);
|
||||||
return command.execute();
|
return command.execute();
|
||||||
}
|
}
|
||||||
@@ -35,25 +45,20 @@ export class OpenInRemoteCommand extends ActiveEditorCommand {
|
|||||||
let placeHolder = '';
|
let placeHolder = '';
|
||||||
switch (args.resource.type) {
|
switch (args.resource.type) {
|
||||||
case 'branch':
|
case 'branch':
|
||||||
// Check to see if the remote is in the branch
|
this.ensureRemoteBranchName(args);
|
||||||
const index = args.resource.branch.indexOf('/');
|
|
||||||
if (index >= 0) {
|
|
||||||
const remoteName = args.resource.branch.substring(0, index);
|
|
||||||
const remote = args.remotes.find(r => r.name === remoteName);
|
|
||||||
if (remote !== undefined) {
|
|
||||||
args.resource.branch = args.resource.branch.substring(index + 1);
|
|
||||||
args.remotes = [remote];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
placeHolder = `open ${args.resource.branch} branch in${GlyphChars.Ellipsis}`;
|
placeHolder = `open ${args.resource.branch} branch in${GlyphChars.Ellipsis}`;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'commit':
|
case 'commit':
|
||||||
const shortSha = args.resource.sha.substring(0, 8);
|
const shortSha = GitService.shortenSha(args.resource.sha);
|
||||||
placeHolder = `open commit ${shortSha} in${GlyphChars.Ellipsis}`;
|
placeHolder = `open commit ${shortSha} in${GlyphChars.Ellipsis}`;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'file':
|
case 'file':
|
||||||
|
placeHolder = `open ${args.resource.fileName} in${GlyphChars.Ellipsis}`;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'revision':
|
||||||
if (args.resource.commit !== undefined && args.resource.commit instanceof GitLogCommit) {
|
if (args.resource.commit !== undefined && args.resource.commit instanceof GitLogCommit) {
|
||||||
if (args.resource.commit.status === 'D') {
|
if (args.resource.commit.status === 'D') {
|
||||||
args.resource.sha = args.resource.commit.previousSha;
|
args.resource.sha = args.resource.commit.previousSha;
|
||||||
@@ -65,16 +70,12 @@ export class OpenInRemoteCommand extends ActiveEditorCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const shortFileSha = args.resource.sha === undefined ? '' : args.resource.sha.substring(0, 8);
|
const shortFileSha = args.resource.sha === undefined ? '' : GitService.shortenSha(args.resource.sha);
|
||||||
const shaSuffix = shortFileSha ? ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${shortFileSha}` : '';
|
const shaSuffix = shortFileSha ? ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${shortFileSha}` : '';
|
||||||
|
|
||||||
placeHolder = `open ${args.resource.fileName}${shaSuffix} in${GlyphChars.Ellipsis}`;
|
placeHolder = `open ${args.resource.fileName}${shaSuffix} in${GlyphChars.Ellipsis}`;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'working-file':
|
|
||||||
placeHolder = `open ${args.resource.fileName} in${GlyphChars.Ellipsis}`;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.remotes.length === 1) {
|
if (args.remotes.length === 1) {
|
||||||
@@ -93,4 +94,19 @@ export class OpenInRemoteCommand extends ActiveEditorCommand {
|
|||||||
return window.showErrorMessage(`Unable to open in remote provider. See output channel for more details`);
|
return window.showErrorMessage(`Unable to open in remote provider. See output channel for more details`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ensureRemoteBranchName(args: OpenInRemoteCommandArgs) {
|
||||||
|
if (args.remotes === undefined || args.resource === undefined || args.resource.type !== 'branch') return;
|
||||||
|
|
||||||
|
// Check to see if the remote is in the branch
|
||||||
|
const index = args.resource.branch.indexOf('/');
|
||||||
|
if (index >= 0) {
|
||||||
|
const remoteName = args.resource.branch.substring(0, index);
|
||||||
|
const remote = args.remotes.find(r => r.name === remoteName);
|
||||||
|
if (remote !== undefined) {
|
||||||
|
args.resource.branch = args.resource.branch.substring(index + 1);
|
||||||
|
args.remotes = [remote];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,30 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Arrays } from '../system';
|
|
||||||
import { commands, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithRemote } from './common';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { OpenInRemoteCommandArgs } from './openInRemote';
|
import { OpenInRemoteCommandArgs } from './openInRemote';
|
||||||
|
|
||||||
|
export interface OpenRepoInRemoteCommandArgs {
|
||||||
|
remote?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export class OpenRepoInRemoteCommand extends ActiveEditorCommand {
|
export class OpenRepoInRemoteCommand extends ActiveEditorCommand {
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.OpenRepoInRemote);
|
super(Commands.OpenRepoInRemote);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri) {
|
protected async preExecute(context: CommandContext, args: OpenRepoInRemoteCommandArgs = {}): Promise<any> {
|
||||||
|
if (isCommandViewContextWithRemote(context)) {
|
||||||
|
args = { ...args };
|
||||||
|
args.remote = context.node.remote.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(editor?: TextEditor, uri?: Uri, args: OpenRepoInRemoteCommandArgs = {}) {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
|
|
||||||
const gitUri = uri && await GitUri.fromUri(uri, this.git);
|
const gitUri = uri && await GitUri.fromUri(uri, this.git);
|
||||||
@@ -21,11 +33,13 @@ export class OpenRepoInRemoteCommand extends ActiveEditorCommand {
|
|||||||
if (!repoPath) return undefined;
|
if (!repoPath) return undefined;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const remotes = Arrays.uniqueBy(await this.git.getRemotes(repoPath), _ => _.url, _ => !!_.provider);
|
const remotes = (await this.git.getRemotes(repoPath)).filter(r => r.provider !== undefined);
|
||||||
|
|
||||||
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
return commands.executeCommand(Commands.OpenInRemote, uri, {
|
||||||
resource: {
|
resource: {
|
||||||
type: 'repo'
|
type: 'repo'
|
||||||
},
|
},
|
||||||
|
remote: args.remote,
|
||||||
remotes
|
remotes
|
||||||
} as OpenInRemoteCommandArgs);
|
} as OpenInRemoteCommandArgs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export class ResetSuppressedWarningsCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async execute() {
|
async execute() {
|
||||||
for (const key of Objects.values<string>(SuppressedKeys)) {
|
for (const key of Objects.values(SuppressedKeys)) {
|
||||||
await this.context.globalState.update(key, false);
|
await this.context.globalState.update(key, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { Logger } from '../logger';
|
|||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { CommandQuickPickItem, CommitsQuickPick } from '../quickPicks';
|
import { CommandQuickPickItem, CommitsQuickPick } from '../quickPicks';
|
||||||
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
|
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
|
||||||
import { paste } from 'copy-paste';
|
|
||||||
|
|
||||||
const searchByRegex = /^([@:#])/;
|
const searchByRegex = /^([@:#])/;
|
||||||
const searchByMap = new Map<string, GitRepoSearchBy>([
|
const searchByMap = new Map<string, GitRepoSearchBy>([
|
||||||
@@ -49,12 +48,6 @@ export class ShowCommitSearchCommand extends ActiveEditorCachedCommand {
|
|||||||
args.search = `#${blameLine.commit.shortSha}`;
|
args.search = `#${blameLine.commit.shortSha}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!args.search) {
|
|
||||||
args.search = await new Promise<string>((resolve, reject) => {
|
|
||||||
paste((err: Error, content: string) => resolve(err ? '' : content));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
|
import { commands, Position, Range, TextEditor, TextEditorEdit, Uri, window } from 'vscode';
|
||||||
import { Commands, EditorCommand, getCommandUri } from './common';
|
import { Commands, EditorCommand, getCommandUri } from './common';
|
||||||
import { BuiltInCommands } from '../constants';
|
import { BuiltInCommands } from '../constants';
|
||||||
import { GitExplorer } from '../views/gitExplorer';
|
// import { GitExplorer } from '../views/gitExplorer';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri } from '../gitService';
|
||||||
import { Messages } from '../messages';
|
import { Messages } from '../messages';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
@@ -15,7 +15,7 @@ export interface ShowFileHistoryCommandArgs {
|
|||||||
|
|
||||||
export class ShowFileHistoryCommand extends EditorCommand {
|
export class ShowFileHistoryCommand extends EditorCommand {
|
||||||
|
|
||||||
constructor(private git: GitService, private explorer?: GitExplorer) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.ShowFileHistory);
|
super(Commands.ShowFileHistory);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,10 +33,10 @@ export class ShowFileHistoryCommand extends EditorCommand {
|
|||||||
const gitUri = await GitUri.fromUri(uri, this.git);
|
const gitUri = await GitUri.fromUri(uri, this.git);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.explorer !== undefined) {
|
// if (this.explorer !== undefined) {
|
||||||
this.explorer.addHistory(gitUri);
|
// this.explorer.addHistory(gitUri);
|
||||||
return undefined;
|
// return undefined;
|
||||||
}
|
// }
|
||||||
|
|
||||||
const locations = await this.git.getLogLocations(gitUri, args.sha, args.line);
|
const locations = await this.git.getLogLocations(gitUri, args.sha, args.line);
|
||||||
if (locations === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to show file history');
|
if (locations === undefined) return Messages.showFileNotUnderSourceControlWarningMessage('Unable to show file history');
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Strings } from '../system';
|
import { Strings } from '../system';
|
||||||
import { commands, TextEditor, Uri, window } from 'vscode';
|
import { commands, TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCachedCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
@@ -20,10 +20,31 @@ export interface ShowQuickCommitDetailsCommandArgs {
|
|||||||
|
|
||||||
export class ShowQuickCommitDetailsCommand extends ActiveEditorCachedCommand {
|
export class ShowQuickCommitDetailsCommand extends ActiveEditorCachedCommand {
|
||||||
|
|
||||||
|
static getMarkdownCommandArgs(sha: string): string;
|
||||||
|
static getMarkdownCommandArgs(args: ShowQuickCommitDetailsCommandArgs): string;
|
||||||
|
static getMarkdownCommandArgs(argsOrSha: ShowQuickCommitDetailsCommandArgs | string): string {
|
||||||
|
const args = typeof argsOrSha === 'string'
|
||||||
|
? { sha: argsOrSha }
|
||||||
|
: argsOrSha;
|
||||||
|
return super.getMarkdownCommandArgsCore<ShowQuickCommitDetailsCommandArgs>(Commands.ShowQuickCommitDetails, args);
|
||||||
|
}
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.ShowQuickCommitDetails);
|
super(Commands.ShowQuickCommitDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: ShowQuickCommitDetailsCommandArgs = {}): Promise<any> {
|
||||||
|
if (context.type === 'view') {
|
||||||
|
args = { ...args };
|
||||||
|
args.sha = context.node.uri.sha;
|
||||||
|
|
||||||
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
|
args.commit = context.node.commit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri, args: ShowQuickCommitDetailsCommandArgs = {}) {
|
async execute(editor?: TextEditor, uri?: Uri, args: ShowQuickCommitDetailsCommandArgs = {}) {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
if (uri === undefined) return undefined;
|
if (uri === undefined) return undefined;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Strings } from '../system';
|
import { Strings } from '../system';
|
||||||
import { TextEditor, Uri, window } from 'vscode';
|
import { TextEditor, Uri, window } from 'vscode';
|
||||||
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
|
import { ActiveEditorCachedCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
|
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
@@ -20,10 +20,31 @@ export interface ShowQuickCommitFileDetailsCommandArgs {
|
|||||||
|
|
||||||
export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand {
|
export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand {
|
||||||
|
|
||||||
|
static getMarkdownCommandArgs(sha: string): string;
|
||||||
|
static getMarkdownCommandArgs(args: ShowQuickCommitFileDetailsCommandArgs): string;
|
||||||
|
static getMarkdownCommandArgs(argsOrSha: ShowQuickCommitFileDetailsCommandArgs | string): string {
|
||||||
|
const args = typeof argsOrSha === 'string'
|
||||||
|
? { sha: argsOrSha }
|
||||||
|
: argsOrSha;
|
||||||
|
return super.getMarkdownCommandArgsCore<ShowQuickCommitFileDetailsCommandArgs>(Commands.ShowQuickCommitFileDetails, args);
|
||||||
|
}
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private git: GitService) {
|
||||||
super(Commands.ShowQuickCommitFileDetails);
|
super(Commands.ShowQuickCommitFileDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected async preExecute(context: CommandContext, args: ShowQuickCommitFileDetailsCommandArgs = {}): Promise<any> {
|
||||||
|
if (context.type === 'view') {
|
||||||
|
args = { ...args };
|
||||||
|
args.sha = context.node.uri.sha;
|
||||||
|
|
||||||
|
if (isCommandViewContextWithCommit(context)) {
|
||||||
|
args.commit = context.node.commit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.execute(context.editor, context.uri, args);
|
||||||
|
}
|
||||||
|
|
||||||
async execute(editor?: TextEditor, uri?: Uri, args: ShowQuickCommitFileDetailsCommandArgs = {}) {
|
async execute(editor?: TextEditor, uri?: Uri, args: ShowQuickCommitFileDetailsCommandArgs = {}) {
|
||||||
uri = getCommandUri(uri, editor);
|
uri = getCommandUri(uri, editor);
|
||||||
if (uri === undefined) return undefined;
|
if (uri === undefined) return undefined;
|
||||||
@@ -83,7 +104,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand
|
|||||||
args.commit.workingFileName = workingFileName;
|
args.commit.workingFileName = workingFileName;
|
||||||
args.commit.workingFileName = await this.git.findWorkingFileName(args.commit);
|
args.commit.workingFileName = await this.git.findWorkingFileName(args.commit);
|
||||||
|
|
||||||
const shortSha = args.sha!.substring(0, 8);
|
const shortSha = GitService.shortenSha(args.sha!);
|
||||||
|
|
||||||
if (args.goBackCommand === undefined) {
|
if (args.goBackCommand === undefined) {
|
||||||
// Create a command to get back to the commit details
|
// Create a command to get back to the commit details
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Strings } from '../system';
|
import { Strings } from '../system';
|
||||||
import { MessageItem, window } from 'vscode';
|
import { MessageItem, window } from 'vscode';
|
||||||
import { GitService, GitStashCommit } from '../gitService';
|
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
|
||||||
import { Command, CommandContext, Commands } from './common';
|
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { CommitQuickPickItem, StashListQuickPick } from '../quickPicks';
|
import { GitService, GitStashCommit } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { CommandQuickPickItem } from '../quickPicks';
|
import { CommandQuickPickItem, CommitQuickPickItem, StashListQuickPick } from '../quickPicks';
|
||||||
import { StashCommitNode } from '../views/stashCommitNode';
|
|
||||||
|
|
||||||
export interface StashApplyCommandArgs {
|
export interface StashApplyCommandArgs {
|
||||||
confirm?: boolean;
|
confirm?: boolean;
|
||||||
@@ -24,16 +22,13 @@ export class StashApplyCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected async preExecute(context: CommandContext, args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
protected async preExecute(context: CommandContext, args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
||||||
if (context.type === 'view' && context.node instanceof StashCommitNode) {
|
if (isCommandViewContextWithCommit<GitStashCommit>(context)) {
|
||||||
args = { ...args };
|
args = { ...args };
|
||||||
|
args.stashItem = { stashName: context.node.commit.stashName, message: context.node.commit.message };
|
||||||
const stash = context.node.commit;
|
|
||||||
args.stashItem = { stashName: stash.stashName, message: stash.message };
|
|
||||||
|
|
||||||
return this.execute(args);
|
return this.execute(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.preExecute(context, args);
|
return this.execute(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { MessageItem, window } from 'vscode';
|
import { MessageItem, window } from 'vscode';
|
||||||
import { Command, CommandContext, Commands } from './common';
|
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
|
||||||
import { GlyphChars } from '../constants';
|
import { GlyphChars } from '../constants';
|
||||||
import { GitService } from '../gitService';
|
import { GitService, GitStashCommit } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { CommandQuickPickItem } from '../quickPicks';
|
import { CommandQuickPickItem } from '../quickPicks';
|
||||||
import { StashCommitNode } from '../views/stashCommitNode';
|
|
||||||
|
|
||||||
export interface StashDeleteCommandArgs {
|
export interface StashDeleteCommandArgs {
|
||||||
confirm?: boolean;
|
confirm?: boolean;
|
||||||
@@ -21,16 +20,13 @@ export class StashDeleteCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected async preExecute(context: CommandContext, args: StashDeleteCommandArgs = { confirm: true }) {
|
protected async preExecute(context: CommandContext, args: StashDeleteCommandArgs = { confirm: true }) {
|
||||||
if (context.type === 'view' && context.node instanceof StashCommitNode) {
|
if (isCommandViewContextWithCommit<GitStashCommit>(context)) {
|
||||||
args = { ...args };
|
args = { ...args };
|
||||||
|
args.stashItem = { stashName: context.node.commit.stashName, message: context.node.commit.message };
|
||||||
const stash = context.node.commit;
|
|
||||||
args.stashItem = { stashName: stash.stashName, message: stash.message };
|
|
||||||
|
|
||||||
return this.execute(args);
|
return this.execute(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.preExecute(context, args);
|
return this.execute(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashDeleteCommandArgs = { confirm: true }) {
|
async execute(args: StashDeleteCommandArgs = { confirm: true }) {
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { InputBoxOptions, window } from 'vscode';
|
import { InputBoxOptions, Uri, window } from 'vscode';
|
||||||
import { GitService } from '../gitService';
|
import { GitService } from '../gitService';
|
||||||
|
import { CommandContext } from '../commands';
|
||||||
import { Command, Commands } from './common';
|
import { Command, Commands } from './common';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { CommandQuickPickItem } from '../quickPicks';
|
import { CommandQuickPickItem } from '../quickPicks';
|
||||||
|
|
||||||
export interface StashSaveCommandArgs {
|
export interface StashSaveCommandArgs {
|
||||||
message?: string;
|
message?: string;
|
||||||
unstagedOnly?: boolean;
|
uris?: Uri[];
|
||||||
|
|
||||||
goBackCommand?: CommandQuickPickItem;
|
goBackCommand?: CommandQuickPickItem;
|
||||||
}
|
}
|
||||||
@@ -18,16 +19,28 @@ export class StashSaveCommand extends Command {
|
|||||||
super(Commands.StashSave);
|
super(Commands.StashSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
async execute(args: StashSaveCommandArgs = { unstagedOnly: false }) {
|
protected async preExecute(context: CommandContext, args: StashSaveCommandArgs = {}): Promise<any> {
|
||||||
if (!this.git.repoPath) return undefined;
|
if (context.type === 'scm-states') {
|
||||||
|
args = { ...args };
|
||||||
args = { ...args };
|
args.uris = context.scmResourceStates.map(s => s.resourceUri);
|
||||||
if (args.unstagedOnly === undefined) {
|
return this.execute(args);
|
||||||
args.unstagedOnly = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context.type === 'scm-groups') {
|
||||||
|
args = { ...args };
|
||||||
|
args.uris = context.scmResourceGroups.reduce<Uri[]>((a, b) => a.concat(b.resourceStates.map(s => s.resourceUri)), []);
|
||||||
|
return this.execute(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.execute(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
async execute(args: StashSaveCommandArgs = {}) {
|
||||||
|
if (!this.git.repoPath) return undefined;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (args.message == null) {
|
if (args.message == null) {
|
||||||
|
args = { ...args };
|
||||||
args.message = await window.showInputBox({
|
args.message = await window.showInputBox({
|
||||||
prompt: `Please provide a stash message`,
|
prompt: `Please provide a stash message`,
|
||||||
placeHolder: `Stash message`
|
placeHolder: `Stash message`
|
||||||
@@ -35,7 +48,7 @@ export class StashSaveCommand extends Command {
|
|||||||
if (args.message === undefined) return args.goBackCommand === undefined ? undefined : args.goBackCommand.execute();
|
if (args.message === undefined) return args.goBackCommand === undefined ? undefined : args.goBackCommand.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.git.stashSave(this.git.repoPath, args.message, args.unstagedOnly);
|
return await this.git.stashSave(this.git.repoPath, args.message, args.uris);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
Logger.error(ex, 'StashSaveCommand');
|
Logger.error(ex, 'StashSaveCommand');
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { TextEditor, TextEditorEdit } from 'vscode';
|
import { TextEditor, TextEditorEdit } from 'vscode';
|
||||||
|
import { CodeLensController } from '../codeLensController';
|
||||||
import { Commands, EditorCommand } from './common';
|
import { Commands, EditorCommand } from './common';
|
||||||
import { GitService } from '../gitService';
|
|
||||||
|
|
||||||
export class ToggleCodeLensCommand extends EditorCommand {
|
export class ToggleCodeLensCommand extends EditorCommand {
|
||||||
|
|
||||||
constructor(private git: GitService) {
|
constructor(private codeLensController: CodeLensController) {
|
||||||
super(Commands.ToggleCodeLens);
|
super(Commands.ToggleCodeLens);
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(editor: TextEditor, edit: TextEditorEdit) {
|
execute(editor: TextEditor, edit: TextEditorEdit) {
|
||||||
return this.git.toggleCodeLens(editor);
|
return this.codeLensController.toggleCodeLens(editor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,13 @@
|
|||||||
import { FileAnnotationType } from './annotations/annotationController';
|
import { FileAnnotationType } from './annotations/annotationController';
|
||||||
import { Commands } from './commands';
|
import { Commands } from './commands';
|
||||||
import { LineAnnotationType } from './currentLineController';
|
import { LineAnnotationType } from './currentLineController';
|
||||||
|
import { GitExplorerView } from './views/gitExplorer';
|
||||||
import { OutputLevel } from './logger';
|
import { OutputLevel } from './logger';
|
||||||
|
|
||||||
export { ExtensionKey } from './constants';
|
export { ExtensionKey } from './constants';
|
||||||
|
|
||||||
export type CodeLensCommand = 'gitlens.toggleFileBlame' |
|
export type CodeLensCommand =
|
||||||
|
'gitlens.toggleFileBlame' |
|
||||||
'gitlens.showBlameHistory' |
|
'gitlens.showBlameHistory' |
|
||||||
'gitlens.showFileHistory' |
|
'gitlens.showFileHistory' |
|
||||||
'gitlens.diffWithPrevious' |
|
'gitlens.diffWithPrevious' |
|
||||||
@@ -40,7 +42,29 @@ export const LineHighlightLocations = {
|
|||||||
OverviewRuler: 'overviewRuler' as LineHighlightLocations
|
OverviewRuler: 'overviewRuler' as LineHighlightLocations
|
||||||
};
|
};
|
||||||
|
|
||||||
export type StatusBarCommand = 'gitlens.toggleFileBlame' |
|
export type CustomRemoteType =
|
||||||
|
'Bitbucket' |
|
||||||
|
'GitHub' |
|
||||||
|
'GitLab';
|
||||||
|
export const CustomRemoteType = {
|
||||||
|
Bitbucket: 'Bitbucket' as CustomRemoteType,
|
||||||
|
BitbucketServer: 'BitbucketServer' as CustomRemoteType,
|
||||||
|
GitHub: 'GitHub' as CustomRemoteType,
|
||||||
|
GitLab: 'GitLab' as CustomRemoteType
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GitExplorerFilesLayout =
|
||||||
|
'auto' |
|
||||||
|
'list' |
|
||||||
|
'tree';
|
||||||
|
export const GitExplorerFilesLayout = {
|
||||||
|
Auto: 'auto' as GitExplorerFilesLayout,
|
||||||
|
List: 'list' as GitExplorerFilesLayout,
|
||||||
|
Tree: 'tree' as GitExplorerFilesLayout
|
||||||
|
};
|
||||||
|
|
||||||
|
export type StatusBarCommand =
|
||||||
|
'gitlens.toggleFileBlame' |
|
||||||
'gitlens.showBlameHistory' |
|
'gitlens.showBlameHistory' |
|
||||||
'gitlens.showFileHistory' |
|
'gitlens.showFileHistory' |
|
||||||
'gitlens.toggleCodeLens' |
|
'gitlens.toggleCodeLens' |
|
||||||
@@ -118,6 +142,29 @@ export interface ICodeLensLanguageLocation {
|
|||||||
customSymbols?: string[];
|
customSymbols?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IGitExplorerConfig {
|
||||||
|
enabled: boolean;
|
||||||
|
view: GitExplorerView;
|
||||||
|
files: {
|
||||||
|
layout: GitExplorerFilesLayout;
|
||||||
|
compact: boolean;
|
||||||
|
threshold: number;
|
||||||
|
};
|
||||||
|
includeWorkingTree: boolean;
|
||||||
|
showTrackingBranch: boolean;
|
||||||
|
commitFormat: string;
|
||||||
|
commitFileFormat: string;
|
||||||
|
stashFormat: string;
|
||||||
|
stashFileFormat: string;
|
||||||
|
statusFileFormat: string;
|
||||||
|
// dateFormat: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IRemotesConfig {
|
||||||
|
type: CustomRemoteType;
|
||||||
|
domain: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface IThemeConfig {
|
export interface IThemeConfig {
|
||||||
annotations: {
|
annotations: {
|
||||||
file: {
|
file: {
|
||||||
@@ -232,7 +279,6 @@ export interface IConfig {
|
|||||||
hover: {
|
hover: {
|
||||||
details: boolean;
|
details: boolean;
|
||||||
changes: boolean;
|
changes: boolean;
|
||||||
wholeLine: boolean;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -256,6 +302,8 @@ export interface IConfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
blame: {
|
blame: {
|
||||||
|
ignoreWhitespace: boolean;
|
||||||
|
|
||||||
file: {
|
file: {
|
||||||
annotationType: FileAnnotationType;
|
annotationType: FileAnnotationType;
|
||||||
lineHighlight: {
|
lineHighlight: {
|
||||||
@@ -296,19 +344,9 @@ export interface IConfig {
|
|||||||
|
|
||||||
defaultDateFormat: string | null;
|
defaultDateFormat: string | null;
|
||||||
|
|
||||||
gitExplorer: {
|
gitExplorer: IGitExplorerConfig;
|
||||||
enabled: boolean;
|
|
||||||
commitFormat: string;
|
|
||||||
commitFileFormat: string;
|
|
||||||
// dateFormat: string | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
stashExplorer: {
|
remotes: IRemotesConfig[];
|
||||||
enabled: boolean;
|
|
||||||
stashFormat: string;
|
|
||||||
stashFileFormat: string;
|
|
||||||
// dateFormat: string | null;
|
|
||||||
};
|
|
||||||
|
|
||||||
statusBar: {
|
statusBar: {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
@@ -40,23 +40,25 @@ export const BuiltInCommands = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type CommandContext =
|
export type CommandContext =
|
||||||
|
'gitlens:annotationStatus' |
|
||||||
'gitlens:canToggleCodeLens' |
|
'gitlens:canToggleCodeLens' |
|
||||||
'gitlens:enabled' |
|
'gitlens:enabled' |
|
||||||
'gitlens:hasRemotes' |
|
'gitlens:hasRemotes' |
|
||||||
|
'gitlens:gitExplorer:view' |
|
||||||
'gitlens:isBlameable' |
|
'gitlens:isBlameable' |
|
||||||
'gitlens:isRepository' |
|
'gitlens:isRepository' |
|
||||||
'gitlens:isTracked' |
|
'gitlens:isTracked' |
|
||||||
'gitlens:key' |
|
'gitlens:key';
|
||||||
'gitlens:annotationStatus';
|
|
||||||
export const CommandContext = {
|
export const CommandContext = {
|
||||||
|
AnnotationStatus: 'gitlens:annotationStatus' as CommandContext,
|
||||||
CanToggleCodeLens: 'gitlens:canToggleCodeLens' as CommandContext,
|
CanToggleCodeLens: 'gitlens:canToggleCodeLens' as CommandContext,
|
||||||
Enabled: 'gitlens:enabled' as CommandContext,
|
Enabled: 'gitlens:enabled' as CommandContext,
|
||||||
|
GitExplorerView: 'gitlens:gitExplorer:view' as CommandContext,
|
||||||
HasRemotes: 'gitlens:hasRemotes' as CommandContext,
|
HasRemotes: 'gitlens:hasRemotes' as CommandContext,
|
||||||
IsBlameable: 'gitlens:isBlameable' as CommandContext,
|
IsBlameable: 'gitlens:isBlameable' as CommandContext,
|
||||||
IsRepository: 'gitlens:isRepository' as CommandContext,
|
IsRepository: 'gitlens:isRepository' as CommandContext,
|
||||||
IsTracked: 'gitlens:isTracked' as CommandContext,
|
IsTracked: 'gitlens:isTracked' as CommandContext,
|
||||||
Key: 'gitlens:key' as CommandContext,
|
Key: 'gitlens:key' as CommandContext
|
||||||
AnnotationStatus: 'gitlens:annotationStatus' as CommandContext
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function setCommandContext(key: CommandContext | string, value: any) {
|
export function setCommandContext(key: CommandContext | string, value: any) {
|
||||||
@@ -75,11 +77,16 @@ export type GlyphChars = '\u21a9' |
|
|||||||
'\u2937' |
|
'\u2937' |
|
||||||
'\u2190' |
|
'\u2190' |
|
||||||
'\u2194' |
|
'\u2194' |
|
||||||
|
'\u2192' |
|
||||||
'\u21e8' |
|
'\u21e8' |
|
||||||
'\u2191' |
|
'\u2191' |
|
||||||
|
'\u2197' |
|
||||||
|
'\u2217' |
|
||||||
|
'\u2713' |
|
||||||
'\u2014' |
|
'\u2014' |
|
||||||
'\u2022' |
|
'\u2022' |
|
||||||
'\u2026' |
|
'\u2026' |
|
||||||
|
'\u270E' |
|
||||||
'\u00a0' |
|
'\u00a0' |
|
||||||
'\u200b';
|
'\u200b';
|
||||||
export const GlyphChars = {
|
export const GlyphChars = {
|
||||||
@@ -88,16 +95,26 @@ export const GlyphChars = {
|
|||||||
ArrowDropRight: '\u2937' as GlyphChars,
|
ArrowDropRight: '\u2937' as GlyphChars,
|
||||||
ArrowLeft: '\u2190' as GlyphChars,
|
ArrowLeft: '\u2190' as GlyphChars,
|
||||||
ArrowLeftRight: '\u2194' as GlyphChars,
|
ArrowLeftRight: '\u2194' as GlyphChars,
|
||||||
|
ArrowRight: '\u2192' as GlyphChars,
|
||||||
ArrowRightHollow: '\u21e8' as GlyphChars,
|
ArrowRightHollow: '\u21e8' as GlyphChars,
|
||||||
ArrowUp: '\u2191' as GlyphChars,
|
ArrowUp: '\u2191' as GlyphChars,
|
||||||
|
ArrowUpRight: '\u2197' as GlyphChars,
|
||||||
|
Asterisk: '\u2217' as GlyphChars,
|
||||||
|
Check: '\u2713' as GlyphChars,
|
||||||
Dash: '\u2014' as GlyphChars,
|
Dash: '\u2014' as GlyphChars,
|
||||||
Dot: '\u2022' as GlyphChars,
|
Dot: '\u2022' as GlyphChars,
|
||||||
Ellipsis: '\u2026' as GlyphChars,
|
Ellipsis: '\u2026' as GlyphChars,
|
||||||
|
Pensil: '\u270E' as GlyphChars,
|
||||||
Space: '\u00a0' as GlyphChars,
|
Space: '\u00a0' as GlyphChars,
|
||||||
ZeroWidthSpace: '\u200b' as GlyphChars
|
ZeroWidthSpace: '\u200b' as GlyphChars
|
||||||
};
|
};
|
||||||
|
|
||||||
export type WorkspaceState = 'gitlensVersion';
|
export type GlobalState = 'gitlensVersion';
|
||||||
|
export const GlobalState = {
|
||||||
|
GitLensVersion: 'gitlensVersion' as GlobalState
|
||||||
|
};
|
||||||
|
|
||||||
|
export type WorkspaceState = 'gitlens:gitExplorer:view';
|
||||||
export const WorkspaceState = {
|
export const WorkspaceState = {
|
||||||
GitLensVersion: 'gitlensVersion' as WorkspaceState
|
GitExplorerView: 'gitlens:gitExplorer:view' as WorkspaceState
|
||||||
};
|
};
|
||||||
@@ -7,7 +7,7 @@ import { Commands } from './commands';
|
|||||||
import { TextEditorComparer } from './comparers';
|
import { TextEditorComparer } from './comparers';
|
||||||
import { IConfig, StatusBarCommand } from './configuration';
|
import { IConfig, StatusBarCommand } from './configuration';
|
||||||
import { DocumentSchemes, ExtensionKey } from './constants';
|
import { DocumentSchemes, ExtensionKey } from './constants';
|
||||||
import { BlameabilityChangeEvent, CommitFormatter, GitCommit, GitCommitLine, GitContextTracker, GitService, GitUri } from './gitService';
|
import { BlameabilityChangeEvent, CommitFormatter, GitCommit, GitCommitLine, GitContextTracker, GitService, GitUri, ICommitFormatOptions } from './gitService';
|
||||||
import { Logger } from './logger';
|
import { Logger } from './logger';
|
||||||
|
|
||||||
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({
|
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({
|
||||||
@@ -295,12 +295,10 @@ export class CurrentLineController extends Disposable {
|
|||||||
const decorationOptions: DecorationOptions[] = [];
|
const decorationOptions: DecorationOptions[] = [];
|
||||||
|
|
||||||
let showChanges = false;
|
let showChanges = false;
|
||||||
let showChangesStartIndex = 0;
|
|
||||||
let showChangesInStartingWhitespace = false;
|
|
||||||
|
|
||||||
let showDetails = false;
|
let showDetails = false;
|
||||||
let showDetailsStartIndex = 0;
|
|
||||||
let showDetailsInStartingWhitespace = false;
|
let showAtStart = false;
|
||||||
|
let showStartIndex = 0;
|
||||||
|
|
||||||
switch (state.annotationType) {
|
switch (state.annotationType) {
|
||||||
case LineAnnotationType.Trailing: {
|
case LineAnnotationType.Trailing: {
|
||||||
@@ -308,21 +306,7 @@ export class CurrentLineController extends Disposable {
|
|||||||
|
|
||||||
showChanges = cfgAnnotations.hover.changes;
|
showChanges = cfgAnnotations.hover.changes;
|
||||||
showDetails = cfgAnnotations.hover.details;
|
showDetails = cfgAnnotations.hover.details;
|
||||||
|
showStartIndex = cfgAnnotations.hover.wholeLine ? 0 : endOfLineIndex;
|
||||||
if (cfgAnnotations.hover.wholeLine) {
|
|
||||||
showChangesStartIndex = 0;
|
|
||||||
showChangesInStartingWhitespace = false;
|
|
||||||
|
|
||||||
showDetailsStartIndex = 0;
|
|
||||||
showDetailsInStartingWhitespace = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
showChangesStartIndex = endOfLineIndex;
|
|
||||||
showChangesInStartingWhitespace = true;
|
|
||||||
|
|
||||||
showDetailsStartIndex = endOfLineIndex;
|
|
||||||
showDetailsInStartingWhitespace = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const decoration = Annotations.trailing(commit, cfgAnnotations.format, cfgAnnotations.dateFormat === null ? this._config.defaultDateFormat : cfgAnnotations.dateFormat, this._config.theme);
|
const decoration = Annotations.trailing(commit, cfgAnnotations.format, cfgAnnotations.dateFormat === null ? this._config.defaultDateFormat : cfgAnnotations.dateFormat, this._config.theme);
|
||||||
decoration.range = editor.document.validateRange(new Range(line, endOfLineIndex, line, endOfLineIndex));
|
decoration.range = editor.document.validateRange(new Range(line, endOfLineIndex, line, endOfLineIndex));
|
||||||
@@ -334,12 +318,8 @@ export class CurrentLineController extends Disposable {
|
|||||||
const cfgAnnotations = this._config.annotations.line.hover;
|
const cfgAnnotations = this._config.annotations.line.hover;
|
||||||
|
|
||||||
showChanges = cfgAnnotations.changes;
|
showChanges = cfgAnnotations.changes;
|
||||||
showChangesStartIndex = 0;
|
|
||||||
showChangesInStartingWhitespace = false;
|
|
||||||
|
|
||||||
showDetails = cfgAnnotations.details;
|
showDetails = cfgAnnotations.details;
|
||||||
showDetailsStartIndex = 0;
|
showStartIndex = 0;
|
||||||
showDetailsInStartingWhitespace = false;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -348,25 +328,15 @@ export class CurrentLineController extends Disposable {
|
|||||||
if (showDetails || showChanges) {
|
if (showDetails || showChanges) {
|
||||||
const annotationType = this.annotationController.getAnnotationType(editor);
|
const annotationType = this.annotationController.getAnnotationType(editor);
|
||||||
|
|
||||||
const firstNonWhitespace = editor.document.lineAt(line).firstNonWhitespaceCharacterIndex;
|
|
||||||
|
|
||||||
switch (annotationType) {
|
switch (annotationType) {
|
||||||
case FileAnnotationType.Gutter: {
|
case FileAnnotationType.Gutter: {
|
||||||
const cfgHover = this._config.annotations.file.gutter.hover;
|
const cfgHover = this._config.annotations.file.gutter.hover;
|
||||||
if (cfgHover.details) {
|
if (cfgHover.details) {
|
||||||
showDetailsInStartingWhitespace = false;
|
|
||||||
if (cfgHover.wholeLine) {
|
if (cfgHover.wholeLine) {
|
||||||
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
showStartIndex = 0;
|
||||||
showDetails = false;
|
|
||||||
}
|
}
|
||||||
else {
|
else if (showStartIndex !== 0) {
|
||||||
if (showDetailsStartIndex === 0) {
|
showAtStart = true;
|
||||||
showDetailsStartIndex = firstNonWhitespace === 0 ? 1 : firstNonWhitespace;
|
|
||||||
}
|
|
||||||
if (showChangesStartIndex === 0) {
|
|
||||||
showChangesInStartingWhitespace = true;
|
|
||||||
showChangesStartIndex = firstNonWhitespace === 0 ? 1 : firstNonWhitespace;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,20 +344,11 @@ export class CurrentLineController extends Disposable {
|
|||||||
}
|
}
|
||||||
case FileAnnotationType.Hover: {
|
case FileAnnotationType.Hover: {
|
||||||
const cfgHover = this._config.annotations.file.hover;
|
const cfgHover = this._config.annotations.file.hover;
|
||||||
showDetailsInStartingWhitespace = false;
|
|
||||||
if (cfgHover.wholeLine) {
|
if (cfgHover.wholeLine) {
|
||||||
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
showStartIndex = 0;
|
||||||
showDetails = false;
|
|
||||||
showChangesStartIndex = 0;
|
|
||||||
}
|
}
|
||||||
else {
|
else if (showStartIndex !== 0) {
|
||||||
if (showDetailsStartIndex === 0) {
|
showAtStart = true;
|
||||||
showDetailsStartIndex = firstNonWhitespace === 0 ? 1 : firstNonWhitespace;
|
|
||||||
}
|
|
||||||
if (showChangesStartIndex === 0) {
|
|
||||||
showChangesInStartingWhitespace = true;
|
|
||||||
showChangesStartIndex = firstNonWhitespace === 0 ? 1 : firstNonWhitespace;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -395,29 +356,21 @@ export class CurrentLineController extends Disposable {
|
|||||||
case FileAnnotationType.RecentChanges: {
|
case FileAnnotationType.RecentChanges: {
|
||||||
const cfgChanges = this._config.annotations.file.recentChanges.hover;
|
const cfgChanges = this._config.annotations.file.recentChanges.hover;
|
||||||
if (cfgChanges.details) {
|
if (cfgChanges.details) {
|
||||||
if (cfgChanges.wholeLine) {
|
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
||||||
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
showDetails = false;
|
||||||
showDetails = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
showDetailsInStartingWhitespace = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfgChanges.changes) {
|
if (cfgChanges.changes) {
|
||||||
if (cfgChanges.wholeLine) {
|
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
||||||
// Avoid double annotations if we are showing the whole-file hover blame annotations
|
showChanges = false;
|
||||||
showChanges = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
showChangesInStartingWhitespace = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const range = editor.document.validateRange(new Range(line, showStartIndex, line, endOfLineIndex));
|
||||||
|
|
||||||
if (showDetails) {
|
if (showDetails) {
|
||||||
// Get the full commit message -- since blame only returns the summary
|
// Get the full commit message -- since blame only returns the summary
|
||||||
let logCommit: GitCommit | undefined = undefined;
|
let logCommit: GitCommit | undefined = undefined;
|
||||||
@@ -425,29 +378,22 @@ export class CurrentLineController extends Disposable {
|
|||||||
logCommit = await this.git.getLogCommit(this._uri.repoPath, this._uri.fsPath, commit.sha);
|
logCommit = await this.git.getLogCommit(this._uri.repoPath, this._uri.fsPath, commit.sha);
|
||||||
}
|
}
|
||||||
|
|
||||||
// I have no idea why I need this protection -- but it happens
|
const decoration = Annotations.detailsHover(logCommit || commit, this._config.defaultDateFormat, this.git.hasRemotes((logCommit || commit).repoPath));
|
||||||
if (editor.document === undefined) return;
|
decoration.range = range;
|
||||||
|
|
||||||
const decoration = Annotations.detailsHover(logCommit || commit, this._config.defaultDateFormat);
|
|
||||||
decoration.range = editor.document.validateRange(new Range(line, showDetailsStartIndex, line, endOfLineIndex));
|
|
||||||
decorationOptions.push(decoration);
|
decorationOptions.push(decoration);
|
||||||
|
|
||||||
if (showDetailsInStartingWhitespace && showDetailsStartIndex !== 0) {
|
if (showAtStart) {
|
||||||
decorationOptions.push(Annotations.withRange(decoration, 0, firstNonWhitespace));
|
decorationOptions.push(Annotations.withRange(decoration, 0, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showChanges) {
|
if (showChanges) {
|
||||||
const decoration = await Annotations.changesHover(commit, line, this._uri, this.git);
|
const decoration = await Annotations.changesHover(commit, line, this._uri, this.git);
|
||||||
|
decoration.range = range;
|
||||||
// I have no idea why I need this protection -- but it happens
|
|
||||||
if (editor.document === undefined) return;
|
|
||||||
|
|
||||||
decoration.range = editor.document.validateRange(new Range(line, showChangesStartIndex, line, endOfLineIndex));
|
|
||||||
decorationOptions.push(decoration);
|
decorationOptions.push(decoration);
|
||||||
|
|
||||||
if (showChangesInStartingWhitespace && showChangesStartIndex !== 0) {
|
if (showAtStart) {
|
||||||
decorationOptions.push(Annotations.withRange(decoration, 0, firstNonWhitespace));
|
decorationOptions.push(Annotations.withRange(decoration, 0, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -462,7 +408,10 @@ export class CurrentLineController extends Disposable {
|
|||||||
const cfg = this._config.statusBar;
|
const cfg = this._config.statusBar;
|
||||||
if (!cfg.enabled || this._statusBarItem === undefined) return;
|
if (!cfg.enabled || this._statusBarItem === undefined) return;
|
||||||
|
|
||||||
this._statusBarItem.text = `$(git-commit) ${CommitFormatter.fromTemplate(cfg.format, commit, cfg.dateFormat === null ? this._config.defaultDateFormat : cfg.dateFormat)}`;
|
this._statusBarItem.text = `$(git-commit) ${CommitFormatter.fromTemplate(cfg.format, commit, {
|
||||||
|
truncateMessageAtNewLine: true,
|
||||||
|
dateFormat: cfg.dateFormat === null ? this._config.defaultDateFormat : cfg.dateFormat
|
||||||
|
} as ICommitFormatOptions)}`;
|
||||||
|
|
||||||
switch (cfg.command) {
|
switch (cfg.command) {
|
||||||
case StatusBarCommand.BlameAnnotate:
|
case StatusBarCommand.BlameAnnotate:
|
||||||
@@ -476,11 +425,11 @@ export class CurrentLineController extends Disposable {
|
|||||||
break;
|
break;
|
||||||
case StatusBarCommand.DiffWithPrevious:
|
case StatusBarCommand.DiffWithPrevious:
|
||||||
this._statusBarItem.command = Commands.DiffLineWithPrevious;
|
this._statusBarItem.command = Commands.DiffLineWithPrevious;
|
||||||
this._statusBarItem.tooltip = 'Compare Line Commit with Previous';
|
this._statusBarItem.tooltip = 'Compare Line Revision with Previous';
|
||||||
break;
|
break;
|
||||||
case StatusBarCommand.DiffWithWorking:
|
case StatusBarCommand.DiffWithWorking:
|
||||||
this._statusBarItem.command = Commands.DiffLineWithWorking;
|
this._statusBarItem.command = Commands.DiffLineWithWorking;
|
||||||
this._statusBarItem.tooltip = 'Compare Line Commit with Working Tree';
|
this._statusBarItem.tooltip = 'Compare Line Revision with Working';
|
||||||
break;
|
break;
|
||||||
case StatusBarCommand.ToggleCodeLens:
|
case StatusBarCommand.ToggleCodeLens:
|
||||||
this._statusBarItem.tooltip = 'Toggle Git CodeLens';
|
this._statusBarItem.tooltip = 'Toggle Git CodeLens';
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
import { commands, ExtensionContext, extensions, languages, window, workspace } from 'vscode';
|
import { commands, ExtensionContext, extensions, languages, window, workspace } from 'vscode';
|
||||||
import { AnnotationController } from './annotations/annotationController';
|
import { AnnotationController } from './annotations/annotationController';
|
||||||
import { CloseUnchangedFilesCommand, OpenChangedFilesCommand } from './commands';
|
import { CloseUnchangedFilesCommand, OpenChangedFilesCommand } from './commands';
|
||||||
import { OpenBranchInRemoteCommand, OpenCommitInRemoteCommand, OpenFileInRemoteCommand, OpenInRemoteCommand, OpenRepoInRemoteCommand } from './commands';
|
import { ExternalDiffCommand } from './commands';
|
||||||
|
import { OpenBranchesInRemoteCommand, OpenBranchInRemoteCommand, OpenCommitInRemoteCommand, OpenFileInRemoteCommand, OpenInRemoteCommand, OpenRepoInRemoteCommand } from './commands';
|
||||||
import { CopyMessageToClipboardCommand, CopyShaToClipboardCommand } from './commands';
|
import { CopyMessageToClipboardCommand, CopyShaToClipboardCommand } from './commands';
|
||||||
import { DiffDirectoryCommand, DiffLineWithPreviousCommand, DiffLineWithWorkingCommand, DiffWithBranchCommand, DiffWithNextCommand, DiffWithPreviousCommand, DiffWithRevisionCommand, DiffWithWorkingCommand } from './commands';
|
import { DiffDirectoryCommand, DiffLineWithPreviousCommand, DiffLineWithWorkingCommand, DiffWithBranchCommand, DiffWithCommand, DiffWithNextCommand, DiffWithPreviousCommand, DiffWithRevisionCommand, DiffWithWorkingCommand } from './commands';
|
||||||
import { ResetSuppressedWarningsCommand } from './commands';
|
import { ResetSuppressedWarningsCommand } from './commands';
|
||||||
import { ClearFileAnnotationsCommand, ShowFileBlameCommand, ShowLineBlameCommand, ToggleFileBlameCommand, ToggleFileRecentChangesCommand, ToggleLineBlameCommand } from './commands';
|
import { ClearFileAnnotationsCommand, ShowFileBlameCommand, ShowLineBlameCommand, ToggleFileBlameCommand, ToggleFileRecentChangesCommand, ToggleLineBlameCommand } from './commands';
|
||||||
import { ShowBlameHistoryCommand, ShowFileHistoryCommand } from './commands';
|
import { ShowBlameHistoryCommand, ShowFileHistoryCommand } from './commands';
|
||||||
@@ -16,11 +17,12 @@ import { ShowQuickRepoStatusCommand, ShowQuickStashListCommand } from './command
|
|||||||
import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands';
|
import { StashApplyCommand, StashDeleteCommand, StashSaveCommand } from './commands';
|
||||||
import { ToggleCodeLensCommand } from './commands';
|
import { ToggleCodeLensCommand } from './commands';
|
||||||
import { CodeLensLocations, IConfig, LineHighlightLocations } from './configuration';
|
import { CodeLensLocations, IConfig, LineHighlightLocations } from './configuration';
|
||||||
import { ApplicationInsightsKey, CommandContext, ExtensionKey, QualifiedExtensionId, setCommandContext, WorkspaceState } from './constants';
|
import { ApplicationInsightsKey, CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants';
|
||||||
|
import { CodeLensController } from './codeLensController';
|
||||||
import { CurrentLineController, LineAnnotationType } from './currentLineController';
|
import { CurrentLineController, LineAnnotationType } from './currentLineController';
|
||||||
|
import { RemoteProviderFactory } from './git/remotes/factory';
|
||||||
import { GitContentProvider } from './gitContentProvider';
|
import { GitContentProvider } from './gitContentProvider';
|
||||||
// import { GitExplorer } from './views/gitExplorer';
|
import { GitExplorer } from './views/gitExplorer';
|
||||||
import { StashExplorer } from './views/stashExplorer';
|
|
||||||
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
|
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
|
||||||
import { GitContextTracker, GitService } from './gitService';
|
import { GitContextTracker, GitService } from './gitService';
|
||||||
import { Keyboard } from './keyboard';
|
import { Keyboard } from './keyboard';
|
||||||
@@ -33,6 +35,7 @@ export async function activate(context: ExtensionContext) {
|
|||||||
Logger.configure(context);
|
Logger.configure(context);
|
||||||
Messages.configure(context);
|
Messages.configure(context);
|
||||||
Telemetry.configure(ApplicationInsightsKey);
|
Telemetry.configure(ApplicationInsightsKey);
|
||||||
|
RemoteProviderFactory.configure(context);
|
||||||
|
|
||||||
const gitlens = extensions.getExtension(QualifiedExtensionId)!;
|
const gitlens = extensions.getExtension(QualifiedExtensionId)!;
|
||||||
const gitlensVersion = gitlens.packageJSON.version;
|
const gitlensVersion = gitlens.packageJSON.version;
|
||||||
@@ -69,9 +72,9 @@ export async function activate(context: ExtensionContext) {
|
|||||||
notifyOnUnsupportedGitVersion(context, gitVersion);
|
notifyOnUnsupportedGitVersion(context, gitVersion);
|
||||||
notifyOnNewGitLensVersion(context, gitlensVersion);
|
notifyOnNewGitLensVersion(context, gitlensVersion);
|
||||||
|
|
||||||
await context.globalState.update(WorkspaceState.GitLensVersion, gitlensVersion);
|
await context.globalState.update(GlobalState.GitLensVersion, gitlensVersion);
|
||||||
|
|
||||||
const git = new GitService(context, repoPath);
|
const git = new GitService(repoPath);
|
||||||
context.subscriptions.push(git);
|
context.subscriptions.push(git);
|
||||||
|
|
||||||
const gitContextTracker = new GitContextTracker(git);
|
const gitContextTracker = new GitContextTracker(git);
|
||||||
@@ -84,30 +87,33 @@ export async function activate(context: ExtensionContext) {
|
|||||||
const annotationController = new AnnotationController(context, git, gitContextTracker);
|
const annotationController = new AnnotationController(context, git, gitContextTracker);
|
||||||
context.subscriptions.push(annotationController);
|
context.subscriptions.push(annotationController);
|
||||||
|
|
||||||
|
const codeLensController = new CodeLensController(context, git);
|
||||||
|
context.subscriptions.push(codeLensController);
|
||||||
|
|
||||||
const currentLineController = new CurrentLineController(context, git, gitContextTracker, annotationController);
|
const currentLineController = new CurrentLineController(context, git, gitContextTracker, annotationController);
|
||||||
context.subscriptions.push(currentLineController);
|
context.subscriptions.push(currentLineController);
|
||||||
|
|
||||||
context.subscriptions.push(new Keyboard());
|
context.subscriptions.push(new Keyboard());
|
||||||
|
|
||||||
// const explorer = new GitExplorer(context, git);
|
context.subscriptions.push(window.registerTreeDataProvider('gitlens.gitExplorer', new GitExplorer(context, git)));
|
||||||
// context.subscriptions.push(window.registerTreeDataProvider('gitlens.gitExplorer', explorer));
|
|
||||||
|
|
||||||
context.subscriptions.push(window.registerTreeDataProvider('gitlens.stashExplorer', new StashExplorer(context, git)));
|
|
||||||
|
|
||||||
context.subscriptions.push(commands.registerTextEditorCommand('gitlens.computingFileAnnotations', () => { }));
|
context.subscriptions.push(commands.registerTextEditorCommand('gitlens.computingFileAnnotations', () => { }));
|
||||||
|
|
||||||
context.subscriptions.push(new CloseUnchangedFilesCommand(git));
|
context.subscriptions.push(new CloseUnchangedFilesCommand(git));
|
||||||
|
context.subscriptions.push(new ExternalDiffCommand(git));
|
||||||
context.subscriptions.push(new OpenChangedFilesCommand(git));
|
context.subscriptions.push(new OpenChangedFilesCommand(git));
|
||||||
context.subscriptions.push(new CopyMessageToClipboardCommand(git));
|
context.subscriptions.push(new CopyMessageToClipboardCommand(git));
|
||||||
context.subscriptions.push(new CopyShaToClipboardCommand(git));
|
context.subscriptions.push(new CopyShaToClipboardCommand(git));
|
||||||
context.subscriptions.push(new DiffDirectoryCommand(git));
|
context.subscriptions.push(new DiffDirectoryCommand(git));
|
||||||
context.subscriptions.push(new DiffLineWithPreviousCommand(git));
|
context.subscriptions.push(new DiffLineWithPreviousCommand(git));
|
||||||
context.subscriptions.push(new DiffLineWithWorkingCommand(git));
|
context.subscriptions.push(new DiffLineWithWorkingCommand(git));
|
||||||
|
context.subscriptions.push(new DiffWithCommand(git));
|
||||||
context.subscriptions.push(new DiffWithBranchCommand(git));
|
context.subscriptions.push(new DiffWithBranchCommand(git));
|
||||||
context.subscriptions.push(new DiffWithNextCommand(git));
|
context.subscriptions.push(new DiffWithNextCommand(git));
|
||||||
context.subscriptions.push(new DiffWithPreviousCommand(git));
|
context.subscriptions.push(new DiffWithPreviousCommand(git));
|
||||||
context.subscriptions.push(new DiffWithRevisionCommand(git));
|
context.subscriptions.push(new DiffWithRevisionCommand(git));
|
||||||
context.subscriptions.push(new DiffWithWorkingCommand(git));
|
context.subscriptions.push(new DiffWithWorkingCommand(git));
|
||||||
|
context.subscriptions.push(new OpenBranchesInRemoteCommand(git));
|
||||||
context.subscriptions.push(new OpenBranchInRemoteCommand(git));
|
context.subscriptions.push(new OpenBranchInRemoteCommand(git));
|
||||||
context.subscriptions.push(new OpenCommitInRemoteCommand(git));
|
context.subscriptions.push(new OpenCommitInRemoteCommand(git));
|
||||||
context.subscriptions.push(new OpenFileInRemoteCommand(git));
|
context.subscriptions.push(new OpenFileInRemoteCommand(git));
|
||||||
@@ -134,7 +140,7 @@ export async function activate(context: ExtensionContext) {
|
|||||||
context.subscriptions.push(new StashApplyCommand(git));
|
context.subscriptions.push(new StashApplyCommand(git));
|
||||||
context.subscriptions.push(new StashDeleteCommand(git));
|
context.subscriptions.push(new StashDeleteCommand(git));
|
||||||
context.subscriptions.push(new StashSaveCommand(git));
|
context.subscriptions.push(new StashSaveCommand(git));
|
||||||
context.subscriptions.push(new ToggleCodeLensCommand(git));
|
context.subscriptions.push(new ToggleCodeLensCommand(codeLensController));
|
||||||
|
|
||||||
// Constantly over my data cap so stop collecting initialized event
|
// Constantly over my data cap so stop collecting initialized event
|
||||||
// Telemetry.trackEvent('initialized', Objects.flatten(cfg, 'config', true));
|
// Telemetry.trackEvent('initialized', Objects.flatten(cfg, 'config', true));
|
||||||
@@ -144,7 +150,7 @@ export async function activate(context: ExtensionContext) {
|
|||||||
export function deactivate() { }
|
export function deactivate() { }
|
||||||
|
|
||||||
async function migrateSettings(context: ExtensionContext) {
|
async function migrateSettings(context: ExtensionContext) {
|
||||||
const previousVersion = context.globalState.get<string>(WorkspaceState.GitLensVersion);
|
const previousVersion = context.globalState.get<string>(GlobalState.GitLensVersion);
|
||||||
if (previousVersion === undefined) return;
|
if (previousVersion === undefined) return;
|
||||||
|
|
||||||
const [major] = previousVersion.split('.');
|
const [major] = previousVersion.split('.');
|
||||||
@@ -270,13 +276,16 @@ async function migrateSettings(context: ExtensionContext) {
|
|||||||
async function notifyOnNewGitLensVersion(context: ExtensionContext, version: string) {
|
async function notifyOnNewGitLensVersion(context: ExtensionContext, version: string) {
|
||||||
if (context.globalState.get(SuppressedKeys.UpdateNotice, false)) return;
|
if (context.globalState.get(SuppressedKeys.UpdateNotice, false)) return;
|
||||||
|
|
||||||
const previousVersion = context.globalState.get<string>(WorkspaceState.GitLensVersion);
|
const previousVersion = context.globalState.get<string>(GlobalState.GitLensVersion);
|
||||||
|
|
||||||
if (previousVersion === undefined) {
|
if (previousVersion === undefined) {
|
||||||
|
Logger.log(`GitLens first-time install`);
|
||||||
await Messages.showWelcomeMessage();
|
await Messages.showWelcomeMessage();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.log(`GitLens upgraded from v${previousVersion} to v${version}`);
|
||||||
|
|
||||||
const [major, minor] = version.split('.');
|
const [major, minor] = version.split('.');
|
||||||
const [prevMajor, prevMinor] = previousVersion.split('.');
|
const [prevMajor, prevMinor] = previousVersion.split('.');
|
||||||
if (major === prevMajor && minor === prevMinor) return;
|
if (major === prevMajor && minor === prevMinor) return;
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
import { Strings } from '../../system';
|
import { Strings } from '../../system';
|
||||||
import { GitCommit } from '../models/commit';
|
import { GitCommit } from '../models/commit';
|
||||||
import { Formatter, IFormatOptions } from './formatter';
|
import { Formatter, IFormatOptions } from './formatter';
|
||||||
import * as moment from 'moment';
|
import { GlyphChars } from '../../constants';
|
||||||
|
|
||||||
export interface ICommitFormatOptions extends IFormatOptions {
|
export interface ICommitFormatOptions extends IFormatOptions {
|
||||||
|
truncateMessageAtNewLine?: boolean;
|
||||||
|
|
||||||
tokenOptions?: {
|
tokenOptions?: {
|
||||||
ago?: Strings.ITokenOptions;
|
ago?: Strings.ITokenOptions;
|
||||||
author?: Strings.ITokenOptions;
|
author?: Strings.ITokenOptions;
|
||||||
@@ -17,7 +19,7 @@ export interface ICommitFormatOptions extends IFormatOptions {
|
|||||||
export class CommitFormatter extends Formatter<GitCommit, ICommitFormatOptions> {
|
export class CommitFormatter extends Formatter<GitCommit, ICommitFormatOptions> {
|
||||||
|
|
||||||
get ago() {
|
get ago() {
|
||||||
const ago = moment(this._item.date).fromNow();
|
const ago = this._item.fromNow();
|
||||||
return this._padOrTruncate(ago, this._options.tokenOptions!.ago);
|
return this._padOrTruncate(ago, this._options.tokenOptions!.ago);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,21 +29,28 @@ export class CommitFormatter extends Formatter<GitCommit, ICommitFormatOptions>
|
|||||||
}
|
}
|
||||||
|
|
||||||
get authorAgo() {
|
get authorAgo() {
|
||||||
const authorAgo = `${this._item.author}, ${moment(this._item.date).fromNow()}`;
|
const authorAgo = `${this._item.author}, ${this._item.fromNow()}`;
|
||||||
return this._padOrTruncate(authorAgo, this._options.tokenOptions!.authorAgo);
|
return this._padOrTruncate(authorAgo, this._options.tokenOptions!.authorAgo);
|
||||||
}
|
}
|
||||||
|
|
||||||
get date() {
|
get date() {
|
||||||
const date = moment(this._item.date).format(this._options.dateFormat!);
|
const date = this._item.formatDate(this._options.dateFormat!);
|
||||||
return this._padOrTruncate(date, this._options.tokenOptions!.date);
|
return this._padOrTruncate(date, this._options.tokenOptions!.date);
|
||||||
}
|
}
|
||||||
|
|
||||||
get id() {
|
get id() {
|
||||||
return this._item.shortSha;
|
return this._item.isUncommitted ? 'index' : this._item.shortSha;
|
||||||
}
|
}
|
||||||
|
|
||||||
get message() {
|
get message() {
|
||||||
const message = this._item.isUncommitted ? 'Uncommitted change' : this._item.message;
|
let message = this._item.isUncommitted ? 'Uncommitted change' : this._item.message;
|
||||||
|
if (this._options.truncateMessageAtNewLine) {
|
||||||
|
const index = message.indexOf('\n');
|
||||||
|
if (index !== -1) {
|
||||||
|
message = `${message.substring(0, index)}${GlyphChars.Space}${GlyphChars.Ellipsis}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return this._padOrTruncate(message, this._options.tokenOptions!.message);
|
return this._padOrTruncate(message, this._options.tokenOptions!.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export abstract class Formatter<TItem = any, TOptions extends IFormatOptions = I
|
|||||||
|
|
||||||
let max = options.truncateTo;
|
let max = options.truncateTo;
|
||||||
|
|
||||||
const width = Strings.getWidth(s);
|
const width = Strings.width(s);
|
||||||
if (max === undefined) {
|
if (max === undefined) {
|
||||||
if (this.collapsableWhitespace === 0) return s;
|
if (this.collapsableWhitespace === 0) return s;
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,48 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Strings } from '../../system';
|
import { Strings } from '../../system';
|
||||||
|
import { GlyphChars } from '../../constants';
|
||||||
import { Formatter, IFormatOptions } from './formatter';
|
import { Formatter, IFormatOptions } from './formatter';
|
||||||
import { GitStatusFile, IGitStatusFile } from '../models/status';
|
import { GitStatusFile, IGitStatusFile, IGitStatusFileWithCommit } from '../models/status';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
export interface IStatusFormatOptions extends IFormatOptions {
|
export interface IStatusFormatOptions extends IFormatOptions {
|
||||||
|
relativePath?: string;
|
||||||
|
|
||||||
tokenOptions?: {
|
tokenOptions?: {
|
||||||
|
directory?: Strings.ITokenOptions;
|
||||||
file?: Strings.ITokenOptions;
|
file?: Strings.ITokenOptions;
|
||||||
|
filePath?: Strings.ITokenOptions;
|
||||||
path?: Strings.ITokenOptions;
|
path?: Strings.ITokenOptions;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export class StatusFileFormatter extends Formatter<IGitStatusFile, IStatusFormatOptions> {
|
export class StatusFileFormatter extends Formatter<IGitStatusFile, IStatusFormatOptions> {
|
||||||
|
|
||||||
|
get directory() {
|
||||||
|
const directory = GitStatusFile.getFormattedDirectory(this._item, false, this._options.relativePath);
|
||||||
|
return this._padOrTruncate(directory, this._options.tokenOptions!.file);
|
||||||
|
}
|
||||||
|
|
||||||
get file() {
|
get file() {
|
||||||
const file = path.basename(this._item.fileName);
|
const file = path.basename(this._item.fileName);
|
||||||
return this._padOrTruncate(file, this._options.tokenOptions!.file);
|
return this._padOrTruncate(file, this._options.tokenOptions!.file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get filePath() {
|
||||||
|
const filePath = GitStatusFile.getFormattedPath(this._item, undefined, this._options.relativePath);
|
||||||
|
return this._padOrTruncate(filePath, this._options.tokenOptions!.filePath);
|
||||||
|
}
|
||||||
|
|
||||||
get path() {
|
get path() {
|
||||||
const directory = GitStatusFile.getFormattedDirectory(this._item, false);
|
const directory = GitStatusFile.getRelativePath(this._item, this._options.relativePath);
|
||||||
return this._padOrTruncate(directory, this._options.tokenOptions!.file);
|
return this._padOrTruncate(directory, this._options.tokenOptions!.file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get working() {
|
||||||
|
const commit = (this._item as IGitStatusFileWithCommit).commit;
|
||||||
|
return (commit !== undefined && commit.isUncommitted) ? `${GlyphChars.Pensil} ${GlyphChars.Space}` : '';
|
||||||
|
}
|
||||||
|
|
||||||
static fromTemplate(template: string, status: IGitStatusFile, dateFormat: string | null): string;
|
static fromTemplate(template: string, status: IGitStatusFile, dateFormat: string | null): string;
|
||||||
static fromTemplate(template: string, status: IGitStatusFile, options?: IStatusFormatOptions): string;
|
static fromTemplate(template: string, status: IGitStatusFile, options?: IStatusFormatOptions): string;
|
||||||
static fromTemplate(template: string, status: IGitStatusFile, dateFormatOrOptions?: string | null | IStatusFormatOptions): string;
|
static fromTemplate(template: string, status: IGitStatusFile, dateFormatOrOptions?: string | null | IStatusFormatOptions): string;
|
||||||
|
|||||||
190
src/git/git.ts
@@ -1,4 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
import { Strings } from '../system';
|
||||||
import { findGitPath, IGit } from './gitLocator';
|
import { findGitPath, IGit } from './gitLocator';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
import { spawnPromise } from 'spawn-rx';
|
import { spawnPromise } from 'spawn-rx';
|
||||||
@@ -10,17 +11,19 @@ import * as iconv from 'iconv-lite';
|
|||||||
export { IGit };
|
export { IGit };
|
||||||
export * from './models/models';
|
export * from './models/models';
|
||||||
export * from './parsers/blameParser';
|
export * from './parsers/blameParser';
|
||||||
|
export * from './parsers/branchParser';
|
||||||
export * from './parsers/diffParser';
|
export * from './parsers/diffParser';
|
||||||
export * from './parsers/logParser';
|
export * from './parsers/logParser';
|
||||||
|
export * from './parsers/remoteParser';
|
||||||
export * from './parsers/stashParser';
|
export * from './parsers/stashParser';
|
||||||
export * from './parsers/statusParser';
|
export * from './parsers/statusParser';
|
||||||
export * from './remotes/provider';
|
export * from './remotes/provider';
|
||||||
|
|
||||||
let git: IGit;
|
let git: IGit;
|
||||||
|
|
||||||
// `--format=%H -%nauthor %an%nauthor-date %ai%ncommitter %cn%ncommitter-date %ci%nparents %P%nsummary %B%nfilename ?`
|
const defaultBlameParams = [`blame`, `--root`, `--incremental`];
|
||||||
const defaultLogParams = [`log`, `--name-status`, `--full-history`, `-M`, `--date=iso8601`, `--format=%H -%nauthor %an%nauthor-date %ai%nparents %P%nsummary %B%nfilename ?`];
|
const defaultLogParams = [`log`, `--name-status`, `--full-history`, `-M`, `--format=%H -%nauthor %an%nauthor-date %at%nparents %P%nsummary %B%nfilename ?`];
|
||||||
const defaultStashParams = [`stash`, `list`, `--name-status`, `--full-history`, `-M`, `--format=%H -%nauthor-date %ai%nreflog-selector %gd%nsummary %B%nfilename ?`];
|
const defaultStashParams = [`stash`, `list`, `--name-status`, `--full-history`, `-M`, `--format=%H -%nauthor-date %at%nreflog-selector %gd%nsummary %B%nfilename ?`];
|
||||||
|
|
||||||
let defaultEncoding = 'utf8';
|
let defaultEncoding = 'utf8';
|
||||||
export function setDefaultEncoding(encoding: string) {
|
export function setDefaultEncoding(encoding: string) {
|
||||||
@@ -31,36 +34,55 @@ const GitWarnings = [
|
|||||||
/Not a git repository/,
|
/Not a git repository/,
|
||||||
/is outside repository/,
|
/is outside repository/,
|
||||||
/no such path/,
|
/no such path/,
|
||||||
/does not have any commits/
|
/does not have any commits/,
|
||||||
|
/Path \'.*?\' does not exist in/,
|
||||||
|
/Path \'.*?\' exists on disk, but not in/,
|
||||||
|
/no upstream configured for branch/
|
||||||
];
|
];
|
||||||
|
|
||||||
async function gitCommand(options: { cwd: string, encoding?: string }, ...args: any[]) {
|
interface GitCommandOptions {
|
||||||
|
cwd: string;
|
||||||
|
encoding?: string;
|
||||||
|
overrideErrorHandling?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function gitCommand(options: GitCommandOptions, ...args: any[]): Promise<string> {
|
||||||
|
if (options.overrideErrorHandling) return gitCommandCore(options, ...args);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Fixes https://github.com/eamodio/vscode-gitlens/issues/73
|
return await gitCommandCore(options, ...args);
|
||||||
// See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
|
|
||||||
args.splice(0, 0, '-c', 'core.quotepath=false');
|
|
||||||
|
|
||||||
const opts = { encoding: 'utf8', ...options };
|
|
||||||
const s = await spawnPromise(git.path, args, { cwd: options.cwd, encoding: (opts.encoding === 'utf8') ? 'utf8' : 'binary' });
|
|
||||||
Logger.log('git', ...args, ` cwd='${options.cwd}'`);
|
|
||||||
if (opts.encoding === 'utf8' || opts.encoding === 'binary') return s;
|
|
||||||
|
|
||||||
return iconv.decode(Buffer.from(s, 'binary'), opts.encoding);
|
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
const msg = ex && ex.toString();
|
return gitCommandDefaultErrorHandler(ex, options, ...args);
|
||||||
if (msg) {
|
}
|
||||||
for (const warning of GitWarnings) {
|
}
|
||||||
if (warning.test(msg)) {
|
|
||||||
Logger.warn('git', ...args, ` cwd='${options.cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
|
async function gitCommandCore(options: GitCommandOptions, ...args: any[]): Promise<string> {
|
||||||
return '';
|
// Fixes https://github.com/eamodio/vscode-gitlens/issues/73
|
||||||
}
|
// See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
|
||||||
|
args.splice(0, 0, '-c', 'core.quotepath=false');
|
||||||
|
|
||||||
|
const opts = { encoding: 'utf8', ...options };
|
||||||
|
const s = await spawnPromise(git.path, args, { cwd: options.cwd, encoding: (opts.encoding === 'utf8') ? 'utf8' : 'binary' });
|
||||||
|
Logger.log('git', ...args, ` cwd='${options.cwd}'`);
|
||||||
|
if (opts.encoding === 'utf8' || opts.encoding === 'binary') return s;
|
||||||
|
|
||||||
|
return iconv.decode(Buffer.from(s, 'binary'), opts.encoding);
|
||||||
|
}
|
||||||
|
|
||||||
|
function gitCommandDefaultErrorHandler(ex: Error, options: GitCommandOptions, ...args: any[]): string {
|
||||||
|
const msg = ex && ex.toString();
|
||||||
|
if (msg) {
|
||||||
|
for (const warning of GitWarnings) {
|
||||||
|
if (warning.test(msg)) {
|
||||||
|
Logger.warn('git', ...args, ` cwd='${options.cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.error(ex, 'git', ...args, ` cwd='${options.cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
|
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.error(ex, 'git', ...args, ` cwd='${options.cwd}'`, msg && `\n ${msg.replace(/\r?\n|\r/g, ' ')}`);
|
||||||
|
throw ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Git {
|
export class Git {
|
||||||
@@ -89,8 +111,9 @@ export class Git {
|
|||||||
|
|
||||||
static async getVersionedFile(repoPath: string | undefined, fileName: string, branchOrSha: string) {
|
static async getVersionedFile(repoPath: string | undefined, fileName: string, branchOrSha: string) {
|
||||||
const data = await Git.show(repoPath, fileName, branchOrSha, 'binary');
|
const data = await Git.show(repoPath, fileName, branchOrSha, 'binary');
|
||||||
|
if (data === undefined) return undefined;
|
||||||
|
|
||||||
const suffix = Git.isSha(branchOrSha) ? branchOrSha.substring(0, 8) : branchOrSha;
|
const suffix = Strings.truncate(Strings.sanitizeForFS(Git.isSha(branchOrSha) ? Git.shortenSha(branchOrSha) : branchOrSha), 50, '');
|
||||||
const ext = path.extname(fileName);
|
const ext = path.extname(fileName);
|
||||||
return new Promise<string>((resolve, reject) => {
|
return new Promise<string>((resolve, reject) => {
|
||||||
tmp.file({ prefix: `${path.basename(fileName, ext)}-${suffix}__`, postfix: ext },
|
tmp.file({ prefix: `${path.basename(fileName, ext)}-${suffix}__`, postfix: ext },
|
||||||
@@ -125,6 +148,10 @@ export class Git {
|
|||||||
return fileName && fileName.replace(/\\/g, '/');
|
return fileName && fileName.replace(/\\/g, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static shortenSha(sha: string) {
|
||||||
|
return sha.substring(0, 8);
|
||||||
|
}
|
||||||
|
|
||||||
static splitPath(fileName: string, repoPath: string | undefined, extract: boolean = true): [string, string] {
|
static splitPath(fileName: string, repoPath: string | undefined, extract: boolean = true): [string, string] {
|
||||||
if (repoPath) {
|
if (repoPath) {
|
||||||
fileName = this.normalizePath(fileName);
|
fileName = this.normalizePath(fileName);
|
||||||
@@ -150,15 +177,17 @@ export class Git {
|
|||||||
|
|
||||||
// Git commands
|
// Git commands
|
||||||
|
|
||||||
static blame(repoPath: string | undefined, fileName: string, sha?: string, startLine?: number, endLine?: number) {
|
static blame(repoPath: string | undefined, fileName: string, sha?: string, options: { ignoreWhitespace?: boolean, startLine?: number, endLine?: number } = {}) {
|
||||||
const [file, root] = Git.splitPath(fileName, repoPath);
|
const [file, root] = Git.splitPath(fileName, repoPath);
|
||||||
|
|
||||||
const params = [`blame`, `--root`, `--incremental`];
|
const params = [...defaultBlameParams];
|
||||||
|
|
||||||
if (startLine != null && endLine != null) {
|
if (options.ignoreWhitespace) {
|
||||||
params.push(`-L ${startLine},${endLine}`);
|
params.push('-w');
|
||||||
|
}
|
||||||
|
if (options.startLine != null && options.endLine != null) {
|
||||||
|
params.push(`-L ${options.startLine},${options.endLine}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sha) {
|
if (sha) {
|
||||||
params.push(sha);
|
params.push(sha);
|
||||||
}
|
}
|
||||||
@@ -166,20 +195,42 @@ export class Git {
|
|||||||
return gitCommand({ cwd: root }, ...params, `--`, file);
|
return gitCommand({ cwd: root }, ...params, `--`, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static branch(repoPath: string, all: boolean) {
|
static branch(repoPath: string, options: { all: boolean } = { all: false }) {
|
||||||
const params = [`branch`];
|
const params = [`branch`, `-vv`];
|
||||||
if (all) {
|
if (options.all) {
|
||||||
params.push(`-a`);
|
params.push(`-a`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return gitCommand({ cwd: repoPath }, ...params);
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
}
|
}
|
||||||
|
|
||||||
static async config_get(key: string, repoPath?: string) {
|
static async branch_current(repoPath: string) {
|
||||||
|
const params = [`rev-parse`, `--abbrev-ref`, `--symbolic-full-name`, `@`, `@{u}`];
|
||||||
|
|
||||||
|
const opts = { cwd: repoPath, overrideErrorHandling: true };
|
||||||
try {
|
try {
|
||||||
return await gitCommand({ cwd: repoPath || '' }, `config`, `--get`, key);
|
return await gitCommand(opts, ...params);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
if (/no upstream configured for branch/.test(ex && ex.toString())) {
|
||||||
|
return ex.message.split('\n')[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return gitCommandDefaultErrorHandler(ex, opts, ...params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static checkout(repoPath: string, fileName: string, sha: string) {
|
||||||
|
const [file, root] = Git.splitPath(fileName, repoPath);
|
||||||
|
|
||||||
|
return gitCommand({ cwd: root }, `checkout`, sha, `--`, file);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async config_get(key: string, repoPath?: string) {
|
||||||
|
try {
|
||||||
|
return await gitCommand({ cwd: repoPath || '', overrideErrorHandling: true }, `config`, `--get`, key);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,6 +259,14 @@ export class Git {
|
|||||||
return gitCommand({ cwd: repoPath }, ...params);
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static diff_shortstat(repoPath: string, sha?: string) {
|
||||||
|
const params = [`diff`, `--shortstat`, `--no-ext-diff`];
|
||||||
|
if (sha) {
|
||||||
|
params.push(sha);
|
||||||
|
}
|
||||||
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
|
}
|
||||||
|
|
||||||
static difftool_dirDiff(repoPath: string, sha1: string, sha2?: string) {
|
static difftool_dirDiff(repoPath: string, sha1: string, sha2?: string) {
|
||||||
const params = [`difftool`, `--dir-diff`, sha1];
|
const params = [`difftool`, `--dir-diff`, sha1];
|
||||||
if (sha2) {
|
if (sha2) {
|
||||||
@@ -217,6 +276,17 @@ export class Git {
|
|||||||
return gitCommand({ cwd: repoPath }, ...params);
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static difftool_fileDiff(repoPath: string, fileName: string, staged: boolean) {
|
||||||
|
const params = [`difftool`, `--no-prompt`];
|
||||||
|
if (staged) {
|
||||||
|
params.push('--staged');
|
||||||
|
}
|
||||||
|
params.push('--');
|
||||||
|
params.push(fileName);
|
||||||
|
|
||||||
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
|
}
|
||||||
|
|
||||||
static log(repoPath: string, sha?: string, maxCount?: number, reverse: boolean = false) {
|
static log(repoPath: string, sha?: string, maxCount?: number, reverse: boolean = false) {
|
||||||
const params = [...defaultLogParams, `-m`];
|
const params = [...defaultLogParams, `-m`];
|
||||||
if (maxCount && !reverse) {
|
if (maxCount && !reverse) {
|
||||||
@@ -281,11 +351,19 @@ export class Git {
|
|||||||
return gitCommand({ cwd: repoPath }, ...params, ...search);
|
return gitCommand({ cwd: repoPath }, ...params, ...search);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static log_shortstat(repoPath: string, sha?: string) {
|
||||||
|
const params = [`log`, `--shortstat`, `--oneline`];
|
||||||
|
if (sha) {
|
||||||
|
params.push(sha);
|
||||||
|
}
|
||||||
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
|
}
|
||||||
|
|
||||||
static async ls_files(repoPath: string, fileName: string): Promise<string> {
|
static async ls_files(repoPath: string, fileName: string): Promise<string> {
|
||||||
try {
|
try {
|
||||||
return await gitCommand({ cwd: repoPath }, 'ls-files', fileName);
|
return await gitCommand({ cwd: repoPath, overrideErrorHandling: true }, 'ls-files', fileName);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,12 +376,25 @@ export class Git {
|
|||||||
return gitCommand({ cwd: repoPath }, 'remote', 'get-url', remote);
|
return gitCommand({ cwd: repoPath }, 'remote', 'get-url', remote);
|
||||||
}
|
}
|
||||||
|
|
||||||
static show(repoPath: string | undefined, fileName: string, branchOrSha: string, encoding?: string) {
|
static async show(repoPath: string | undefined, fileName: string, branchOrSha: string, encoding?: string) {
|
||||||
const [file, root] = Git.splitPath(fileName, repoPath);
|
const [file, root] = Git.splitPath(fileName, repoPath);
|
||||||
branchOrSha = branchOrSha.replace('^', '');
|
branchOrSha = branchOrSha.replace('^', '');
|
||||||
|
|
||||||
if (Git.isUncommitted(branchOrSha)) return Promise.reject(new Error(`sha=${branchOrSha} is uncommitted`));
|
if (Git.isUncommitted(branchOrSha)) throw new Error(`sha=${branchOrSha} is uncommitted`);
|
||||||
return gitCommand({ cwd: root, encoding: encoding || defaultEncoding }, 'show', `${branchOrSha}:./${file}`);
|
|
||||||
|
const opts = { cwd: root, encoding: encoding || defaultEncoding, overrideErrorHandling: true };
|
||||||
|
const args = `${branchOrSha}:./${file}`;
|
||||||
|
try {
|
||||||
|
return await gitCommand(opts, 'show', args);
|
||||||
|
}
|
||||||
|
catch (ex) {
|
||||||
|
const msg = ex && ex.toString();
|
||||||
|
if (/Path \'.*?\' does not exist in/.test(msg) || /Path \'.*?\' exists on disk, but not in /.test(msg)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return gitCommandDefaultErrorHandler(ex, opts, args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static stash_apply(repoPath: string, stashName: string, deleteAfter: boolean) {
|
static stash_apply(repoPath: string, stashName: string, deleteAfter: boolean) {
|
||||||
@@ -320,11 +411,18 @@ export class Git {
|
|||||||
return gitCommand({ cwd: repoPath }, ...defaultStashParams);
|
return gitCommand({ cwd: repoPath }, ...defaultStashParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
static stash_save(repoPath: string, message?: string, unstagedOnly: boolean = false) {
|
static stash_push(repoPath: string, pathspecs: string[], message?: string) {
|
||||||
const params = [`stash`, `save`, `--include-untracked`];
|
const params = [`stash`, `push`, `-u`];
|
||||||
if (unstagedOnly) {
|
if (message) {
|
||||||
params.push(`--keep-index`);
|
params.push(`-m`);
|
||||||
|
params.push(message);
|
||||||
}
|
}
|
||||||
|
params.splice(params.length, 0, `--`, ...pathspecs);
|
||||||
|
return gitCommand({ cwd: repoPath }, ...params);
|
||||||
|
}
|
||||||
|
|
||||||
|
static stash_save(repoPath: string, message?: string) {
|
||||||
|
const params = [`stash`, `save`, `-u`];
|
||||||
if (message) {
|
if (message) {
|
||||||
params.push(message);
|
params.push(message);
|
||||||
}
|
}
|
||||||
@@ -333,7 +431,7 @@ export class Git {
|
|||||||
|
|
||||||
static status(repoPath: string, porcelainVersion: number = 1): Promise<string> {
|
static status(repoPath: string, porcelainVersion: number = 1): Promise<string> {
|
||||||
const porcelain = porcelainVersion >= 2 ? `--porcelain=v${porcelainVersion}` : '--porcelain';
|
const porcelain = porcelainVersion >= 2 ? `--porcelain=v${porcelainVersion}` : '--porcelain';
|
||||||
return gitCommand({ cwd: repoPath }, 'status', porcelain, '--branch');
|
return gitCommand({ cwd: repoPath }, 'status', porcelain, '--branch', '-u');
|
||||||
}
|
}
|
||||||
|
|
||||||
static status_file(repoPath: string, fileName: string, porcelainVersion: number = 1): Promise<string> {
|
static status_file(repoPath: string, fileName: string, porcelainVersion: number = 1): Promise<string> {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { Disposable, Event, EventEmitter, TextDocument, TextDocumentChangeEvent, TextEditor, window, workspace } from 'vscode';
|
import { Disposable, Event, EventEmitter, TextDocument, TextDocumentChangeEvent, TextEditor, window, workspace } from 'vscode';
|
||||||
import { TextDocumentComparer } from '../comparers';
|
import { TextDocumentComparer } from '../comparers';
|
||||||
import { CommandContext, setCommandContext } from '../constants';
|
import { CommandContext, setCommandContext } from '../constants';
|
||||||
import { GitService, GitUri } from '../gitService';
|
import { GitService, GitUri, RepoChangedReasons } from '../gitService';
|
||||||
import { Logger } from '../logger';
|
import { Logger } from '../logger';
|
||||||
|
|
||||||
export interface BlameabilityChangeEvent {
|
export interface BlameabilityChangeEvent {
|
||||||
@@ -32,13 +32,13 @@ export class GitContextTracker extends Disposable {
|
|||||||
subscriptions.push(workspace.onDidChangeConfiguration(this._onConfigurationChanged, this));
|
subscriptions.push(workspace.onDidChangeConfiguration(this._onConfigurationChanged, this));
|
||||||
subscriptions.push(workspace.onDidSaveTextDocument(this._onTextDocumentSaved, this));
|
subscriptions.push(workspace.onDidSaveTextDocument(this._onTextDocumentSaved, this));
|
||||||
subscriptions.push(this.git.onDidBlameFail(this._onBlameFailed, this));
|
subscriptions.push(this.git.onDidBlameFail(this._onBlameFailed, this));
|
||||||
|
subscriptions.push(this.git.onDidChangeRepo(this._onRepoChanged, this));
|
||||||
|
|
||||||
this._disposable = Disposable.from(...subscriptions);
|
this._disposable = Disposable.from(...subscriptions);
|
||||||
|
|
||||||
setCommandContext(CommandContext.IsRepository, !!this.git.repoPath);
|
setCommandContext(CommandContext.IsRepository, !!this.git.repoPath);
|
||||||
|
|
||||||
this._onConfigurationChanged();
|
this._onConfigurationChanged();
|
||||||
this._onActiveTextEditorChanged(window.activeTextEditor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose() {
|
dispose() {
|
||||||
@@ -55,6 +55,13 @@ export class GitContextTracker extends Disposable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async _onRepoChanged(reasons: RepoChangedReasons[]) {
|
||||||
|
if (!reasons.includes(RepoChangedReasons.Remotes)) return;
|
||||||
|
|
||||||
|
const gitUri = this._editor === undefined ? undefined : await GitUri.fromUri(this._editor.document.uri, this.git);
|
||||||
|
this._updateContextHasRemotes(gitUri);
|
||||||
|
}
|
||||||
|
|
||||||
private _onActiveTextEditorChanged(editor: TextEditor | undefined) {
|
private _onActiveTextEditorChanged(editor: TextEditor | undefined) {
|
||||||
this._editor = editor;
|
this._editor = editor;
|
||||||
this._updateContext(this._gitEnabled ? editor : undefined);
|
this._updateContext(this._gitEnabled ? editor : undefined);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export class GitUri extends Uri {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const commit = commitOrRepoPath;
|
const commit = commitOrRepoPath;
|
||||||
base._fsPath = path.resolve(commit.repoPath, commit.originalFileName || commit.fileName);
|
base._fsPath = path.resolve(commit.repoPath, commit.originalFileName || commit.fileName || '');
|
||||||
|
|
||||||
if (commit.repoPath !== undefined) {
|
if (commit.repoPath !== undefined) {
|
||||||
this.repoPath = commit.repoPath;
|
this.repoPath = commit.repoPath;
|
||||||
@@ -56,18 +56,21 @@ export class GitUri extends Uri {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get shortSha() {
|
get shortSha() {
|
||||||
return this.sha && this.sha.substring(0, 8);
|
return this.sha && GitService.shortenSha(this.sha);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileUri() {
|
fileUri() {
|
||||||
return Uri.file(this.sha ? this.path : this.fsPath);
|
return Uri.file(this.sha ? this.path : this.fsPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFormattedPath(separator: string = Strings.pad(GlyphChars.Dot, 2, 2)): string {
|
getFormattedPath(separator: string = Strings.pad(GlyphChars.Dot, 2, 2), relativeTo?: string): string {
|
||||||
let directory = path.dirname(this.fsPath);
|
let directory = path.dirname(this.fsPath);
|
||||||
if (this.repoPath) {
|
if (this.repoPath) {
|
||||||
directory = path.relative(this.repoPath, directory);
|
directory = path.relative(this.repoPath, directory);
|
||||||
}
|
}
|
||||||
|
if (relativeTo !== undefined) {
|
||||||
|
directory = path.relative(relativeTo, directory);
|
||||||
|
}
|
||||||
directory = GitService.normalizePath(directory);
|
directory = GitService.normalizePath(directory);
|
||||||
|
|
||||||
return (!directory || directory === '.')
|
return (!directory || directory === '.')
|
||||||
@@ -75,8 +78,12 @@ export class GitUri extends Uri {
|
|||||||
: `${path.basename(this.fsPath)}${separator}${directory}`;
|
: `${path.basename(this.fsPath)}${separator}${directory}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
getRelativePath(): string {
|
getRelativePath(relativeTo?: string): string {
|
||||||
return GitService.normalizePath(path.relative(this.repoPath || '', this.fsPath));
|
let relativePath = path.relative(this.repoPath || '', this.fsPath);
|
||||||
|
if (relativeTo !== undefined) {
|
||||||
|
relativePath = path.relative(relativeTo, relativePath);
|
||||||
|
}
|
||||||
|
return GitService.normalizePath(relativePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static async fromUri(uri: Uri, git: GitService) {
|
static async fromUri(uri: Uri, git: GitService) {
|
||||||
@@ -104,15 +111,19 @@ export class GitUri extends Uri {
|
|||||||
return new GitUri(uri, repoPathOrCommit);
|
return new GitUri(uri, repoPathOrCommit);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getDirectory(fileName: string): string {
|
static getDirectory(fileName: string, relativeTo?: string): string {
|
||||||
const directory: string | undefined = GitService.normalizePath(path.dirname(fileName));
|
let directory: string | undefined = path.dirname(fileName);
|
||||||
|
if (relativeTo !== undefined) {
|
||||||
|
directory = path.relative(relativeTo, directory);
|
||||||
|
}
|
||||||
|
directory = GitService.normalizePath(directory);
|
||||||
return (!directory || directory === '.') ? '' : directory;
|
return (!directory || directory === '.') ? '' : directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getFormattedPath(fileNameOrUri: string | Uri, separator: string = Strings.pad(GlyphChars.Dot, 2, 2)): string {
|
static getFormattedPath(fileNameOrUri: string | Uri, separator: string = Strings.pad(GlyphChars.Dot, 2, 2), relativeTo?: string): string {
|
||||||
let fileName: string;
|
let fileName: string;
|
||||||
if (fileNameOrUri instanceof Uri) {
|
if (fileNameOrUri instanceof Uri) {
|
||||||
if (fileNameOrUri instanceof GitUri) return fileNameOrUri.getFormattedPath(separator);
|
if (fileNameOrUri instanceof GitUri) return fileNameOrUri.getFormattedPath(separator, relativeTo);
|
||||||
|
|
||||||
fileName = fileNameOrUri.fsPath;
|
fileName = fileNameOrUri.fsPath;
|
||||||
}
|
}
|
||||||
@@ -120,11 +131,29 @@ export class GitUri extends Uri {
|
|||||||
fileName = fileNameOrUri;
|
fileName = fileNameOrUri;
|
||||||
}
|
}
|
||||||
|
|
||||||
const directory = GitUri.getDirectory(fileName);
|
const directory = GitUri.getDirectory(fileName, relativeTo);
|
||||||
return !directory
|
return !directory
|
||||||
? path.basename(fileName)
|
? path.basename(fileName)
|
||||||
: `${path.basename(fileName)}${separator}${directory}`;
|
: `${path.basename(fileName)}${separator}${directory}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getRelativePath(fileNameOrUri: string | Uri, relativeTo?: string, repoPath?: string): string {
|
||||||
|
let fileName: string;
|
||||||
|
if (fileNameOrUri instanceof Uri) {
|
||||||
|
if (fileNameOrUri instanceof GitUri) return fileNameOrUri.getRelativePath(relativeTo);
|
||||||
|
|
||||||
|
fileName = fileNameOrUri.fsPath;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fileName = fileNameOrUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
let relativePath = path.relative(repoPath || '', fileName);
|
||||||
|
if (relativeTo !== undefined) {
|
||||||
|
relativePath = path.relative(relativeTo, relativePath);
|
||||||
|
}
|
||||||
|
return GitService.normalizePath(relativePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IGitCommitInfo {
|
export interface IGitCommitInfo {
|
||||||
|
|||||||
@@ -5,25 +5,32 @@ export class GitBranch {
|
|||||||
current: boolean;
|
current: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
remote: boolean;
|
remote: boolean;
|
||||||
|
tracking?: string;
|
||||||
|
|
||||||
constructor(branch: string) {
|
constructor(public readonly repoPath: string, branch: string, current: boolean = false, tracking?: string) {
|
||||||
branch = branch.trim();
|
|
||||||
|
|
||||||
if (branch.startsWith('* ')) {
|
|
||||||
branch = branch.substring(2);
|
|
||||||
this.current = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (branch.startsWith('remotes/')) {
|
if (branch.startsWith('remotes/')) {
|
||||||
branch = branch.substring(8);
|
branch = branch.substring(8);
|
||||||
this.remote = true;
|
this.remote = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const index = branch.indexOf(' ');
|
this.current = current;
|
||||||
if (index !== -1) {
|
|
||||||
branch = branch.substring(0, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.name = branch;
|
this.name = branch;
|
||||||
|
this.tracking = tracking;
|
||||||
|
}
|
||||||
|
|
||||||
|
getName(): string {
|
||||||
|
return this.remote
|
||||||
|
? this.name.substring(this.name.indexOf('/') + 1)
|
||||||
|
: this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
getRemote(): string | undefined {
|
||||||
|
if (this.remote) return GitBranch.getRemote(this.name);
|
||||||
|
if (this.tracking !== undefined) return GitBranch.getRemote(this.tracking);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getRemote(branch: string): string {
|
||||||
|
return branch.substring(0, branch.indexOf('/'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
import { Strings } from '../../system';
|
import { Dates, Strings } from '../../system';
|
||||||
import { Uri } from 'vscode';
|
import { Uri } from 'vscode';
|
||||||
import { GlyphChars } from '../../constants';
|
import { GlyphChars } from '../../constants';
|
||||||
import { Git } from '../git';
|
import { Git } from '../git';
|
||||||
@@ -51,7 +51,7 @@ export class GitCommit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get shortSha() {
|
get shortSha() {
|
||||||
return this.sha.substring(0, 8);
|
return Git.shortenSha(this.sha);
|
||||||
}
|
}
|
||||||
|
|
||||||
get isUncommitted(): boolean {
|
get isUncommitted(): boolean {
|
||||||
@@ -62,7 +62,7 @@ export class GitCommit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get previousShortSha() {
|
get previousShortSha() {
|
||||||
return this.previousSha && this.previousSha.substring(0, 8);
|
return this.previousSha && Git.shortenSha(this.previousSha);
|
||||||
}
|
}
|
||||||
|
|
||||||
get previousUri(): Uri {
|
get previousUri(): Uri {
|
||||||
@@ -70,7 +70,23 @@ export class GitCommit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get uri(): Uri {
|
get uri(): Uri {
|
||||||
return Uri.file(path.resolve(this.repoPath, this.originalFileName || this.fileName));
|
return Uri.file(path.resolve(this.repoPath, this.originalFileName || this.fileName || ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
private _dateFormatter?: Dates.IDateFormatter;
|
||||||
|
|
||||||
|
formatDate(format: string) {
|
||||||
|
if (this._dateFormatter === undefined) {
|
||||||
|
this._dateFormatter = Dates.toFormatter(this.date);
|
||||||
|
}
|
||||||
|
return this._dateFormatter.format(format);
|
||||||
|
}
|
||||||
|
|
||||||
|
fromNow() {
|
||||||
|
if (this._dateFormatter === undefined) {
|
||||||
|
this._dateFormatter = Dates.toFormatter(this.date);
|
||||||
|
}
|
||||||
|
return this._dateFormatter.fromNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
getFormattedPath(separator: string = Strings.pad(GlyphChars.Dot, 2, 2)): string {
|
getFormattedPath(separator: string = Strings.pad(GlyphChars.Dot, 2, 2)): string {
|
||||||
|
|||||||