Skip to content

Commit

Permalink
patch dugite with forked package for Linux-specific build fixes (#893)
Browse files Browse the repository at this point in the history
* patch dugite with forked package that contains Linux-specific build fixes

* update script to point to new package

* upgrade to version that more closely matches next upstream release
  • Loading branch information
shiftkey committed Jul 3, 2023
1 parent e86e611 commit d0b8547
Show file tree
Hide file tree
Showing 51 changed files with 62 additions and 59 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"desktop-trampoline": "desktop/desktop-trampoline#v0.9.8",
"dexie": "^3.2.2",
"dompurify": "^2.3.3",
"dugite": "^2.5.0",
"@shiftkey/dugite": "2.5.0-shiftkey1",
"electron-window-state": "^5.0.3",
"event-kit": "^2.0.0",
"focus-trap-react": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/apply.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import { git } from './core'
import {
WorkingDirectoryFileChange,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/authentication.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import { IGitAccount } from '../../models/git-account'

/** Get the environment for authenticating remote operations. */
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Branch } from '../../models/branch'
import { IGitAccount } from '../../models/git-account'
import { formatAsLocalRef } from './refs'
import { deleteRef } from './update-ref'
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import { getRemoteURL } from './remote'
import {
envForRemoteOperation,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/cherry-pick.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Path from 'path'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { Repository } from '../../models/repository'
import {
AppFileStatusKind,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
IGitResult as DugiteResult,
GitError as DugiteError,
IGitExecutionOptions as DugiteExecutionOptions,
} from 'dugite'
} from '@shiftkey/dugite'

import { assertNever } from '../fatal-error'
import * as GitPerf from '../../ui/lib/git-perf'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { readFile } from 'fs/promises'
import { forceUnwrap } from '../fatal-error'
import { git } from './core'
import { NullTreeSHA } from './diff-index'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { IChangesetData, parseRawLogWithNumstat } from './log'
import { getConfigValue } from './config'
import { getMergeBase } from './merge'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/for-each-ref.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { git } from './core'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { Repository } from '../../models/repository'
import {
Branch,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/merge.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Path from 'path'

import { git } from './core'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { Repository } from '../../models/repository'
import { pathExists } from '../../ui/lib/path-exists'

Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/push.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'

import {
git,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/rebase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Path from 'path'
import { ChildProcess } from 'child_process'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import byline from 'byline'

import { Repository } from '../../models/repository'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/remote.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { git } from './core'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'

import { Repository } from '../../models/repository'
import { IRemote } from '../../models/remote'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/rev-list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { git } from './core'
import { Repository } from '../../models/repository'
import { Branch, BranchType, IAheadBehind } from '../../models/branch'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { git } from './core'
import { spawnAndComplete } from './spawn'

import { Repository } from '../../models/repository'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { enableMultiCommitDiffs } from '../feature-flag'

/**
Expand Down
4 changes: 2 additions & 2 deletions app/src/lib/git/spawn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GitProcess } from 'dugite'
import { IGitSpawnExecutionOptions } from 'dugite/build/lib/git-process'
import { GitProcess } from '@shiftkey/dugite'
import { IGitSpawnExecutionOptions } from '@shiftkey/dugite/build/lib/git-process'
import * as GitPerf from '../../ui/lib/git-perf'
import { isErrnoException } from '../errno-exception'
import { withTrampolineEnv } from '../trampoline/trampoline-environment'
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/git/stash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import { git, GitError } from './core'
import { Repository } from '../../models/repository'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/stores/app-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ import { WorkflowPreferences } from '../../models/workflow-preferences'
import { RepositoryIndicatorUpdater } from './helpers/repository-indicator-updater'
import { isAttributableEmailFor } from '../email'
import { TrashNameLabel } from '../../ui/lib/context-menu'
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import {
ErrorWithMetadata,
CheckoutError,
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/stores/git-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import {
getRemoteHEAD,
} from '../git'
import { GitError as DugiteError } from '../../lib/git'
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { RetryAction, RetryActionType } from '../../models/retry-actions'
import { UpstreamAlreadyExistsError } from './upstream-already-exists-error'
import { forceUnwrap } from '../fatal-error'
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/dispatcher/error-handlers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GitError as DugiteError,
RepositoryDoesNotExistErrorCode,
} from 'dugite'
} from '@shiftkey/dugite'

import { Dispatcher } from '.'
import { ExternalEditorError } from '../../lib/editors/shared'
Expand Down
2 changes: 1 addition & 1 deletion app/test/helpers/local-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Repository } from '../../src/models/repository'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

export async function setupLocalConfig(
repository: Repository,
Expand Down
2 changes: 1 addition & 1 deletion app/test/helpers/repositories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as FSE from 'fs-extra'
import { mkdirSync } from './temp'
import klawSync, { Item } from 'klaw-sync'
import { Repository } from '../../src/models/repository'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { makeCommit, switchTo } from './repository-scaffolding'
import { writeFile } from 'fs-extra'
import { git } from '../../src/lib/git'
Expand Down
2 changes: 1 addition & 1 deletion app/test/helpers/repository-builder-branch-pruner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { setupEmptyRepository } from './repositories'
import { makeCommit, switchTo } from './repository-scaffolding'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { RepositoriesStore, GitStore } from '../../src/lib/stores'
import { RepositoryStateCache } from '../../src/lib/stores/repository-state-cache'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/test/helpers/repository-scaffolding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import * as FSE from 'fs-extra'
import * as Path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/app-store-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Path from 'path'
import * as FSE from 'fs-extra'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

import {
AppStore,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/branch-pruner-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RepositoryStateCache } from '../../src/lib/stores/repository-state-cach
import { setupFixtureRepository } from '../helpers/repositories'
import { shell } from '../helpers/test-app-shell'
import { TestRepositoriesDatabase } from '../helpers/databases'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
createRepository as createPrunedRepository,
setupRepository,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git-store-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as FSE from 'fs-extra'
import * as Path from 'path'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

import { shell } from '../helpers/test-app-shell'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/apply-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
setupTwoCommitRepo,
setupFixtureRepository,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/branch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
IUnbornRepository,
} from '../../../src/models/tip'
import { GitStore } from '../../../src/lib/stores'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
getBranchesPointedAt,
createBranch,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/checkout-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { TipState, IValidBranch } from '../../../src/models/tip'
import { GitStore } from '../../../src/lib/stores'
import { Branch, BranchType } from '../../../src/models/branch'
import { getStatusOrThrow } from '../../helpers/status'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { StatsStore, StatsDatabase } from '../../../src/lib/stats'
import { UiActivityMonitor } from '../../../src/ui/lib/ui-activity-monitor'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/cherry-pick-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import * as FSE from 'fs-extra'
import * as Path from 'path'
import {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/commit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
setupConflictedRepoWithMultipleFiles,
} from '../../helpers/repositories'

import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
WorkingDirectoryFileChange,
AppFileStatusKind,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/config-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import * as Path from 'path'

import { Repository } from '../../../src/models/repository'
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/core-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitError } from 'dugite'
import { GitError } from '@shiftkey/dugite'
import { Repository } from '../../../src/models/repository'
import {
git,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/diff-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
} from '../../../src/lib/git'
import { getStatusOrThrow } from '../../helpers/status'

import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { makeCommit, switchTo } from '../../helpers/repository-scaffolding'

async function getTextDiff(
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/format-patch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
cloneLocalRepository,
makeCommit,
} from '../../helpers/repository-scaffolding'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

describe('formatPatch', () => {
describe('in a repo with commits', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/gitignore-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as FSE from 'fs-extra'
import * as Path from 'path'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

import { setupEmptyRepository } from '../../helpers/repositories'
import { getStatusOrThrow } from '../../helpers/status'
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/lfs-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
setupEmptyRepository,
} from '../../helpers/repositories'
import { Repository } from '../../../src/models/repository'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
isUsingLFS,
isTrackedByLFS,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/merge-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
setupFixtureRepository,
setupConflictedRepo,
} from '../../helpers/repositories'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { Repository } from '../../../src/models/repository'

describe('git/merge', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/rebase/detect-conflict-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import * as FSE from 'fs-extra'
import * as Path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/reflog-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
getBranchCheckouts,
} from '../../../src/lib/git'
import { setupFixtureRepository } from '../../helpers/repositories'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { offsetFromNow } from '../../../src/lib/offset-from'

async function createAndCheckout(
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/remote-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
setupEmptyDirectory,
} from '../../helpers/repositories'
import { findDefaultRemote } from '../../../src/lib/stores/helpers/find-default-remote'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

describe('git/remote', () => {
describe('getRemotes', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/reorder-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Commit } from '../../../src/models/commit'
import { Repository } from '../../../src/models/repository'
import { setupEmptyRepositoryDefaultMain } from '../../helpers/repositories'
import { makeCommit } from '../../helpers/repository-scaffolding'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { getStatusOrThrow } from '../../helpers/status'
import { getTempFilePath } from '../../../src/lib/file-system'
import { reorder } from '../../../src/lib/git/reorder'
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/reset-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Repository } from '../../../src/models/repository'
import { reset, resetPaths, GitResetMode } from '../../../src/lib/git/reset'
import { getStatusOrThrow } from '../../helpers/status'
import { setupFixtureRepository } from '../../helpers/repositories'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

import * as FSE from 'fs-extra'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/rev-parse-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
setupFixtureRepository,
setupEmptyRepository,
} from '../../helpers/repositories'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { mkdirSync } from '../../helpers/temp'
import { writeFile } from 'fs-extra'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/squash-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Repository } from '../../../src/models/repository'
import { setupEmptyRepositoryDefaultMain } from '../../helpers/repositories'
import { makeCommit } from '../../helpers/repository-scaffolding'
import { squash } from '../../../src/lib/git/squash'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { getStatusOrThrow } from '../../helpers/status'
import { getTempFilePath } from '../../../src/lib/file-system'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/stash-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as FSE from 'fs-extra'
import * as path from 'path'
import { Repository } from '../../../src/models/repository'
import { setupEmptyRepository } from '../../helpers/repositories'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import {
createDesktopStashMessage,
createDesktopStashEntry,
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/git/status-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path'
import * as FSE from 'fs-extra'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'

import { Repository } from '../../../src/models/repository'

Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/parse-files-to-be-overwritten-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { writeFile } from 'fs-extra'
import { join } from 'path'
import { git } from '../../src/lib/git'
import { cloneLocalRepository } from '../helpers/repository-scaffolding'
import { GitError as DugiteError } from 'dugite'
import { GitError as DugiteError } from '@shiftkey/dugite'
import { parseFilesToBeOverwritten } from '../../src/ui/lib/parse-files-to-be-overwritten'

describe('parseFilesToBeOverwritten', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/test/unit/text-diff-expansion-test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'path'
import * as os from 'os'
import * as FSE from 'fs-extra'
import { GitProcess } from 'dugite'
import { GitProcess } from '@shiftkey/dugite'
import { DiffParser } from '../../src/lib/diff-parser'
import {
expandTextDiffHunk,
Expand Down
Loading

0 comments on commit d0b8547

Please sign in to comment.