-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Hi, awesome plugin, exactly what I personally need.
Unfortunately when I run diff_commit_file
or search_log_content_file
when there is no diff to be shown, I get these errors:
:AdvancedGitSearch search_log_content_file
fatal: ambiguous argument '39f498e~': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
[Process exited 128]

:AdvancedGitSearch diff_commit_file
fatal: bad revision '39f498e~'
[Process exited 128]
Reproduce
- Create a new folder, let's say `bufcommits
- Run
touch a.txt b.txt
git add a.txt b.txt && commit -m 'added a.txt and b.txt'
echo test > b.txt && commit -m 'added test into b.txt'
- Open nvim via
nvim a.txt
- Run any of the commands
:AdvancedGitSearch
withdiff_commit_file
orsearch_log_content_file
Cause
As I mentioned before, the problem is solely because there is no contents thus no diff to be shown. Is this something you can handle to make it a little bit nicer rather than an error?
Here's what the contents look like when there is a diff:

And here's what it looks like without changes:

Metadata
Metadata
Assignees
Labels
No labels