Skip to content

Commit

Permalink
Issue2 (#26)
Browse files Browse the repository at this point in the history
* Fixes issue2

* Fixes issue 2
  • Loading branch information
mmmyr authored Jun 21, 2023
1 parent e96cd1b commit 69e22a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
"type": "boolean",
"default": false,
"description": "When creating a new Backup Branch, do you want to commit the branch info file change. (This is useful for sharing across devices)"
},
"git-backup-sync.backupBranchNamePrefix": {
"type": "string",
"default": "gbs-backup-",
"description": "The prefix of backup branch name. This defaults to 'gbs-backup-' "
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ interface IConfig {
defaultBackupUpstreamName: string;
defaultAutoBackupBranches: boolean;
shouldCommitBranchInfoFile: boolean;
backupBranchNamePrefix: string;
}

class GitBackupSync {
Expand Down Expand Up @@ -194,7 +195,7 @@ class GitBackupSync {
this.showInformationMessage("Create Backup Branch cancelled");
return;
}
backupBranchName = (backupBranchName !== "") ? backupBranchName : "gbs-backup-" + currentBranchName;
backupBranchName = (backupBranchName !== "") ? backupBranchName : (this._config.backupBranchNamePrefix + currentBranchName);

let allBranches = (await this._git.branch()).branches;
let allBranchNames = new Set();
Expand Down

0 comments on commit 69e22a6

Please sign in to comment.