You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mhutchie#479 New Repository Dropdown Order option "Workspace Full Path", that sorts repositories according to the workspace folder order, then alphabetically by the full path of the repository. This is the new default order.
Copy file name to clipboardExpand all lines: package.json
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1068,13 +1068,15 @@
1068
1068
"type": "string",
1069
1069
"enum": [
1070
1070
"Full Path",
1071
-
"Name"
1071
+
"Name",
1072
+
"Workspace Full Path"
1072
1073
],
1073
1074
"enumDescriptions": [
1074
1075
"Sort repositories alphabetically by the full path of the repository.",
1075
-
"Sort repositories alphabetically by the name of the repository."
1076
+
"Sort repositories alphabetically by the name of the repository.",
1077
+
"Sort repositories according to the workspace folder order, then alphabetically by the full path of the repository."
1076
1078
],
1077
-
"default": "Full Path",
1079
+
"default": "Workspace Full Path",
1078
1080
"description": "Specifies the order that repositories are sorted in the repository dropdown on the Git Graph View (only visible when more than one repository exists in the current Visual Studio Code Workspace)."
exportconstUNABLE_TO_FIND_GIT_MSG='Unable to find a Git executable. Either: Set the Visual Studio Code Setting "git.path" to the path and filename of an existing Git executable, or install Git and restart Visual Studio Code.';
@@ -210,15 +210,41 @@ export function getNonce() {
210
210
* @returns The short name.
211
211
*/
212
212
exportfunctiongetRepoName(path: string){
213
-
letfirstSep=path.indexOf('/');
213
+
constfirstSep=path.indexOf('/');
214
214
if(firstSep===path.length-1||firstSep===-1){
215
215
returnpath;// Path has no slashes, or a single trailing slash ==> use the path
216
216
}else{
217
-
letp=path.endsWith('/') ? path.substring(0,path.length-1) : path;// Remove trailing slash if it exists
217
+
constp=path.endsWith('/') ? path.substring(0,path.length-1) : path;// Remove trailing slash if it exists
218
218
returnp.substring(p.lastIndexOf('/')+1);
219
219
}
220
220
}
221
221
222
+
/**
223
+
* Get a sorted list of repository paths from a given GitRepoSet.
224
+
* @param repos The set of repositories.
225
+
* @param order The order to sort the repositories.
0 commit comments