Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-26Merge branch 'fc/bash-completion-alias-of-alias'Junio C Hamano
The command line completion script (in contrib/) learned to expand commands that are alias of alias. * fc/bash-completion-alias-of-alias: completion: bash: improve alias loop detection completion: bash: check for alias loop completion: bash: support recursive aliases
2020-11-17completion: bash: improve alias loop detectionFelipe Contreras
It is possible for the name of an alias to end with the name of another alias, in which case the code will incorrectly detect a loop. We can fix that by adding an extra space between words. Suggested-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-12Merge branch 'sd/prompt-local-variable'Junio C Hamano
Code clean-up. * sd/prompt-local-variable: git-prompt.sh: localize `option` in __git_ps1_show_upstream
2020-11-10completion: bash: check for alias loopFelipe Contreras
We don't want to be stuck in an endless cycle. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-10completion: bash: support recursive aliasesFelipe Contreras
It is possible to have recursive aliases like: l = log --oneline lg = l --graph So the completion should detect such aliases as well. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-10Merge branch 'fc/zsh-completion'Junio C Hamano
Zsh autocompletion (in contrib/) update. * fc/zsh-completion: (29 commits) zsh: update copyright notices completion: bash: remove old compat wrappers completion: bash: cleanup cygwin check completion: bash: trivial cleanup completion: zsh: add simple version check completion: zsh: trivial simplification completion: zsh: add alias descriptions completion: zsh: improve command tags completion: zsh: refactor command completion completion: zsh: shuffle functions around completion: zsh: simplify file_direct completion: zsh: simplify nl_append completion: zsh: trivial cleanup completion: zsh: simplify direct compadd completion: zsh: simplify compadd functions completion: zsh: fix splitting of words completion: zsh: add missing direct_append completion: fix conflict with bashcomp completion: zsh: fix completion for --no-.. options completion: bash: remove zsh wrapper ...
2020-11-03Merge branch 'lo/zsh-completion'Junio C Hamano
Update instructions for command line completion (in contrib/) for zsh. * lo/zsh-completion: completion: fix zsh installation instructions
2020-11-03Merge branch 'dl/diff-merge-base'Junio C Hamano
"git diff A...B" learned "git diff --merge-base A B", which is a longer short-hand to say the same thing. * dl/diff-merge-base: contrib/completion: complete `git diff --merge-base` builtin/diff-tree: learn --merge-base builtin/diff-index: learn --merge-base t4068: add --merge-base tests diff-lib: define diff_get_merge_base() diff-lib: accept option flags in run_diff_index() contrib/completion: extract common diff/difftool options git-diff.txt: backtick quote command text git-diff-index.txt: make --cached description a proper sentence t4068: remove unnecessary >tmp
2020-11-02git-prompt.sh: localize `option` in __git_ps1_show_upstreamSibo Dong
The variable 'option' is used in __git_ps1_show_upstream() without being localized. This clobbers the variable the user may be using for other purposes, which is bad. Luckily, $option is not used to carry information around in the script as a global variable. The use of it in this script has very limited scope (namely, only inside this function), so just declare that it is "local". Signed-off-by: Sibo Dong <sibo.dong@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-30Merge branch 'dl/resurrect-update-for-sha256'Junio C Hamano
"git resurrect" script (in contrib/) learned that the object names may be longer than 40-hex depending on the hash function in use. * dl/resurrect-update-for-sha256: contrib/git-resurrect.sh: use hash-agnostic OID pattern contrib/git-resurrect.sh: indent with tabs
2020-10-29zsh: update copyright noticesFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: bash: remove old compat wrappersFelipe Contreras
It's been eight years, more than enough time to move on. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: bash: cleanup cygwin checkFelipe Contreras
Avoid Yoda conditions, and use $OSTYPE. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: bash: trivial cleanupFelipe Contreras
There's no need to set a variable we are not going to use. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: add simple version checkFelipe Contreras
A lot of people are confused about which completion script they are using; Zsh's Git script, or Git's Zsh script. Add a simple helper so they can type 'git zsh<tab>' and find out if they are running the correct one: this. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: trivial simplificationFelipe Contreras
>From upstream bash simplification: d9ee1e0617 (completion: simplify inner 'case' pattern in __gitcomp()) Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: add alias descriptionsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: improve command tagsFelipe Contreras
There's no need to use _alternative and repeat a lot of the code. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: refactor command completionFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: shuffle functions aroundFelipe Contreras
Just to have a nice order. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: simplify file_directFelipe Contreras
It's exactly the same as __gitcomp_file() with no prefix. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: simplify nl_appendFelipe Contreras
It's exactly the same as __gitcomp_nl(), no need to duplicate code. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: trivial cleanupFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: simplify direct compaddFelipe Contreras
Instead of manually removing the suffix so zsh can add its own, we can tell zsh to add no suffix, so we don't have to remove it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: simplify compadd functionsFelipe Contreras
We don't need to override IFS, zsh has a native way of splitting by new lines: the expansion flag (f). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: fix splitting of wordsFelipe Contreras
Files don't need to be split by '=:', words do. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: add missing direct_appendFelipe Contreras
Commit 688077910b forgot to add the corresponding zsh function. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: fix conflict with bashcompFelipe Contreras
We don't want to override the 'complete()' function in zsh, which can be used by bashcomp. Reported-by: Mark Lodato <lodato@google.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: fix completion for --no-.. optionsFelipe Contreras
This was introduced in upstream's bash script, but never in zsh's: b221b5ab9b (completion: collapse extra --no-.. options) It has been failing since v2.19. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: bash: remove zsh wrapperFelipe Contreras
It has been deprecated for more than eight years now, it's never up to date, and it's a hassle to maintain. It's time to move on. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: bash: synchronize zsh wrapperFelipe Contreras
A function was missing. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: fix for command aliasingFelipe Contreras
A lot of people want to define aliases like gc='git commit', and zsh allows that (when not using 'complete_aliases'), but we need to handle services that call a function other than the main one. With this patch we can do: compdef _git gc=git_commit Additionally, add compatibility for Zsh Git functions which have the form git-commit (with dash, not underscore). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: prompt: fix color for ZshFelipe Contreras
We don't need PROMPT_COMMAND in Zsh; we are already using %F{color} %f, which in turn use %{ and %}, which are the equivalent of Bash's \[ and \]. We can use as many colors as we want and output directly into PS1 (or RPS1) without the risk of buffer wrapping issues. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-29completion: zsh: update slave script locationsFelipe Contreras
Update the default locations of typical system bash-completion, including the default bash-completion location for user scripts, and the recommended way to find the system location (with pkg-config). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-28Merge branch 'dl/checkout-guess'Junio C Hamano
"git checkout" learned to use checkout.guess configuration variable and enable/disable its "--[no-]guess" option accordingly. * dl/checkout-guess: checkout: learn to respect checkout.guess Documentation/config/checkout: replace sq with backticks
2020-10-27completion: zsh: fix for directories with spacesFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27completion: zsh: reorganize install instructionsFelipe Contreras
Start with the most important thing; the proper location of this script, then follow with the location of the slave script (git-completion.bash). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27completion: zsh: fix bash script extensionFelipe Contreras
Commit 0e5ed7cca3 wrongly changed the extension of the bash script to .zsh; the zstyle configuration is for the slave script (bash), not the master one (zsh). For example it could be: zstyle ':completion:*:*:git:*' script ~/.git-completion.bash The extension doesn't really matter, but it confuses people into thinking it's a zsh script; it's not. Cc: Peter van der Does <peter@avirtualhome.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27completion: zsh: fix name due to broken autoloadingFelipe Contreras
Commit 176f5adfdb wrongly changed the installation path to '~/.zsh/git-completion.zsh', this ensures the script is not automatically loaded. The whole point of adding the script to the fpath variable is that it's autoloaded after typing 'git<tab>', which won't happen unless it's named _git. I've changed the wording so it's crystal clear the name of the file *must* be '_git'. http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Autoloaded-files Cc: Maxim Belsky <public.belsky@gmail.com> Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-27completion: zsh: fix __gitcomp_direct()Felipe Contreras
Many callers append a space suffix, but zsh automatically appends a space, making the completion add two spaces, for example: git log ma<tab> Will complete 'master '. Let's remove that extra space. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-16completion: fix zsh installation instructionsAlexey
- Fix wrong script in completion configuration. zsh wants bash completion path here, not path to itself. - Add `compinit` autoload command, since whole thing didn't work if it is not loaded. Signed-off-by: Alexey <lesha.ogonkov@gmail.com> Reviewed-by: Stefan Haller <lists@haller-berlin.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-08contrib/git-resurrect.sh: use hash-agnostic OID patternDenton Liu
Since Git now supports hashes other than SHA-1, the hash length isn't guaranteed to be 40 characters. Replace $_x40 with a hash-agnostic OID pattern. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-08contrib/git-resurrect.sh: indent with tabsDenton Liu
In the git-resurrect script, there are a few lines that are mistakenly indented with spaces. Replace these lines with tabs. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-08checkout: learn to respect checkout.guessDenton Liu
The current behavior of git checkout/switch is that --guess is currently enabled by default. However, some users may not wish for this to happen automatically. Instead of forcing users to specify --no-guess manually each time, teach these commands the checkout.guess configuration variable that gives users the option to set a default behavior. Teach the completion script to recognize the new config variable and disable DWIM logic if it is set to false. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-07git-completion.bash: stash-show: complete $__git_diff_common_optionsRobert Karszniewicz
Signed-off-by: Robert Karszniewicz <avoidr@posteo.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-07git-completion.bash: __git_diff_common_options: add --[no-]patchRobert Karszniewicz
At the same time also deduplicate those options from command completions which use $__git_diff_common_options. Signed-off-by: Robert Karszniewicz <avoidr@posteo.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-10-06Merge branch 'js/cmake-vs'Junio C Hamano
Using the CMake support we added some time ago for real with Visual Studio build revealed there were lot of usability improvements possible, which have been carried out. * js/cmake-vs: hashmap_for_each_entry(): workaround MSVC's runtime check failure #3 cmake (Windows): recommend using Visual Studio's built-in CMake support cmake (Windows): initialize vcpkg/build dependencies automatically cmake (Windows): complain when encountering an unknown compiler cmake (Windows): let the `.dll` files be found when running the tests cmake: quote the path accurately when editing `test-lib.sh` cmake: fall back to using `vcpkg`'s `msgfmt.exe` on Windows cmake: ensure that the `vcpkg` packages are found on Windows cmake: do find Git for Windows' shell interpreter cmake: ignore files generated by CMake as run in Visual Studio
2020-10-04Merge branch 'au/complete-restore-s'Junio C Hamano
The command line completion (in contrib/) learned that "git restore -s <TAB>" is often followed by a refname. * au/complete-restore-s: completion: complete refs after 'git restore -s' completion: use "prev" variable instead of introducing "prevword"
2020-10-04Merge branch 'ab/mediawiki-fixes'Junio C Hamano
Modernization and fixes to MediaWiki remote backend. * ab/mediawiki-fixes: remote-mediawiki: use "sh" to eliminate unquoted commands remote-mediawiki: annotate unquoted uses of run_git() remote-mediawiki: convert to quoted run_git() invocation remote-mediawiki: provide a list form of run_git() remote-mediawiki tests: annotate failing tests remote-mediawiki: fix duplicate revisions being imported remote-mediawiki tests: use CLI installer remote-mediawiki tests: use inline PerlIO for readability remote-mediawiki tests: replace deprecated Perl construct remote-mediawiki tests: use a more idiomatic dispatch table remote-mediawiki tests: use "$dir/" instead of "$dir." remote-mediawiki tests: change `[]` to `test` remote-mediawiki tests: use test_cmp in tests remote-mediawiki tests: use a 10 character password remote-mediawiki tests: use the login/password variables remote-mediawiki doc: don't hardcode Debian PHP versions remote-mediawiki doc: link to MediaWiki's current version remote-mediawiki doc: correct link to GitHub project
2020-09-30cmake (Windows): recommend using Visual Studio's built-in CMake supportJohannes Schindelin
It is a lot more convenient to use than having to specify the configuration in CMake manually (does not matter whether using the command-line or CMake's GUI). While at it, recommend using `contrib/buildsystems/out/` as build directory also in the part that talks about running CMake manually. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>