Skip to content

Commit e44a48b

Browse files
committed
Release 1.30.0 package & documentation changes.
1 parent 4db26be commit e44a48b

File tree

8 files changed

+30
-21
lines changed

8 files changed

+30
-21
lines changed

CHANGELOG.md

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

3+
## 1.30.0 - 2021-04-05
4+
* #395 Added a "Force Fetch" option onto the "Fetch into Local Branch" Dialog, allowing any local branch (that's not checked out) to be reset to the remote branch. This dialog is accessed via the Remote Branch Context Menu.
5+
* #457 New "View Diff with Working File" action on the File Context Menu in the Commit Details View.
6+
* #466 New "Copy Relative File Path to Clipboard" action on the File Context Menu in the Commit Details View.
7+
* #471 Spaces can be automatically substituted with hyphens or underscores in reference inputs on dialogs (e.g. Create Branch, Add Tag, etc.), by configuring the new extension setting `git-graph.dialog.general.referenceInputSpaceSubstitution`.
8+
* #476 "Open File" action is now available in the Visual Studio Code Diff View Title Menu, when the Diff View is opened from the Git Graph View. (Requires Visual Studio Code >= 1.42.0)
9+
* #479 New Repository Dropdown Order option "Workspace Full Path", that sorts repositories according to the Visual Studio Code Workspace Folder order, then alphabetically by the full path of the repository. This is the new default order for the `git-graph.repositoryDropdownOrder` extension setting.
10+
* #480 When loading the Working File for a file from a historical commit, and the file has since been renamed, Git is now used to detect renames and enable the Working File to be opened. For example: from the "Open File" & "View Diff with Working File" actions on the File Context Menu in the Commit Details View.
11+
* #482 New "Mark as Reviewed" & "Mark as Not Reviewed" actions on the File Context Menu in the Commit Details View, when a Code Review is in progress. Thanks [Dan Arad (@dan1994)](https://github.com/dan1994) for implementing this!
12+
* #486 All Git Graph View Keyboard Shortcut extension settings can now alternatively be set to "UNASSIGNED", if you don't want to have a keybinding for a specific Keyboard Shortcut.
13+
* #491 Standardise the cross-platform rendering of Markdown inline code blocks, to ensure they don't affect the height of each commit.
14+
* Various code improvements.
15+
316
## 1.29.0 - 2021-02-28
417
* #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.
518
* #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.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ A summary of the Git Graph extension settings are:
8787
* **Format**: Specifies the date format to be used in the "Date" column on the Git Graph View.
8888
* **Type**: Specifies the date type to be displayed in the "Date" column on the Git Graph View, either the author or commit date.
8989
* **Default Column Visibility**: An object specifying the default visibility of the Date, Author & Commit columns. Example: `{"Date": true, "Author": true, "Commit": true}`
90-
* **Dialog > \***: Set the default options on the following dialogs: Add Tag, Apply Stash, Cherry Pick, Create Branch, Delete Branch, Fetch Remote, Merge, Pop Stash, Pull Branch, Rebase, Reset, and Stash Uncommitted Changes
90+
* **Dialog > \***: Set the default options on the following dialogs: Add Tag, Apply Stash, Cherry Pick, Create Branch, Delete Branch, Fetch into Local Branch, Fetch Remote, Merge, Pop Stash, Pull Branch, Rebase, Reset, and Stash Uncommitted Changes
9191
* **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.
9292
* **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).
9393
* **Graph**:

package.json

Lines changed: 2 additions & 2 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.29.0",
4+
"version": "1.30.0",
55
"publisher": "mhutchie",
66
"author": {
77
"name": "Michael Hutchison",
@@ -1078,7 +1078,7 @@
10781078
"enumDescriptions": [
10791079
"Sort repositories alphabetically by the full path of the repository.",
10801080
"Sort repositories alphabetically by the name of the repository.",
1081-
"Sort repositories according to the workspace folder order, then alphabetically by the full path of the repository."
1081+
"Sort repositories according to the Visual Studio Code Workspace Folder order, then alphabetically by the full path of the repository."
10821082
],
10831083
"default": "Workspace Full Path",
10841084
"description": "Specifies the order that repositories are sorted in the repository dropdown on the Git Graph View (only visible when more than one repository exists in the current Visual Studio Code Workspace)."

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export class CommandManager extends Disposable {
321321
*/
322322
private openFile(arg?: vscode.Uri) {
323323
const uri = arg || vscode.window.activeTextEditor?.document.uri;
324-
if (typeof uri === 'object' && uri.scheme === DiffDocProvider.scheme) {
324+
if (typeof uri === 'object' && uri && uri.scheme === DiffDocProvider.scheme) {
325325
// A Git Graph URI has been provided
326326
const request = decodeDiffDocUri(uri);
327327
return openFile(request.repo, request.filePath, request.commit, this.dataSource, vscode.ViewColumn.Active).then((errorInfo) => {

tests/commands.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ describe('CommandManager', () => {
102102
it('Should set git-graph:codiconsSupported to TRUE when vscode.version >= 1.42.0', () => {
103103
// Setup
104104
commandManager.dispose();
105+
vscode.mockVscodeVersion('1.42.0');
105106
const spyOnExecuteCommand = jest.spyOn(vscode.commands, 'executeCommand');
106107
const spyOnLog = jest.spyOn(logger, 'log');
107108
vscode.commands.executeCommand.mockResolvedValueOnce(null);

tests/diffDocProvider.test.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,7 @@ describe('encodeDiffDocUri', () => {
191191
});
192192

193193
describe('decodeDiffDocUri', () => {
194-
it('Should return an null if requested on an empty file URI', () => {
195-
// Run
196-
const value = decodeDiffDocUri(vscode.Uri.file('file').with({
197-
scheme: 'git-graph',
198-
query: 'bnVsbA=='
199-
}));
200-
201-
// Assert
202-
expect(value).toBe(null);
203-
});
204-
205-
it('Should return the parse DiffDocUriData if requested on a git-graph URI', () => {
194+
it('Should return the parsed DiffDocUriData from the URI', () => {
206195
// Run
207196
const value = decodeDiffDocUri(vscode.Uri.file('file.txt').with({
208197
scheme: 'git-graph',

tests/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ describe('doesFileExist', () => {
322322
expect(mockedFileSystemModule.access).toHaveBeenNthCalledWith(1, 'file.txt', fs.constants.R_OK, expect.anything());
323323
});
324324

325-
it('Should return FILE when the file doesn\'t exist', async () => {
325+
it('Should return FALSE when the file doesn\'t exist', async () => {
326326
// Setup
327327
mockedFileSystemModule.access.mockImplementationOnce((_1: fs.PathLike, _2: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void) => callback(new Error()));
328328

web/main.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -991,8 +991,9 @@ class GitGraphView {
991991
if (remotesWithBranch.length > 0) {
992992
inputs.push({
993993
type: DialogInputType.Checkbox,
994-
name: 'Delete this branch on the remote' + (this.gitRemotes.length > 1 ? 's' : '') + '<span class="dialogInfo" title="This branch is on the remote' + (remotesWithBranch.length > 1 ? 's: ' : ' ') + formatCommaSeparatedList(remotesWithBranch.map(remote => escapeHtml('"' + remote + '"'))) + '">' + SVG_ICONS.info + '</span>',
995-
value: false
994+
name: 'Delete this branch on the remote' + (this.gitRemotes.length > 1 ? 's' : ''),
995+
value: false,
996+
info: 'This branch is on the remote' + (remotesWithBranch.length > 1 ? 's: ' : ' ') + formatCommaSeparatedList(remotesWithBranch.map((remote) => '"' + remote + '"'))
996997
});
997998
}
998999
dialog.showForm('Are you sure you want to delete the branch <b><i>' + escapeHtml(refName) + '</i></b>?', inputs, 'Yes, delete', (values) => {
@@ -1254,8 +1255,13 @@ class GitGraphView {
12541255
title: 'Fetch into local branch' + ELLIPSIS,
12551256
visible: visibility.fetch && remote !== '' && this.gitBranches.includes(branchName) && this.gitBranchHead !== branchName,
12561257
onClick: () => {
1257-
dialog.showCheckbox('Are you sure you want to fetch the remote branch <b><i>' + escapeHtml(refName) + '</i></b> into the local branch <b><i>' + escapeHtml(branchName) + '</i></b>?', 'Force Fetch<span class="dialogInfo" title="Force the local branch to be reset to this remote branch.">' + SVG_ICONS.info + '</span>', this.config.dialogDefaults.fetchIntoLocalBranch.forceFetch, 'Yes, fetch', (force) => {
1258-
runAction({ command: 'fetchIntoLocalBranch', repo: this.currentRepo, remote: remote, remoteBranch: branchName, localBranch: branchName, force: force }, 'Fetching Branch');
1258+
dialog.showForm('Are you sure you want to fetch the remote branch <b><i>' + escapeHtml(refName) + '</i></b> into the local branch <b><i>' + escapeHtml(branchName) + '</i></b>?', [{
1259+
type: DialogInputType.Checkbox,
1260+
name: 'Force Fetch',
1261+
value: this.config.dialogDefaults.fetchIntoLocalBranch.forceFetch,
1262+
info: 'Force the local branch to be reset to this remote branch.'
1263+
}], 'Yes, fetch', (values) => {
1264+
runAction({ command: 'fetchIntoLocalBranch', repo: this.currentRepo, remote: remote, remoteBranch: branchName, localBranch: branchName, force: <boolean>values[0] }, 'Fetching Branch');
12591265
}, target);
12601266
}
12611267
}, {

0 commit comments

Comments
 (0)