summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-02-09completion: use __gitcomp_builtin in _git_show_branchLibravatar Nguyễn Thái Ngọc Duy1-6/+1
No new completable options! Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_rmLibravatar Nguyễn Thái Ngọc Duy2-2/+2
No new completable options! Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_revertLibravatar Nguyễn Thái Ngọc Duy1-5/+5
The new completable option is --gpg-sign In-progress options like --continue will be part of --git-completion-helper then filtered out by _git_revert() unless the operation is in progress. This helps keep marking of these operations in just one place. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_resetLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The new completable options are: --intent-to-add --quiet --recurse-submodules Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_replaceLibravatar Nguyễn Thái Ngọc Duy2-2/+3
The new completable option is --raw. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09remote: force completing --mirror= instead of --mirrorLibravatar Nguyễn Thái Ngọc Duy3-2/+8
"git remote --mirror" is a special case. Technically it is possible to specify --mirror without any argument. But we will get a "dangerous, deprecated!" warning in that case. This new parse-opt flag allows --git-completion-helper to always complete --mirror=, ignoring the dangerous use case. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_remoteLibravatar Nguyễn Thái Ngọc Duy1-8/+8
No new completable options! Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_pushLibravatar Nguyễn Thái Ngọc Duy2-7/+2
The new completable options are: --atomic --exec= --ipv4 --ipv6 --no-verify --porcelain --progress --push-option --signed Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_pullLibravatar Nguyễn Thái Ngọc Duy1-20/+5
This is really nice. Since pull_options[] already declares all passthru options to 'merge' or 'fetch', a single git pull --git-completion-helper would provide all completable options (--no- variants are a separate issue). Dead shell variables can now be deleted. New completable options are: --allow-unrelated-histories --ipv4 --ipv6 --jobs --refmap= --signoff --strategy-option= Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_notesLibravatar Nguyễn Thái Ngọc Duy2-8/+10
The new completable options are: --allow-empty (notes add and notes append) --for-rewrite= (notes copy) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_name_revLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The new completable options are: --always --exclude --name-only --refs --undefined Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_mvLibravatar Nguyễn Thái Ngọc Duy2-2/+3
The new completable option is --verbose. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_merge_baseLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The new completion option is --all. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_mergeLibravatar Nguyễn Thái Ngọc Duy1-2/+7
New completable options are: --allow-unrelated-histories --message= --overwrite-ignore --signoff --strategy-option= --summary --verify The variable $__git_merge_options remains because _git_pull() still needs it. It will soon be gone after _git_pull() is updated. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_ls_remoteLibravatar Nguyễn Thái Ngọc Duy2-3/+4
The new completable options are --quiet and --upload-pack=. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_ls_filesLibravatar Nguyễn Thái Ngọc Duy1-7/+1
The new completable options are: --debug --empty-directory --eol --recurse-submodules --resolve-undo Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_initLibravatar Nguyễn Thái Ngọc Duy1-1/+1
The new completable option is --separate-git-dir=. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_helpLibravatar Nguyễn Thái Ngọc Duy1-1/+1
No new completable options! Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_grepLibravatar Nguyễn Thái Ngọc Duy2-20/+9
The new completable options are: --after-context= --before-context= --color --context --exclude-standard --quiet --recurse-submodules --textconv Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_gcLibravatar Nguyễn Thái Ngọc Duy2-3/+6
The new completable option is --quiet. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_fsckLibravatar Nguyễn Thái Ngọc Duy1-4/+1
The new completable options are: --connectivity-only --dangling --progress --reflogs Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_fetchLibravatar Nguyễn Thái Ngọc Duy1-1/+1
New completable options: --deepen= --ipv4 --ipv6 --jobs= --multiple --progress --refmap= --shallow-exclude= --shallow-since= --update-head-ok Since _git_pull() needs fetch options too, $__git_fetch_options remains. This variable will soon be gone after _git_pull() is updated. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_difftoolLibravatar Nguyễn Thái Ngọc Duy1-6/+6
Since we can't automatically extract diff options for completion yet, difftool will take all options from $__git_diff_common_options. This brings _a lot_ more completable options to difftool. --ignore-submodules is added to $__git_diff_common_options to avoid regression in difftool. But it's a good thing anyway even for other diff commands. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_describeLibravatar Nguyễn Thái Ngọc Duy1-5/+1
No new completable options! Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_configLibravatar Nguyễn Thái Ngọc Duy1-8/+1
The new completable options are: --blob= --bool --bool-or-int --edit --expiry-date --get-color --get-colorbool --get-urlmatch --includes --int --null --path --show-origin Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_commitLibravatar Nguyễn Thái Ngọc Duy1-10/+1
The new comletable options are: --branch --gpg-sign --long --no-post-rewrite --null --porcelain --status --allow-empty is no longer completable because it's a hidden option since 4741edd549 (Remove deprecated OPTION_BOOLEAN for parsing arguments - 2013-08-03) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_cloneLibravatar Nguyễn Thái Ngọc Duy1-20/+1
The new completable options are: --config --dissociate --ipv4 --ipv6 --jobs= --progress --reference-if-able --separate-git-dir= --shallow-exclude --shallow-since= --verbose Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_cleanLibravatar Nguyễn Thái Ngọc Duy2-2/+2
The new completable options are --exclude and --interactive Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_cherry_pickLibravatar Nguyễn Thái Ngọc Duy1-2/+5
The new completable options are: --allow-empty --allow-empty-message --ff --gpg-sign --keep-redundant-commits --strategy-option In-progress options like --continue will be part of --git-completion-helper then filtered out by _git_cherry_pick() unless the operation is in progress. This helps keep marking of these operations in just one place. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_checkoutLibravatar Nguyễn Thái Ngọc Duy3-12/+13
The new completable options are: --ignore-other-worktrees --progress Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_branchLibravatar Nguyễn Thái Ngọc Duy2-7/+3
The new completable options are: --all --create-reflog --format= --ignore-case --quiet Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_applyLibravatar Nguyễn Thái Ngọc Duy2-10/+4
The new completable options are: --3way --allow-overlap --build-fake-ancestor= --directory --exclude --include --index-info is no longer completable but that's because it's renamed to --build-fake-ancestor in 26b2800768 (apply: get rid of --index-info in favor of --build-fake-ancestor - 2007-09-17) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_amLibravatar Nguyễn Thái Ngọc Duy3-10/+8
The new completable options are: --directory --exclude --gpg-sign --include --keep-cr --keep-non-patch --message-id --no-keep-cr --patch-format --quiet --reject --resolvemsg= In-progress options like --continue will be part of --git-completion-helper then filtered out by _git_am() unless the operation is in progress. This helps keep marking of these operations in just one place. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09completion: use __gitcomp_builtin in _git_addLibravatar Nguyễn Thái Ngọc Duy1-4/+1
The new completable options are --all --ignore-missing --ignore-removal --renormalize --verbose Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09git-completion.bash: introduce __gitcomp_builtinLibravatar Nguyễn Thái Ngọc Duy1-0/+33
This is a __gitcomp wrapper that will execute git ... --git-completion-helper to get the list of completable options. The call will be made only once and cached to avoid performance issues, especially on Windows. __gitcomp_builtin() allows callers to change its output a bit by adding some more options, or removing some. - Current --git-completion-helper for example does not output --no-foo form, this has to be added manually by __gitcomp_builtin() callers when necessary - Some options from --git-completion-helper should only be available in certain conditions (e.g. --continue and friends). __gitcomp_builtin() callers can remove them if the conditions are not met. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09parse-options: let OPT__FORCE take optional flags argumentLibravatar Nguyễn Thái Ngọc Duy14-15/+17
--force option is most likely hidden from command line completion for safety reasons. This is done by adding an extra flag PARSE_OPT_NOCOMPLETE. Update OPT__FORCE() to accept additional flags. Actual flag change comes later depending on individual commands. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09parse-options: add OPT_xxx_F() variantsLibravatar Nguyễn Thái Ngọc Duy1-7/+12
These macros allow us to add extra parse-options flag, the main one in my mind is PARSE_OPT_NOCOMPLETE to hide certain options from --git-completion-helper. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-09parse-options: support --git-completion-helperLibravatar Nguyễn Thái Ngọc Duy2-1/+48
This option is designed to be used by git-completion.bash. For many simple cases, what we do in there is usually __gitcomp "lots of completion options" which has to be manually updated when a new user-visible option is added. With support from parse-options, we can write __gitcomp "$(git command --git-completion-helper)" and get that list directly from the parser for free. Dangerous/Unpopular options could be hidden with the new "NOCOMPLETE" flag. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-23First batch after 2.16Libravatar Junio C Hamano1-0/+65
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-23Merge branch 'nd/add-i-ignore-submodules'Libravatar Junio C Hamano2-1/+49
"git add -p" was taught to ignore local changes to submodules as they do not interfere with the partial addition of regular changes anyway. * nd/add-i-ignore-submodules: add--interactive: ignore submodule changes except HEAD
2018-01-23Merge branch 'mm/send-email-fallback-to-local-mail-address'Libravatar Junio C Hamano7-166/+321
Instead of maintaining home-grown email address parsing code, ship a copy of reasonably recent Mail::Address to be used as a fallback in 'git send-email' when the platform lacks it. * mm/send-email-fallback-to-local-mail-address: send-email: add test for Linux's get_maintainer.pl perl/Git: remove now useless email-address parsing code send-email: add and use a local copy of Mail::Address
2018-01-23Merge branch 'ab/doc-cat-file-e-still-shows-errors'Libravatar Junio C Hamano1-3/+4
Doc update. * ab/doc-cat-file-e-still-shows-errors: cat-file doc: document that -e will return some output
2018-01-23Merge branch 'as/read-tree-prefix-doc-fix'Libravatar Junio C Hamano1-3/+2
Doc update. * as/read-tree-prefix-doc-fix: doc/read-tree: remove obsolete remark
2018-01-23Merge branch 'ys/bisect-object-id-missing-conversion-fix'Libravatar Junio C Hamano1-3/+3
Fix for a commented-out code to adjust it to a rather old API change. * ys/bisect-object-id-missing-conversion-fix: bisect: debug: convert struct object to object_id
2018-01-23Merge branch 'tg/stash-with-pathspec-fix'Libravatar Junio C Hamano2-3/+34
"git stash -- <pathspec>" incorrectly blew away untracked files in the directory that matched the pathspec, which has been corrected. * tg/stash-with-pathspec-fix: stash: don't delete untracked files that match pathspec
2018-01-23Merge branch 'sb/submodule-update-reset-fix'Libravatar Junio C Hamano3-3/+23
When resetting the working tree files recursively, the working tree of submodules are now also reset to match. * sb/submodule-update-reset-fix: submodule: submodule_move_head omits old argument in forced case unpack-trees: oneway_merge to update submodules t/lib-submodule-update.sh: fix test ignoring ignored files in submodules t/lib-submodule-update.sh: clarify test
2018-01-23Merge branch 'bw/oidmap-autoinit'Libravatar Junio C Hamano1-0/+11
Code clean-up. * bw/oidmap-autoinit: oidmap: ensure map is initialized
2018-01-23Merge branch 'ab/commit-m-with-fixup'Libravatar Junio C Hamano3-4/+15
"git commit --fixup" did not allow "-m<message>" option to be used at the same time; allow it to annotate resulting commit with more text. * ab/commit-m-with-fixup: commit: add support for --fixup <commit> -m"<extra message>" commit doc: document that -c, -C, -F and --fixup with -m error
2018-01-23Merge branch 'cc/codespeed'Libravatar Junio C Hamano2-54/+137
"perf" test output can be sent to codespeed server. * cc/codespeed: perf/run: read GIT_PERF_REPO_NAME from perf.repoName perf/run: learn to send output to codespeed server perf/run: learn about perf.codespeedOutput perf/run: add conf_opts argument to get_var_from_env_or_config() perf/aggregate: implement codespeed JSON output perf/aggregate: refactor printing results perf/aggregate: fix checking ENV{GIT_PERF_SUBSECTION}
2018-01-23Merge branch 'ab/perf-grep-threads'Libravatar Junio C Hamano2-21/+86
More perf tests for threaded grep * ab/perf-grep-threads: perf: amend the grep tests to test grep.threads