mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 06:22:28 +03:00
Fix another remote line bug in the commit graph
This commit is contained in:
parent
850c8119e4
commit
71aeb9a285
@ -49,12 +49,18 @@
|
|||||||
let baseIsUnfolded = false;
|
let baseIsUnfolded = false;
|
||||||
|
|
||||||
function getRemoteOutType(commit: Commit): CommitStatus | undefined {
|
function getRemoteOutType(commit: Commit): CommitStatus | undefined {
|
||||||
let parent = commit.parent;
|
if (!hasShadowedCommits) {
|
||||||
let upstreamCommit = commit.relatedTo;
|
const childStatus = commit.children?.[0]?.status;
|
||||||
|
return childStatus != 'local' ? childStatus : undefined;
|
||||||
|
}
|
||||||
|
|
||||||
while (!upstreamCommit && parent) {
|
// TODO: Consider introducing `relatedParent` and `relatedChildren`
|
||||||
parent = parent.parent;
|
let upstreamCommit = commit.relatedTo;
|
||||||
upstreamCommit = parent?.relatedTo;
|
let pointer: Commit | undefined = commit;
|
||||||
|
|
||||||
|
while (!upstreamCommit && pointer) {
|
||||||
|
pointer = pointer.parent;
|
||||||
|
upstreamCommit = pointer?.relatedTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!upstreamCommit) return hasUnknownCommits ? 'upstream' : undefined;
|
if (!upstreamCommit) return hasUnknownCommits ? 'upstream' : undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user