Skip to content

Bug: git_bcommits does not display a file’s only commit #2205

@k33nice

Description

@k33nice

RTFM Checklist

  • I have searched exisiting issues / discussions
  • I have read the Wiki including the Advanced section
  • I have read man fzf / I am well versed in shell fzf

Operating system

Mac

Shell

zsh

Neovim version (nvim --version)

NVIM v0.11.1

Fzf version (fzf --version)

0.60.2

Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))

--bind alt-a:select-all,alt-k:preview-up,alt-j:preview-down

Is the problem reproducible with mini.sh?

  • My issue is reproducible with mini.sh
  • My issue IS NOT reproducible with mini.sh
  • I have not tested with mini.sh (not relevant, requires LSP, Windows, etc)

Fzf-lua configuration

require('fzf-lua').setup({
})

Describe the bug / steps to reproduce

When running git_bcommits, any file with exactly one commit in its history does not display that commit in the list.

To Reproduce

  1. In a new repo, create and commit a file:

    git init
    echo "hello world" > single.txt
    git add single.txt
    git commit -m "Initial add of single.txt"
  2. Open single.txt

  3. Run

:FzfLua git_bcommits

Expected behavior

git_bcommits should list all, including the very first (and only) commit.

Actual behavior

No entries are shown for files whose history contains a single commit.

This bug first appeared in commit c7b72ea (identified via git bisect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions