Skip to content

Commit

Permalink
[web] - fix merge branch compare (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Matusevich authored Oct 19, 2023
1 parent 79d9bb5 commit 1e94266
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions react-gosh/src/hooks/repo.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,10 @@ function _useMergeRequest(
MAX_PARALLEL_READ,
async (treepath, index) => {
const { src, dst } = treepath
const srcFullPath = `${src.treeitem.commit}/${src.path}`
const srcFullPath =
srcRepo.getVersion() < '6.0.0'
? `${srcBranch.name}/${src.path}`
: `${src.treeitem.commit}/${src.path}`
const _srcSnapshot = await srcRepo._getSnapshot({
fullpath: srcFullPath,
})
Expand All @@ -1071,7 +1074,10 @@ function _useMergeRequest(
)
const srcContent = srcBlob.current

const dstFullPath = `${dst.treeitem?.commit}/${dst.path}`
const dstFullPath =
dstRepo.getVersion() < '6.0.0'
? `${dstBranch.name}/${dst.path}`
: `${dst.treeitem?.commit}/${dst.path}`
let dstContent: string | Buffer = ''
if (dst.path) {
const _dstSnapshot = await dstRepo._getSnapshot({
Expand Down

0 comments on commit 1e94266

Please sign in to comment.