Skip to content

Commit 73271db

Browse files
committed
fix(git): Make stage revs default to stage 0. (fixes #259)
1 parent 36c8813 commit 73271db

File tree

1 file changed

+4
-0
lines changed
  • lua/diffview/vcs/adapters/git

1 file changed

+4
-0
lines changed

lua/diffview/vcs/adapters/git/rev.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ function GitRev:init(rev_type, revision, track_head)
4343
---@cast revision number
4444
self.stage = revision
4545
end
46+
47+
if self.type == RevType.STAGE and not self.stage then
48+
self.stage = 0
49+
end
4650
end
4751

4852
---@param name string

0 commit comments

Comments
 (0)