Browse Source
fix: git log should explicitly separate branch from paths (#5911)
pull/5744/head
CDN
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
server/modules/storage/git/storage.js
|
|
@ -118,7 +118,7 @@ module.exports = { |
|
|
|
* SYNC |
|
|
|
*/ |
|
|
|
async sync() { |
|
|
|
const currentCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch]), 'latest', {}) |
|
|
|
const currentCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch, '--']), 'latest', {}) |
|
|
|
|
|
|
|
const rootUser = await WIKI.models.users.getRootUser() |
|
|
|
|
|
|
@ -140,7 +140,7 @@ module.exports = { |
|
|
|
|
|
|
|
// Process Changes
|
|
|
|
if (_.includes(['sync', 'pull'], this.mode)) { |
|
|
|
const latestCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch]), 'latest', {}) |
|
|
|
const latestCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch, '--']), 'latest', {}) |
|
|
|
|
|
|
|
const diff = await this.git.diffSummary(['-M', currentCommitLog.hash, latestCommitLog.hash]) |
|
|
|
if (_.get(diff, 'files', []).length > 0) { |
|
|
|