This fixes the double quote introduced by aa160fc8, so that the end result of
the parameter expansion is $pref followed by \* (a quoted star), meaning
`git ls-files` gets a literal star, not an expanded list of matching files, as
was intended in commit cc7437bf.
Fixes completion of `git add ../<TAB>`.
Before this patch "git branch -d master<tab>" would result in
"no matches found", while "master" itself should get completed here.
The "(bQ)" (added in 527badc23, via 38129?!) does not seem to be necessary
anymore: with files "f\[a-z\]o" and "foo", "git add f[a-z]o <tab>"
offers "f\[a-z\]o", but not "foo".
Currently `git show --stat -p` is not considered a valid completion and
prevents further completions like `--no-abbrev`.
It is a valid use case however to use `--stat` with `-p` (and there is a
synonym `--patch-with-stat` for it even).
This patch changes `__git_setup_diff_options` to only handle mutually
exclusive arguments reported by Git (as a fatal error) in a special way.
Without this "commit to be amended" shows up before "recent commit object
name" with `git commit --fixup`, but the recent commit objects are the
most useful here.
By replacing the --grep-reflog=needle argument with a ${(M)...:#needle} filter,
we retrieve less data from the reflog, and consequently run (on my test cases)
16% to 40% faster. The trade-off is that we retrieve less data: instead of
retrieving the 1000 most recent 'checkout' operations, we retrieve the most
recent 1000 operations, which would include fewer than 1000 checkout operations.
Also change [[:xdigit:]] to [0-9a-f] since it's faster, however, the absolute
gain from this is minor compared to the cost of 'git reflog'.
The unprefixed name of a remote branch is used to create a new local
remote-tracking branch; that is presumed to be a rarer operation than
either switching among local branches or reverting to the index version
of a modified file.
Between the remaining two, put modified files before tree-ishes because
there are generally few of the former and many of the latter.
The "$@" in the option-names call is added in order to propagate the new (-S =) arguments.
This bifurcates _git-config() in order to provide completion for
% git -c <TAB>
% git -c foo=<TAB>
In the reflog, partial ref names in the "from" field always represent names of
heads. (That is not true for the "to" field.) The parsing of tag names was
added in commit 39102 (317c96b64f) for equivalence
with the then-previous implementation which used `git log $partial_ref_name`.
The equivalence was correct, however, the then-previous implementation was not,
since it would consider $partial_ref_name as a refs/tags/ name if a refs/heads/
name did not exist.
With e.g. `git rebase origin/master` you can have options like
`--no-autosquash` after the argument.
I have tried the commands where this patch removes `-A`.
Commands like `git fetch-pack` that do not support options after
arguments are left unchanged.