Added config.worktrees.
Array of tables with the keys 'gitdir' and 'toplevel'.
If attaching normally fails, then each entry in the table is attempted.
Example:
worktrees = {
{
toplevel = vim.env.HOME,
gitdir = vim.env.HOME .. '/projects/dotfiles/.git'
}
}
Resolves#397
Setting GitSignsDeleteLn to anything by default doesn't make much sense
since it ends up highlighting lines not related to the hunk. This is
especially confusing when show_deleted is enabled.
+ Fix incorrect docs.
Fixes#565
- config.current_line_blame_formatter can now be specified as a format
string.
- changed default of `config.current_line_blame_formatter` to
'<author>, <author_time:%R> - <summary>' which is equivalent to the
previous function default.
- deprecated config.current_line_blame_formatter_opts
Resolves#291
- Added GitSigns*Inline and GitSigns*LnInline to be used with word diff
- GitSigns*LnInline is used for word diff with config.word_diff
- GitSigns*Inline is used for word diff in hunk previews
- Added GitSigns*VirtLn and GitSigns*VirtLnInline to be used with
`config.show_deleted`.
- Define GitSigns highlights conditionally as opposed to only defining
them if certain features are enabled.
When blaming a line on a file, which as the "dos" fileformat
which is also checked in as a "dos" format including the
carriage returns, gitsigns.nvim currently reports
"Not yet commited" caused by an unsucessfull blame call
to git.
This commit fixes that behavior by appending the carriage
return lines again
Add deprecations to doc.
When fields are now initially deprecated, no warning messages will be
displayed. However if a deprecated field is marked with hard, then a
warning will be issued.
At the beginning of each release cycle, all deprecated fields will be
marked as hard and fields that were already marked as hard will be
removed.
Some git command likes `git checkout -b` do no update .git/index.
Instead watch the git dir itself to capture all git operations.
Renamed config.watch_index -> config.watch_gitdir
Fixes#377
Speculative signs are added immediately whereas updates are debounced
and throttled for each buffer. If we perform two quick updates which
result in a sign begin added then removed, we need to make sure
speculative signs don't incorrectly persist. Example:
-> buffer change
- speculative signs (#1)
- update (#1)
-> undo (quickly after buffer change)
- speculative signs (#2)
- update (#2)
Update #1 is dropped due to the debounce which results in update #2 not
updating signs due to the hunks not changing. Since signs are never
updated, the speculative signs #1 and #2 will persist.
To get around this, we just need to invalidate the hunks to force a sign
refresh.
- Callback to set keymaps (instead of config.keymaps) and to control
whether to attach to a buffer.
- Documented how extended table configuation fields work.
- Removed non-buffer mappings and `buffer=true` from the default.
Resolves#155
This allow users to run `lua require"gitsigns".stage_buffer()` to stage
all changes in a buffer and `lua require"gitsigns".reset_buffer_index()` to
unstage all changes in a buffer.
Added `ensure_file_in_index` to make sure files are tracked before
staging hunks.
Added `clear_status` to status, to clear only modifications (added,
changed, removed)
Added tests for `stage_buffer` and `reset_buffer_index`
Closes: #127
- Expose 'use_internal_diff' in the config and default to to true if
luajit is present.
- Change 'use_decoration_api' default to true
- Reduce default for 'update_debounce' from 200ms to 100ms.