From febf93fcd726d3dc112d1865d944be1f112317c7 Mon Sep 17 00:00:00 2001 From: Michael Hutchison Date: Sun, 14 Jun 2020 13:54:12 +1000 Subject: [PATCH] Release 1.24.0 package & documentation changes. --- .github/workflows/build-and-test.yml | 2 ++ CHANGELOG.md | 9 +++++++++ README.md | 1 + package.json | 2 +- src/gitGraphView.ts | 6 +++--- src/types.ts | 10 ++++++++-- web/main.ts | 8 ++++---- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 62d16769..849b3504 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -4,9 +4,11 @@ on: push: branches: - master + - develop pull_request: branches: - master + - develop jobs: build: diff --git a/CHANGELOG.md b/CHANGELOG.md index e756f110..9486bf8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 1.24.0 - 2020-06-14 +* #271 Support for Visual Studio Code in Web Browsers. Git Graph officially supports Visual Studio Code in Microsoft's Visual Studio Codespaces in the Google Chrome browser, however the underlying changes allow Git Graph to be supported in most third-party Visual Studio Code browser-based platforms, and in most popular web browsers. +* #297 When checking out a remote branch & the specified branch name already exists locally, the dialog option to "Checkout the existing branch" has been replaced with "Checkout the existing branch & pull changes". +* #304 Override the globally configured commit ordering (configured by `git-graph.commitOrdering`) per repository from the Git Graph View Column Header context menu. +* #305 Upgraded the minimum version requirement of Visual Studio Code from 1.31.0 to 1.38.0. This change has been needed for some time, however I now have to make this change due to Visual Studio Code decreasing support for older Webview integrations for all extensions. Almost all users of Git Graph will be unaffected by this change. If you are one of the few Git Graph users who use a version of Visual Studio Code older than 1.38.0, please upgrade Visual Studio Code to continue receiving updates to Git Graph. +* #316 Include built-in support for several new emoji shortcodes recently added to [gitmoji](https://gitmoji.carloscuesta.me/). +* #319 Added a new Extension Setting `git-graph.enhancedAccessibility`, that enables visual file change A|M|D|R|U indicators in the Commit Details View for users with colour blindness. In the future, this setting will enable any additional accessibility related features of Git Graph that aren't enabled by default. Default: false (disabled) +* Various code improvements. + ## 1.23.0 - 2020-05-24 * #89 Added a new "Include commits only mentioned by reflogs" option to the Git Graph View's Repository Settings Widget. The default value can be defined globally for all repositories using the new Extension Setting `git-graph.includeCommitsMentionedByReflogs`. Default: false (disabled) * #201 New Keyboard Shortcuts in the Git Graph View for scrolling to stashes: diff --git a/README.md b/README.md index 74fef7a8..193f5cb7 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ A summary of the Git Graph extension settings are: * **Default Column Visibility**: An object specifying the default visibility of the Date, Author & Commit columns. Example: `{"Date": true, "Author": true, "Commit": true}` * **Default File View Type**: Sets the default type of File View (Tree or List) used in the Commit Details / Comparison Views. This can be overridden per repository using the controls on the right side of the Commit Details / Comparison Views. * **Dialog.\***: Set the default options on the following dialogs: Add Tag, Apply Stash, Cherry Pick, Create Branch, Delete Branch, Merge, Pop Stash, Rebase, Reset, and Stash Uncommitted Changes +* **Enhanced Accessibility**: Visual file change A|M|D|R|U indicators in the Commit Details View for users with colour blindness. In the future, this setting will enable any additional accessibility related features of Git Graph that aren't enabled by default. Default: false (disabled) * **Fetch and Prune**: Before fetching from remote(s) using the Fetch button on the Git Graph View Control Bar, remove any remote-tracking references that no longer exist on the remote. Default: false (disabled) * **Fetch Avatars**: Fetch avatars of commit authors and committers. Default: false (disabled) * **File Encoding**: The character set encoding used when retrieving a specific version of repository files (e.g. in the Diff View). A list of all supported encodings can be found [here](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). Default: utf8 diff --git a/package.json b/package.json index 024326b7..a0234713 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "git-graph", "displayName": "Git Graph", - "version": "1.23.0", + "version": "1.24.0", "publisher": "mhutchie", "author": { "name": "Michael Hutchison", diff --git a/src/gitGraphView.ts b/src/gitGraphView.ts index edb9b48e..9ab70223 100644 --- a/src/gitGraphView.ts +++ b/src/gitGraphView.ts @@ -178,12 +178,12 @@ export class GitGraphView implements vscode.Disposable { break; case 'checkoutBranch': errorInfos = [await this.dataSource.checkoutBranch(msg.repo, msg.branchName, msg.remoteBranch)]; - if (errorInfos[0] === null && msg.pullFromRemoteAfterwards !== null) { - errorInfos.push(await this.dataSource.pullBranch(msg.repo, msg.branchName, msg.pullFromRemoteAfterwards, false, false)); + if (errorInfos[0] === null && msg.pullAfterwards !== null) { + errorInfos.push(await this.dataSource.pullBranch(msg.repo, msg.pullAfterwards.branchName, msg.pullAfterwards.remote, false, false)); } this.sendMessage({ command: 'checkoutBranch', - pullFromRemoteAfterwards: msg.pullFromRemoteAfterwards, + pullAfterwards: msg.pullAfterwards, errors: errorInfos }); break; diff --git a/src/types.ts b/src/types.ts index 3bfd0d4b..e5360d5f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -519,11 +519,17 @@ export interface RequestCheckoutBranch extends RepoRequest { readonly command: 'checkoutBranch'; readonly branchName: string; readonly remoteBranch: string | null; - readonly pullFromRemoteAfterwards: string | null; // String => The remote to pull from, NULL => Don't pull after checking out + readonly pullAfterwards: { + readonly branchName: string; + readonly remote: string; + } | null; // NULL => Don't pull after checking out } export interface ResponseCheckoutBranch extends ResponseWithMultiErrorInfo { readonly command: 'checkoutBranch'; - readonly pullFromRemoteAfterwards: string | null; // String => The remote to pull from, NULL => Don't pull after checking out + readonly pullAfterwards: { + readonly branchName: string; + readonly remote: string; + } | null; // NULL => Don't pull after checking out } export interface RequestCheckoutCommit extends RepoRequest { diff --git a/web/main.ts b/web/main.ts index ca4af8b6..7eea2ef9 100644 --- a/web/main.ts +++ b/web/main.ts @@ -1446,14 +1446,14 @@ class GitGraphView { dialog.showTwoButtons('The name ' + escapeHtml(newBranch) + ' is already used by another branch:', 'Choose another branch name', () => { this.checkoutBranchAction(refName, remote, newBranch, target); }, 'Checkout the existing branch' + (canPullFromRemote ? ' & pull changes' : ''), () => { - runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: newBranch, remoteBranch: null, pullFromRemoteAfterwards: canPullFromRemote ? remote : null }, 'Checking out Branch' + (canPullFromRemote ? ' & Pulling Changes' : '')); + runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: newBranch, remoteBranch: null, pullAfterwards: canPullFromRemote ? { branchName: refName.substring(remote.length + 1), remote: remote } : null }, 'Checking out Branch' + (canPullFromRemote ? ' & Pulling Changes' : '')); }, target); } else { - runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: newBranch, remoteBranch: refName, pullFromRemoteAfterwards: null }, 'Checking out Branch'); + runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: newBranch, remoteBranch: refName, pullAfterwards: null }, 'Checking out Branch'); } }, target); } else { - runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: refName, remoteBranch: null, pullFromRemoteAfterwards: null }, 'Checking out Branch'); + runAction({ command: 'checkoutBranch', repo: this.currentRepo, branchName: refName, remoteBranch: null, pullAfterwards: null }, 'Checking out Branch'); } } @@ -2663,7 +2663,7 @@ window.addEventListener('load', () => { refreshOrDisplayError(msg.error, 'Unable to Create Branch from Stash'); break; case 'checkoutBranch': - refreshAndDisplayErrors(msg.errors, 'Unable to Checkout Branch' + (msg.pullFromRemoteAfterwards ? ' & Pull Changes' : '')); + refreshAndDisplayErrors(msg.errors, 'Unable to Checkout Branch' + (msg.pullAfterwards !== null ? ' & Pull Changes' : '')); break; case 'checkoutCommit': refreshOrDisplayError(msg.error, 'Unable to Checkout Commit');