Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dugite-native to 2.35.2 #468

Merged
merged 9 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export enum GitError {
TagAlreadyExists,
MergeWithLocalChanges,
RebaseWithLocalChanges,
MergeCommitNoMainlineOption
MergeCommitNoMainlineOption,
UnsafeDirectory
}

/** A mapping from regexes to the git error they identify. */
Expand All @@ -68,7 +69,7 @@ export const GitErrorRegexes: { [regexp: string]: GitError } = {
'fatal: Authentication failed': GitError.SSHAuthenticationFailed,
'fatal: Could not read from remote repository.': GitError.SSHPermissionDenied,
'The requested URL returned error: 403': GitError.HTTPSAuthenticationFailed,
'fatal: The remote end hung up unexpectedly': GitError.RemoteDisconnection,
'fatal: [Tt]he remote end hung up unexpectedly': GitError.RemoteDisconnection,
"fatal: unable to access '(.+)': Failed to connect to (.+): Host is down": GitError.HostDown,
"Cloning into '(.+)'...\nfatal: unable to access '(.+)': Could not resolve host: (.+)":
GitError.HostDown,
Expand All @@ -91,7 +92,7 @@ export const GitErrorRegexes: { [regexp: string]: GitError } = {
"Your configuration specifies to merge with the ref '(.+)'\nfrom the remote, but no such ref was fetched.":
GitError.NoExistingRemoteBranch,
'nothing to commit': GitError.NothingToCommit,
"No submodule mapping found in .gitmodules for path '(.+)'": GitError.NoSubmoduleMapping,
"[Nn]o submodule mapping found in .gitmodules for path '(.+)'": GitError.NoSubmoduleMapping,
"fatal: repository '(.+)' does not exist\nfatal: clone of '.+' into submodule path '(.+)' failed":
GitError.SubmoduleRepositoryDoesNotExist,
"Fetched in submodule path '(.+)', but it did not contain (.+). Direct fetching of that commit failed.":
Expand All @@ -104,7 +105,7 @@ export const GitErrorRegexes: { [regexp: string]: GitError } = {
GitError.NonFastForwardMergeIntoEmptyHead,
'error: (.+): (patch does not apply|already exists in working directory)':
GitError.PatchDoesNotApply,
"fatal: A branch named '(.+)' already exists.": GitError.BranchAlreadyExists,
"fatal: [Aa] branch named '(.+)' already exists.?": GitError.BranchAlreadyExists,
"fatal: bad revision '(.*)'": GitError.BadRevision,
'fatal: [Nn]ot a git repository \\(or any of the parent directories\\): (.*)':
GitError.NotAGitRepository,
Expand Down Expand Up @@ -145,7 +146,8 @@ export const GitErrorRegexes: { [regexp: string]: GitError } = {
GitError.MergeWithLocalChanges,
'error: cannot (pull with rebase|rebase): You have unstaged changes\\.\n\\s*error: [Pp]lease commit or stash them\\.':
GitError.RebaseWithLocalChanges,
'error: commit (.+) is a merge but no -m option was given': GitError.MergeCommitNoMainlineOption
'error: commit (.+) is a merge but no -m option was given': GitError.MergeCommitNoMainlineOption,
"fatal: unsafe repository \\('(.+)' is owned by someone else\\)": GitError.UnsafeDirectory
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dugite",
"version": "1.105.0",
"version": "1.107.0",
"description": "Elegant bindings for Git",
"main": "./build/lib/index.js",
"typings": "./build/lib/index.d.ts",
Expand Down
30 changes: 15 additions & 15 deletions script/embedded-git.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"win32-x64": {
"name": "dugite-native-v2.32.1-bb06bdb-windows-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.32.1-1/dugite-native-v2.32.1-bb06bdb-windows-x64.tar.gz",
"checksum": "82cd05780889956bab2464815376924a5d4a2d15576eeb29656a66a83bab2129"
"name": "dugite-native-v2.35.2-a4271c2-windows-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.35.2/dugite-native-v2.35.2-a4271c2-windows-x64.tar.gz",
"checksum": "f3be1e4bde1e68af5577f5049d88a123aac2edd612ecccaddcb644eb23ef5db3"
},
"win32-ia32": {
"name": "dugite-native-v2.32.1-bb06bdb-windows-x86.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.32.1-1/dugite-native-v2.32.1-bb06bdb-windows-x86.tar.gz",
"checksum": "7c2d831ec6e1748c2b998eacfa56f53e4706b495d29678100695c87b78df5bb2"
"name": "dugite-native-v2.35.2-a4271c2-windows-x86.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.35.2/dugite-native-v2.35.2-a4271c2-windows-x86.tar.gz",
"checksum": "670900bda1b1646ceb30377dfc4649ec9110affee2a7e6f5a54d9fa274c201ad"
},
"darwin-x64": {
"name": "dugite-native-v2.32.1-bb06bdb-macOS-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.32.1-1/dugite-native-v2.32.1-bb06bdb-macOS-x64.tar.gz",
"checksum": "05fdc7deb026e374db7f49106a697b9540c16f4fbb59fbc1f47c96f49e743a93"
"name": "dugite-native-v2.35.2-a4271c2-macOS-x64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.35.2/dugite-native-v2.35.2-a4271c2-macOS-x64.tar.gz",
"checksum": "609b5f62eac5d0b6bba39b5c6608d08a51e99f0c27764e08735ee02782393362"
},
"darwin-arm64": {
"name": "dugite-native-v2.32.1-bb06bdb-macOS-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.32.1-1/dugite-native-v2.32.1-bb06bdb-macOS-arm64.tar.gz",
"checksum": "e58ae01a39ef29c55e6456988b651d98835bfb6fcf92aa7a6b877faeb22d672c"
"name": "dugite-native-v2.35.2-a4271c2-macOS-arm64.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.35.2/dugite-native-v2.35.2-a4271c2-macOS-arm64.tar.gz",
"checksum": "1d9d122944a8b1285fe43b05b2bf2a40b18e9d75ff678eda3881589395d752fd"
},
"linux-x64": {
"name": "dugite-native-v2.32.1-bb06bdb-ubuntu.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.32.1-1/dugite-native-v2.32.1-bb06bdb-ubuntu.tar.gz",
"checksum": "52ce6b8c8a753d3b0dddda6e23b3455866745659ef5768313b15193c6ac11a91"
"name": "dugite-native-v2.35.2-a4271c2-ubuntu.tar.gz",
"url": "https://github.com/desktop/dugite-native/releases/download/v2.35.2/dugite-native-v2.35.2-a4271c2-ubuntu.tar.gz",
"checksum": "20c49eee8d8746455f30a001abdf8655f26fe5037b672b3ba59df802ff83599c"
}
}
8 changes: 8 additions & 0 deletions test/fast/errors-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@ describe('detects errors', () => {

expect(result).toHaveGitError(GitError.TagAlreadyExists)
})
it('BranchAlreadyExists', async () => {
const path = await initialize('branch-already-exists', 'foo')
await GitProcess.exec(['commit', '-m', 'initial', '--allow-empty'], path)

const result = await GitProcess.exec(['branch', 'foo'], path)

expect(result).toHaveGitError(GitError.BranchAlreadyExists)
})
})
6 changes: 3 additions & 3 deletions test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { GitProcess, IGitResult, GitError } from '../lib'

// NOTE: bump these versions to the latest stable releases
export const gitVersion = '2.32.1'
export const gitForWindowsVersion = '2.32.1.windows.1'
export const gitLfsVersion = '2.13.3'
export const gitVersion = '2.35.2'
export const gitForWindowsVersion = '2.35.2.windows.1'
export const gitLfsVersion = '3.1.2'

const temp = require('temp').track()

Expand Down