Skip to content

Commit

Permalink
fix: git log should explicitly separate branch from paths (#5911)
Browse files Browse the repository at this point in the history
  • Loading branch information
CDN18 committed Dec 2, 2022
1 parent 143c6db commit 73af37b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/modules/storage/git/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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) {
Expand Down

0 comments on commit 73af37b

Please sign in to comment.