Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 5 additions & 2 deletions src/cmd/commit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ const commitAndPush = async (gitConfig: GitRepoConfig, initialInstall = false):
const filesChangedCount = statusOutput.split('\n').length - 1
if (filesChangedCount === 0) {
d.log('Nothing to commit')
return
if (!initialInstall) {
return
}
} else {
await $git`git commit -m ${message} --no-verify`.quiet()
}
await $git`git commit -m ${message} --no-verify`.quiet()
} catch (e) {
const errorMsg = `commitAndPush error: ${e?.message?.replace(password, '****')}`
d.error(errorMsg)
Expand Down
6 changes: 3 additions & 3 deletions src/common/git-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export function getAuthUrlFromGitConfig(credentials: Partial<GitConfigData>): st
}
const url = new URL(repoUrl)
if (username) {
url.username = username
url.password = password
url.username = encodeURIComponent(username)
url.password = encodeURIComponent(password)
} else {
url.username = password
url.username = encodeURIComponent(password)
url.password = ''
}
return url.toString()
Expand Down
Loading