Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f11cb4c

Browse files
author
Michelle Tilley
authored
Merge pull request atom#1238 from atom/mkt-if-the-repos-rockin-dont-come-a-lockin
Never lock the index
2 parents caaeeba + 34f9250 commit f11cb4c

File tree

6 files changed

+706
-207
lines changed

6 files changed

+706
-207
lines changed

lib/deferred-callback-queue.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

lib/git-shell-out-strategy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export default class GitShellOutStrategy {
119119
const env = {
120120
...process.env,
121121
GIT_TERMINAL_PROMPT: '0',
122+
GIT_OPTIONAL_LOCKS: '0',
122123
PATH: pathParts.join(path.delimiter),
123124
};
124125

lib/models/workdir-context.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import {Emitter, CompositeDisposable, Disposable} from 'event-kit';
1+
import {Emitter, CompositeDisposable} from 'event-kit';
22
import {autobind} from 'core-decorators';
33

4-
import DeferredCallbackQueue from '../deferred-callback-queue';
54
import Repository from './repository';
65
import ResolutionProgress from './conflicts/resolution-progress';
76
import FileSystemChangeObserver from './file-system-change-observer';
@@ -41,9 +40,6 @@ export default class WorkdirContext {
4140
? new WorkspaceChangeObserver(theWindow, workspace, this.repository)
4241
: new FileSystemChangeObserver(this.repository);
4342
this.resolutionProgress = new ResolutionProgress();
44-
this.deferredCallbackQueue = new DeferredCallbackQueue(3000, collection => {
45-
this.repository.observeFilesystemChange(collection);
46-
});
4743

4844
if (promptCallback) {
4945
this.repository.setPromptCallback(promptCallback);
@@ -53,10 +49,9 @@ export default class WorkdirContext {
5349
this.subs.add(this.repository.onDidChangeState(this.repositoryChangedState));
5450
this.subs.add(this.observer.onDidChange(events => {
5551
const paths = events.map(e => e.special || e.path);
56-
this.deferredCallbackQueue.push(...paths);
52+
this.repository.observeFilesystemChange(paths);
5753
}));
5854
this.subs.add(this.observer.onDidChangeWorkdirOrHead(() => this.emitter.emit('did-change-workdir-or-head')));
59-
this.subs.add(new Disposable(() => this.deferredCallbackQueue.destroy()));
6055

6156
// If a pre-loaded Repository was provided, broadcast an initial state change event.
6257
this.repositoryChangedState({from: null, to: this.repository.state});

0 commit comments

Comments
 (0)