olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git branching error

olimorris opened this issue · comments

commented

I've noticed that if I have a repository with a package.json file with no license, then persisted stores the git branch name as:

warning package.json: No license field

This is because when the get_branch() function is called and currently it picks up the second line of output from the git rev-parse --abbrev-ref HEAD command, which is the warning message. The plugin should actually pick up the last line from the output.