Skip to content

Commit 18d88c8

Browse files
committed
feat(file-history): Automatically disable --follow for line tracing
'--follow' is not compatible with '-L'. It should be implicitly disabled in the presence of the '-L' flag when instantiating a new history view.
1 parent e45aaf8 commit 18d88c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/diffview/vcs/adapters/git/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ function GitAdapter:file_history_options(range, paths, args)
694694
}
695695
end
696696

697+
if log_options.L and next(log_options.L) then
698+
log_options.follow = false -- '--follow' is not compatible with '-L'
699+
end
700+
697701
log_options.path_args = paths
698702

699703
local ok, opt_description = self:file_history_dry_run(log_options)

0 commit comments

Comments
 (0)