Skip to content

Commit 28c0571

Browse files
committed
Merge branch 'develop'
2 parents 60c1fae + 67b1f39 commit 28c0571

36 files changed

+3291
-2427
lines changed

.eslintrc.json

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,51 @@
99
"@typescript-eslint"
1010
],
1111
"rules": {
12+
"brace-style": [
13+
"error",
14+
"1tbs",
15+
{
16+
"allowSingleLine": true
17+
}
18+
],
19+
"comma-dangle": "error",
20+
"comma-spacing": "error",
21+
"comma-style": "error",
22+
"dot-location": [
23+
"error",
24+
"property"
25+
],
26+
"eol-last": "error",
1227
"eqeqeq": "error",
28+
"func-call-spacing": "error",
1329
"indent": [
1430
"error",
1531
"tab",
1632
{
1733
"SwitchCase": 1
1834
}
1935
],
36+
"key-spacing": "error",
2037
"linebreak-style": [
2138
"error",
2239
"windows"
2340
],
41+
"new-cap": "error",
42+
"new-parens": "error",
2443
"no-console": "warn",
44+
"no-eval": "error",
45+
"no-labels": "error",
46+
"no-multi-spaces": "error",
2547
"no-redeclare": "error",
2648
"no-shadow-restricted-names": "error",
2749
"no-throw-literal": "error",
2850
"no-unused-expressions": "error",
51+
"no-whitespace-before-property": "error",
2952
"quotes": [
3053
"error",
3154
"single"
3255
],
56+
"rest-spread-spacing": "error",
3357
"semi": "error",
3458
"sort-imports": [
3559
"error",
@@ -38,6 +62,23 @@
3862
"ignoreDeclarationSort": true
3963
}
4064
],
65+
"space-before-function-paren": [
66+
"error",
67+
{
68+
"anonymous": "always",
69+
"named": "never",
70+
"asyncArrow": "always"
71+
}
72+
],
73+
"space-before-blocks": "error",
74+
"space-infix-ops": "error",
75+
"spaced-comment": "error",
76+
"template-curly-spacing": "error",
77+
"wrap-iife": [
78+
"error",
79+
"inside"
80+
],
81+
"yoda": "error",
4182
"@typescript-eslint/explicit-member-accessibility": [
4283
"error",
4384
{
@@ -65,9 +106,10 @@
65106
},
66107
"overrides": [
67108
{
68-
"files": "./src/askpass/askpassMain.ts",
109+
"files": "./src/askpass/*.ts",
69110
"rules": {
70-
"no-console": "off"
111+
"no-console": "off",
112+
"spaced-comment": "off"
71113
}
72114
}
73115
]

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## 1.29.0 - 2021-02-28
4+
* #390 When creating a branch or adding a tag, the name is now checked against all existing branches and tags in the repository. If a branch / tag already exists with the same name, a new dialog is displayed that allows you to: replace the existing branch / tag, or to choose another name.
5+
* #402 New mode for the Find Widget, which will additionally open the Commit Details View as you navigate through each of the matched commits. This mode is enabled / disabled via a new button on the Find Widget.
6+
* #404 New context menu on all link elements (e.g. Issue Links, URL's in commit messages, author email addresses), enabling the URL to be copied to the clipboard.
7+
* #417 New context menu actions for branches, to select / unselect the branch in the Branches Dropdown.
8+
* #424 Consume Git configuration variables (`remote.pushDefault`, `branch.<name>.remote` & `branch.<name>.pushRemote`) to set the default remote to push branches and tags to (when multiple remotes are configured for a repository).
9+
* #426 If a diff tool is configured in Git (`diff.tool` or `diff.guitool`), you can now open a directory diff in the configured tool from the Commit Details View Control Bar. Note: `diff.tool` is opened via a Visual Studio Code Terminal, whereas `diff.guitool` is opened via a background process.
10+
* #427 When deleting a branch that is not fully merged, and "Force Delete" is not set on the "Delete Branch" dialog, a new dialog is subsequently shown to allow one-click force deletion, instead of displaying the error message returned by Git.
11+
* #429 Stashes can be hidden on the Git Graph View by disabling the new extension setting `git-graph.repository.showStashes`. It can be overridden per repository in the Git Graph View's Repository Settings Widget.
12+
* #452 Explicitly override the Git configuration variable `log.showSignature` to ensure consistent parsing of commits.
13+
* Significant code and UI improvements.
14+
315
## 1.28.0 - 2020-12-01
416
* #399 Sign Commits and Tags created by actions in the Git Graph View, by enabling the new extension settings `git-graph.repository.sign.commits` and `git-graph.repository.sign.tags` respectively. This is an alternative to the existing method using Git config (`commit.gpgSign` and `tag.gpgSign`).
517
* #406 The keybindings for all Git Graph View keyboard shortcuts can now be configured using new extension settings `git-graph.keyboardShortcut.*`.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ A summary of the Git Graph extension settings are:
125125
* **Show Commits Only Referenced By Tags**: Show Commits that are only referenced by tags in Git Graph.
126126
* **Show Remote Branches**: Show Remote Branches in Git Graph by default.
127127
* **Show Remote Heads**: Show Remote HEAD Symbolic References in Git Graph.
128+
* **Show Stashes**: Show Stashes in Git Graph by default.
128129
* **Show Tags**: Show Tags in Git Graph by default.
129130
* **Show Uncommitted Changes**: Show uncommitted changes. If you work on large repositories, disabling this setting can reduce the load time of the Git Graph View.
130131
* **Show Untracked Files**: Show untracked files when viewing the uncommitted changes. If you work on large repositories, disabling this setting can reduce the load time of the Git Graph View.

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
moduleFileExtensions: ['ts', 'js'],
88
globals: {
99
'ts-jest': {
10-
tsConfig: './tests/tsconfig.json'
10+
tsconfig: './tests/tsconfig.json'
1111
}
1212
},
1313
collectCoverageFrom: [

package.json

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "git-graph",
33
"displayName": "Git Graph",
4-
"version": "1.28.0",
4+
"version": "1.29.0",
55
"publisher": "mhutchie",
66
"author": {
77
"name": "Michael Hutchison",
@@ -170,6 +170,14 @@
170170
"type": "boolean",
171171
"title": "Create Archive"
172172
},
173+
"selectInBranchesDropdown": {
174+
"type": "boolean",
175+
"title": "Select in Branches Dropdown"
176+
},
177+
"unselectInBranchesDropdown": {
178+
"type": "boolean",
179+
"title": "Unselect in Branches Dropdown"
180+
},
173181
"copyName": {
174182
"type": "boolean",
175183
"title": "Copy Branch Name to Clipboard"
@@ -256,6 +264,14 @@
256264
"type": "boolean",
257265
"title": "Create Archive"
258266
},
267+
"selectInBranchesDropdown": {
268+
"type": "boolean",
269+
"title": "Select in Branches Dropdown"
270+
},
271+
"unselectInBranchesDropdown": {
272+
"type": "boolean",
273+
"title": "Unselect in Branches Dropdown"
274+
},
259275
"copyName": {
260276
"type": "boolean",
261277
"title": "Copy Branch Name to Clipboard"
@@ -986,6 +1002,11 @@
9861002
"default": true,
9871003
"description": "Show Remote HEAD Symbolic References in Git Graph (e.g. \"origin/HEAD\")."
9881004
},
1005+
"git-graph.repository.showStashes": {
1006+
"type": "boolean",
1007+
"default": true,
1008+
"description": "Show Stashes in Git Graph by default. This can be overridden per repository in the Git Graph View's Repository Settings Widget."
1009+
},
9891010
"git-graph.repository.showTags": {
9901011
"type": "boolean",
9911012
"default": true,
@@ -1413,14 +1434,14 @@
14131434
"iconv-lite": "0.5.0"
14141435
},
14151436
"devDependencies": {
1416-
"@types/jest": "26.0.14",
1437+
"@types/jest": "26.0.19",
14171438
"@types/node": "8.10.62",
14181439
"@types/vscode": "1.38.0",
1419-
"@typescript-eslint/eslint-plugin": "4.1.0",
1420-
"@typescript-eslint/parser": "4.1.0",
1421-
"eslint": "7.9.0",
1422-
"jest": "26.4.2",
1423-
"ts-jest": "26.3.0",
1440+
"@typescript-eslint/eslint-plugin": "4.10.0",
1441+
"@typescript-eslint/parser": "4.10.0",
1442+
"eslint": "7.15.0",
1443+
"jest": "26.6.3",
1444+
"ts-jest": "26.4.4",
14241445
"typescript": "4.0.2",
14251446
"uglify-js": "3.10.0"
14261447
}

src/askpass/askpassManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ function getIPCHandlePath(nonce: string): string {
9797
} else {
9898
return path.join(os.tmpdir(), 'git-graph-askpass-' + nonce + '.sock');
9999
}
100-
}
100+
}

src/avatarManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class AvatarManager extends Disposable {
5656
}),
5757

5858
// Dispose the avatar event emitter
59-
this.avatarEventEmitter,
59+
this.avatarEventEmitter
6060
);
6161
}
6262

@@ -298,7 +298,7 @@ export class AvatarManager extends Disposable {
298298
https.get({
299299
hostname: 'gitlab.com', path: '/api/v4/users?search=' + avatarRequest.email,
300300
headers: { 'User-Agent': 'vscode-git-graph', 'Private-Token': 'w87U_3gAxWWaPtFgCcus' }, // Token only has read access
301-
agent: false, timeout: 15000,
301+
agent: false, timeout: 15000
302302
}, (res) => {
303303
let respBody = '';
304304
res.on('data', (chunk: Buffer) => { respBody += chunk; });
@@ -589,4 +589,4 @@ interface GravatarRemoteSource {
589589
readonly type: 'gravatar';
590590
}
591591

592-
type RemoteSource = GitHubRemoteSource | GitLabRemoteSource | GravatarRemoteSource;
592+
type RemoteSource = GitHubRemoteSource | GitLabRemoteSource | GravatarRemoteSource;

src/config.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import {
2424
ReferenceLabelsConfig,
2525
RepoDropdownOrder,
2626
SquashMessageFormat,
27-
TabIconColourTheme
27+
TabIconColourTheme,
28+
TagType
2829
} from './types';
2930

3031
const VIEW_COLUMN_MAPPING: { [column: string]: vscode.ViewColumn } = {
@@ -78,11 +79,11 @@ class Config {
7879
* Get the value of the `git-graph.contextMenuActionsVisibility` Extension Setting.
7980
*/
8081
get contextMenuActionsVisibility(): ContextMenuActionsVisibility {
81-
let userConfig = this.config.get('contextMenuActionsVisibility', {});
82-
let config = {
83-
branch: { checkout: true, rename: true, delete: true, merge: true, rebase: true, push: true, createPullRequest: true, createArchive: true, copyName: true },
82+
const userConfig = this.config.get('contextMenuActionsVisibility', {});
83+
const config: ContextMenuActionsVisibility = {
84+
branch: { checkout: true, rename: true, delete: true, merge: true, rebase: true, push: true, createPullRequest: true, createArchive: true, selectInBranchesDropdown: true, unselectInBranchesDropdown: true, copyName: true },
8485
commit: { addTag: true, createBranch: true, checkout: true, cherrypick: true, revert: true, drop: true, merge: true, rebase: true, reset: true, copyHash: true, copySubject: true },
85-
remoteBranch: { checkout: true, delete: true, fetch: true, merge: true, pull: true, createPullRequest: true, createArchive: true, copyName: true },
86+
remoteBranch: { checkout: true, delete: true, fetch: true, merge: true, pull: true, createPullRequest: true, createArchive: true, selectInBranchesDropdown: true, unselectInBranchesDropdown: true, copyName: true },
8687
stash: { apply: true, createBranch: true, pop: true, drop: true, copyName: true, copyHash: true },
8788
tag: { viewDetails: true, delete: true, push: true, createArchive: true, copyName: true },
8889
uncommittedChanges: { stash: true, reset: true, clean: true, openSourceControlView: true }
@@ -176,7 +177,7 @@ class Config {
176177
return {
177178
addTag: {
178179
pushToRemote: !!this.config.get('dialog.addTag.pushToRemote', false),
179-
type: this.config.get<string>('dialog.addTag.type', 'Annotated') === 'Lightweight' ? 'lightweight' : 'annotated'
180+
type: this.config.get<string>('dialog.addTag.type', 'Annotated') === 'Lightweight' ? TagType.Lightweight : TagType.Annotated
180181
},
181182
applyStash: {
182183
reinstateIndex: !!this.config.get('dialog.applyStash.reinstateIndex', false)
@@ -462,6 +463,13 @@ class Config {
462463
return !!this.config.get('repository.showRemoteHeads', true);
463464
}
464465

466+
/**
467+
* Get the value of the `git-graph.repository.showStashes` Extension Setting.
468+
*/
469+
get showStashes() {
470+
return !!this.config.get('repository.showStashes', true);
471+
}
472+
465473
/**
466474
* Get the value of the `git-graph.repository.showTags` Extension Setting.
467475
*/

0 commit comments

Comments
 (0)