Skip to content

Commit 87055e9

Browse files
committed
feat: show not a git repository message in the git panel
1 parent b6076a9 commit 87055e9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/extensions/default/Git/src/Panel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,8 @@ define(function (require, exports) {
904904
$gitPanel.find(".git-file-history").removeClass("active").attr("title", Strings.TOOLTIP_SHOW_FILE_HISTORY);
905905

906906
if (gitPanelMode === "not-repo") {
907-
$tableContainer.empty();
907+
$tableContainer.html($("<p class='git-edited-list nothing-to-commit'/>")
908+
.text(StringUtils.format(Strings.GIT_NOT_REPO_MESSAGE, Strings.GIT_INIT, Strings.GIT_CLONE)));
908909
return Promise.resolve();
909910
}
910911

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,6 +2233,7 @@ define({
22332233
"TOOLTIP_SHOW_HISTORY": "Show history",
22342234
"GIT_SHOW_FILE_HISTORY": "File Commit history",
22352235
"GIT_SHOW_HISTORY": "Commit history",
2236+
"GIT_NOT_REPO_MESSAGE": "This project is not a Git repository. Click the {0} button to create a new repository here, or {1} to download an existing one.",
22362237
"GIT_HISTORY_NOTHING_TO_SHOW": "No commits yet. Committed changes will show up here.",
22372238
"GIT_FILE_HISTORY_NOTHING_TO_SHOW": "There is no commit history for this file yet.",
22382239
"GIT_FILE_HISTORY_OPEN_A_FILE": "Open a file in the editor to see its commit history.",

0 commit comments

Comments
 (0)