We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--imply-local
1 parent f17af39 commit 84164f7Copy full SHA for 84164f7
lua/diffview/vcs/adapters/git/init.lua
@@ -1462,12 +1462,19 @@ end
1462
---@param head Rev
1463
---@return Rev, Rev
1464
function GitAdapter:imply_local(left, right, head)
1465
+ -- Special case when they both point to head: change only the right side in
1466
+ -- order to still get a meaningful rev range.
1467
+ if left.commit == head.commit and right.commit == head.commit then
1468
+ return left, GitRev(RevType.LOCAL)
1469
+ end
1470
+
1471
if left.commit == head.commit then
1472
left = GitRev(RevType.LOCAL)
1473
end
1474
if right.commit == head.commit then
1475
right = GitRev(RevType.LOCAL)
1476
1477
1478
return left, right
1479
1480
0 commit comments