Skip to content

Commit b810cce

Browse files
committed
Ensures rebase-apply is watched
1 parent 06a026c commit b810cce

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/git/models/repository.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ const millisecondsPerMinute = 60 * 1000;
4242
const millisecondsPerHour = 60 * 60 * 1000;
4343
const millisecondsPerDay = 24 * 60 * 60 * 1000;
4444

45-
const dotGitWatcherGlobFiles = 'index,HEAD,*_HEAD,MERGE_*,rebase-merge/**,sequencer/**';
45+
const dotGitWatcherGlobFiles = 'index,HEAD,*_HEAD,MERGE_*,rebase-apply/**,rebase-merge/**,sequencer/**';
4646
const dotGitWatcherGlobWorktreeFiles =
47-
'worktrees/*,worktrees/**/index,worktrees/**/HEAD,worktrees/**/*_HEAD,worktrees/**/MERGE_*,worktrees/**/rebase-merge/**,worktrees/**/sequencer/**';
47+
'worktrees/*,worktrees/**/index,worktrees/**/HEAD,worktrees/**/*_HEAD,worktrees/**/MERGE_*,worktrees/**/rebase-merge/**,worktrees/**/rebase-apply/**,worktrees/**/sequencer/**';
4848

4949
const dotGitWatcherGlobRoot = `{${dotGitWatcherGlobFiles}}`;
5050
const dotGitWatcherGlobCommon = `{config,refs/**,${dotGitWatcherGlobWorktreeFiles}}`;
@@ -454,7 +454,7 @@ export class Repository implements Disposable {
454454

455455
@debug()
456456
private onRepositoryChanged(uri: Uri | undefined, base: Uri, _reason: 'create' | 'change' | 'delete') {
457-
// TODO@eamodio Revisit -- as I can't seem to get this to work as a negative glob pattern match when creating the watcher
457+
// VS Code won't work with negative glob pattern match when creating the watcher, so we have to ignore it here
458458
if (uri?.path.includes('/fsmonitor--daemon/')) {
459459
return;
460460
}
@@ -467,7 +467,7 @@ export class Repository implements Disposable {
467467
const match =
468468
uri != null
469469
? // Move worktrees first, since if it is in a worktree it isn't affecting this repo directly
470-
/(worktrees|index|HEAD|FETCH_HEAD|ORIG_HEAD|CHERRY_PICK_HEAD|MERGE_HEAD|REBASE_HEAD|rebase-merge|REVERT_HEAD|config|refs\/(?:heads|remotes|stash|tags))/.exec(
470+
/(worktrees|index|HEAD|FETCH_HEAD|ORIG_HEAD|CHERRY_PICK_HEAD|MERGE_HEAD|REBASE_HEAD|rebase-merge|rebase-apply|REVERT_HEAD|config|refs\/(?:heads|remotes|stash|tags))/.exec(
471471
this.container.git.getRelativePath(uri, base),
472472
)
473473
: undefined;
@@ -504,6 +504,7 @@ export class Repository implements Disposable {
504504

505505
case 'REBASE_HEAD':
506506
case 'rebase-merge':
507+
case 'rebase-apply':
507508
this.fireChange(RepositoryChange.Rebase, RepositoryChange.PausedOperationStatus);
508509
return;
509510

0 commit comments

Comments
 (0)