-
-
Notifications
You must be signed in to change notification settings - Fork 606
add commit count to :GFiles to restrict to last <count> commits #1606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Unfortunately, in its current form, matchit is not able to support Python's `if` syntax. It expects there to be a reliable "end" pattern, whereas Python allows either `elif` and `else` to be the final keyword (which zero or more `elif`s in between). Given that, remove this partial support until its possible to implement a more complete solution.
|
Glad to see you generalizing this in junegunn/fzf-git.sh#104
I agree that there's only so much one can restrict to given a single number (though often the more recent commits are usually the ones one is most concerned with); so it came to my mind that Vim allows for more general contiguous ranges. Would a range |
|
Thanks.
I'm not sure. The commits can be non-contiguous? It feels like we might be trying to overload the Defining a command that does what the suggested command! -nargs=1 GDT call fzf#run(fzf#wrap({
\ 'source': printf("git diff-tree --no-commit-id --name-only -r 'HEAD~%d..HEAD'", <q-args>),
\ 'options': ['--multi', '--preview', printf('git diff --color=always "HEAD~%d..HEAD" -- {}', <q-args>)]})) |
Maybe, but at least with a
I had that feeling for
Wow, that's indeed much simpler than my involved snippet (@jparise might be interested as well). I will try to package it into a command taking the |
Oh, I mean, there can be cases where the user might want to see the list of modified files from non-continguous commits, which is supported in junegunn/fzf-git.sh#104. e.g.
Right. Probably not the best decision I made :) |
Let
:GFilestake a count to restrict to those files altered in last commits.Count 0 corresponds to
:GFiles?kept for backwards compatibility.Builds in this snippet