Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutchie committed Feb 28, 2021
2 parents 60c1fae + 67b1f39 commit 28c0571
Show file tree
Hide file tree
Showing 36 changed files with 3,291 additions and 2,427 deletions.
46 changes: 44 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,51 @@
"@typescript-eslint"
],
"rules": {
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"dot-location": [
"error",
"property"
],
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"key-spacing": "error",
"linebreak-style": [
"error",
"windows"
],
"new-cap": "error",
"new-parens": "error",
"no-console": "warn",
"no-eval": "error",
"no-labels": "error",
"no-multi-spaces": "error",
"no-redeclare": "error",
"no-shadow-restricted-names": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-whitespace-before-property": "error",
"quotes": [
"error",
"single"
],
"rest-spread-spacing": "error",
"semi": "error",
"sort-imports": [
"error",
Expand All @@ -38,6 +62,23 @@
"ignoreDeclarationSort": true
}
],
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-before-blocks": "error",
"space-infix-ops": "error",
"spaced-comment": "error",
"template-curly-spacing": "error",
"wrap-iife": [
"error",
"inside"
],
"yoda": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
Expand Down Expand Up @@ -65,9 +106,10 @@
},
"overrides": [
{
"files": "./src/askpass/askpassMain.ts",
"files": "./src/askpass/*.ts",
"rules": {
"no-console": "off"
"no-console": "off",
"spaced-comment": "off"
}
}
]
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 1.29.0 - 2021-02-28
* #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.
* #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.
* #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.
* #417 New context menu actions for branches, to select / unselect the branch in the Branches Dropdown.
* #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).
* #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.
* #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.
* #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.
* #452 Explicitly override the Git configuration variable `log.showSignature` to ensure consistent parsing of commits.
* Significant code and UI improvements.

## 1.28.0 - 2020-12-01
* #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`).
* #406 The keybindings for all Git Graph View keyboard shortcuts can now be configured using new extension settings `git-graph.keyboardShortcut.*`.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ A summary of the Git Graph extension settings are:
* **Show Commits Only Referenced By Tags**: Show Commits that are only referenced by tags in Git Graph.
* **Show Remote Branches**: Show Remote Branches in Git Graph by default.
* **Show Remote Heads**: Show Remote HEAD Symbolic References in Git Graph.
* **Show Stashes**: Show Stashes in Git Graph by default.
* **Show Tags**: Show Tags in Git Graph by default.
* **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.
* **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.
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
moduleFileExtensions: ['ts', 'js'],
globals: {
'ts-jest': {
tsConfig: './tests/tsconfig.json'
tsconfig: './tests/tsconfig.json'
}
},
collectCoverageFrom: [
Expand Down
35 changes: 28 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "git-graph",
"displayName": "Git Graph",
"version": "1.28.0",
"version": "1.29.0",
"publisher": "mhutchie",
"author": {
"name": "Michael Hutchison",
Expand Down Expand Up @@ -170,6 +170,14 @@
"type": "boolean",
"title": "Create Archive"
},
"selectInBranchesDropdown": {
"type": "boolean",
"title": "Select in Branches Dropdown"
},
"unselectInBranchesDropdown": {
"type": "boolean",
"title": "Unselect in Branches Dropdown"
},
"copyName": {
"type": "boolean",
"title": "Copy Branch Name to Clipboard"
Expand Down Expand Up @@ -256,6 +264,14 @@
"type": "boolean",
"title": "Create Archive"
},
"selectInBranchesDropdown": {
"type": "boolean",
"title": "Select in Branches Dropdown"
},
"unselectInBranchesDropdown": {
"type": "boolean",
"title": "Unselect in Branches Dropdown"
},
"copyName": {
"type": "boolean",
"title": "Copy Branch Name to Clipboard"
Expand Down Expand Up @@ -986,6 +1002,11 @@
"default": true,
"description": "Show Remote HEAD Symbolic References in Git Graph (e.g. \"origin/HEAD\")."
},
"git-graph.repository.showStashes": {
"type": "boolean",
"default": true,
"description": "Show Stashes in Git Graph by default. This can be overridden per repository in the Git Graph View's Repository Settings Widget."
},
"git-graph.repository.showTags": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -1413,14 +1434,14 @@
"iconv-lite": "0.5.0"
},
"devDependencies": {
"@types/jest": "26.0.14",
"@types/jest": "26.0.19",
"@types/node": "8.10.62",
"@types/vscode": "1.38.0",
"@typescript-eslint/eslint-plugin": "4.1.0",
"@typescript-eslint/parser": "4.1.0",
"eslint": "7.9.0",
"jest": "26.4.2",
"ts-jest": "26.3.0",
"@typescript-eslint/eslint-plugin": "4.10.0",
"@typescript-eslint/parser": "4.10.0",
"eslint": "7.15.0",
"jest": "26.6.3",
"ts-jest": "26.4.4",
"typescript": "4.0.2",
"uglify-js": "3.10.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/askpass/askpassManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ function getIPCHandlePath(nonce: string): string {
} else {
return path.join(os.tmpdir(), 'git-graph-askpass-' + nonce + '.sock');
}
}
}
6 changes: 3 additions & 3 deletions src/avatarManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class AvatarManager extends Disposable {
}),

// Dispose the avatar event emitter
this.avatarEventEmitter,
this.avatarEventEmitter
);
}

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

type RemoteSource = GitHubRemoteSource | GitLabRemoteSource | GravatarRemoteSource;
type RemoteSource = GitHubRemoteSource | GitLabRemoteSource | GravatarRemoteSource;
20 changes: 14 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import {
ReferenceLabelsConfig,
RepoDropdownOrder,
SquashMessageFormat,
TabIconColourTheme
TabIconColourTheme,
TagType
} from './types';

const VIEW_COLUMN_MAPPING: { [column: string]: vscode.ViewColumn } = {
Expand Down Expand Up @@ -78,11 +79,11 @@ class Config {
* Get the value of the `git-graph.contextMenuActionsVisibility` Extension Setting.
*/
get contextMenuActionsVisibility(): ContextMenuActionsVisibility {
let userConfig = this.config.get('contextMenuActionsVisibility', {});
let config = {
branch: { checkout: true, rename: true, delete: true, merge: true, rebase: true, push: true, createPullRequest: true, createArchive: true, copyName: true },
const userConfig = this.config.get('contextMenuActionsVisibility', {});
const config: ContextMenuActionsVisibility = {
branch: { checkout: true, rename: true, delete: true, merge: true, rebase: true, push: true, createPullRequest: true, createArchive: true, selectInBranchesDropdown: true, unselectInBranchesDropdown: true, copyName: true },
commit: { addTag: true, createBranch: true, checkout: true, cherrypick: true, revert: true, drop: true, merge: true, rebase: true, reset: true, copyHash: true, copySubject: true },
remoteBranch: { checkout: true, delete: true, fetch: true, merge: true, pull: true, createPullRequest: true, createArchive: true, copyName: true },
remoteBranch: { checkout: true, delete: true, fetch: true, merge: true, pull: true, createPullRequest: true, createArchive: true, selectInBranchesDropdown: true, unselectInBranchesDropdown: true, copyName: true },
stash: { apply: true, createBranch: true, pop: true, drop: true, copyName: true, copyHash: true },
tag: { viewDetails: true, delete: true, push: true, createArchive: true, copyName: true },
uncommittedChanges: { stash: true, reset: true, clean: true, openSourceControlView: true }
Expand Down Expand Up @@ -176,7 +177,7 @@ class Config {
return {
addTag: {
pushToRemote: !!this.config.get('dialog.addTag.pushToRemote', false),
type: this.config.get<string>('dialog.addTag.type', 'Annotated') === 'Lightweight' ? 'lightweight' : 'annotated'
type: this.config.get<string>('dialog.addTag.type', 'Annotated') === 'Lightweight' ? TagType.Lightweight : TagType.Annotated
},
applyStash: {
reinstateIndex: !!this.config.get('dialog.applyStash.reinstateIndex', false)
Expand Down Expand Up @@ -462,6 +463,13 @@ class Config {
return !!this.config.get('repository.showRemoteHeads', true);
}

/**
* Get the value of the `git-graph.repository.showStashes` Extension Setting.
*/
get showStashes() {
return !!this.config.get('repository.showStashes', true);
}

/**
* Get the value of the `git-graph.repository.showTags` Extension Setting.
*/
Expand Down
Loading

0 comments on commit 28c0571

Please sign in to comment.