Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ export async function activate(context: vscode.ExtensionContext) {
const gitLog = await fetchGitLogInParallel(gitPath, currentWorkspacePath);
console.timeEnd('Multi log')

// console.time('Single log')
// const testGitLog = await getGitLog(gitPath, currentWorkspacePath);
// console.timeEnd('Single log')


const gitConfig = await getGitConfig(gitPath, currentWorkspacePath, "origin");

Expand Down
3 changes: 2 additions & 1 deletion packages/vscode/src/utils/git.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export async function getGitLog(gitPath: string, currentWorkspacePath: string):
}

export async function getLogCount(gitPath: string, currentWorkspacePath: string): Promise<number> {
const decimal = 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변수의 이름은 변수의 실제 역할로 표현하는 것이 좋을 것 같습니다.
여기서는 값을 뜻하는 decimal 보다는
10이 어떤 역할을 하는 변수인지 표현하면 더 좋겠네요!

return new Promise((resolve, reject) => {
const args = [
"rev-list",
Expand All @@ -204,7 +205,7 @@ export async function getLogCount(gitPath: string, currentWorkspacePath: string)
const { code, error } = status;

if (code === 0 && !error) {
const commitCount = parseInt(stdout.toString().trim(), 10); // Buffer를 문자열로 변환 후 숫자로 변환
const commitCount = parseInt(stdout.toString().trim(), decimal); // Buffer를 문자열로 변환 후 숫자로 변환
resolve(commitCount); // 숫자를 반환
} else {
reject(stderr);
Expand Down
1 change: 0 additions & 1 deletion packages/vscode/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const extensionConfig = {
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, "dist"),
// filename: "extension.js",
filename: "[name].js",
libraryTarget: "commonjs2",
},
Expand Down