Skip to content

Commit 66fea10

Browse files
authored
Merge pull request #244 from edgardmessias/ignore_commit_pending_changes
Added config option to count pending changes (Close #237)
2 parents fe6e75c + 666013c commit 66fea10

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,12 @@
613613
"description": "Allow to count unversioned files in status count",
614614
"default": true
615615
},
616+
"svn.sourceControl.countIgnoreOnCommit": {
617+
"type": "boolean",
618+
"description":
619+
"Allow to count ignored files to commit in status count",
620+
"default": false
621+
},
616622
"svn.log.length": {
617623
"type": "number",
618624
"minimum": 1,

src/repository.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,16 @@ export class Repository {
508508
group.resourceStates = [];
509509
});
510510

511+
const counts = [this.changes, this.conflicts];
512+
513+
const countIgnoreOnCommit = configuration.get<boolean>(
514+
"sourceControl.countIgnoreOnCommit",
515+
false
516+
);
517+
const ignoreOnCommitList = configuration.get<string[]>(
518+
"sourceControl.ignoreOnCommit"
519+
);
520+
511521
changelists.forEach((resources, changelist) => {
512522
let group = this.changelists.get(changelist);
513523
if (!group) {
@@ -523,10 +533,11 @@ export class Repository {
523533
}
524534

525535
group.resourceStates = resources;
526-
});
527536

528-
// svnConfig.
529-
const counts = [this.changes, this.conflicts, ...this.changelists.values()];
537+
if (countIgnoreOnCommit && ignoreOnCommitList.includes(changelist)) {
538+
counts.push(group);
539+
}
540+
});
530541

531542
if (configuration.get<boolean>("sourceControl.countUnversioned", false)) {
532543
counts.push(this.unversioned);

0 commit comments

Comments
 (0)