summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2015-05-22Merge branch 'sg/completion-config'Junio C Hamano
Code clean-up for completion script (in contrib/). * sg/completion-config: completion: simplify query for config variables completion: add a helper function to get config variables
2015-05-22Merge branch 'ls/http-ssl-cipher-list'Junio C Hamano
Introduce http.<url>.SSLCipherList configuration variable to tweak the list of cipher suite to be used with libcURL when talking with https:// sites. * ls/http-ssl-cipher-list: http: add support for specifying an SSL cipher list
2015-05-22Merge branch 'dl/subtree-avoid-tricky-echo'Junio C Hamano
"git subtree" script (in contrib/) used "echo -n" to produce progress messages in a non-portable way. * dl/subtree-avoid-tricky-echo: contrib/subtree: portability fix for string printing
2015-05-22Merge branch 'dl/subtree-push-no-squash'Junio C Hamano
"git subtree" script (in contrib/) does not have --squash option when pushing, but the documentation and help text pretended as if it did. * dl/subtree-push-no-squash: contrib/subtree: there's no push --squash
2015-05-22Merge branch 'sg/completion-omit-credential-helpers'Junio C Hamano
The Git subcommand completion (in contrib/) listed credential helpers among candidates, which is not something the end user would invoke interatively. * sg/completion-omit-credential-helpers: completion: remove credential helpers from porcelain commands
2015-05-12completion: simplify query for config variablesSZEDER Gábor
To get the name of all config variables in a given section we perform a 'git config --get-regex' query for all config variables containing the name of that section, and then filter its output through a case statement to throw away those that though contain but don't start with the given section. Modify the regex to match only at the beginning, so the case statement becomes unnecessary and we can get rid of it. Add a test to check that a match in the middle doesn't fool us. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-12completion: add a helper function to get config variablesSZEDER Gábor
Currently there are a few completion functions that perform similar 'git config' queries and filtering to get config variable names: the completion of pretty aliases, aliases, and remote groups for 'git remote update'. Unify those 'git config' queries in a helper function to eliminate code duplication. Though the helper functions to get pretty aliases and alieses are reduced to mere one-liner wrappers around the newly added function, keep these helpers still, because users' completion functions out there might depend on them. And they keep their callers a tad easier to read, too. Add tests for the pretty alias and alias helper to show that they work as before; not for the remote groups query, though, because that's not extracted into a helper function and it's not worth the effort to do so for a sole callsite. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-11Merge branch 'sg/completion-no-redundant-all-command-list'Junio C Hamano
Code simplification. * sg/completion-no-redundant-all-command-list: completion: remove redundant __git_compute_all_commands() call
2015-05-11Merge branch 'sg/complete-decorate-full-not-long'Junio C Hamano
The completion for "log --decorate=" parameter value was incorrect. * sg/complete-decorate-full-not-long: completion: fix and update 'git log --decorate=' options
2015-05-08contrib/subtree: portability fix for string printingDanny Lin
'echo -n' is not portable, but this script used it as a way to give a string followed by a carriage return for progress messages. Introduce a new helper shell function "progress" and use printf as a more portable way to do this. As a side effect, this makes it unnecessary to have a raw CR in our source, which can be munged in some shells. For example, MsysGit trims CR before executing a shell script file in order to make it work right on Windows even if it uses CRLF as linefeeds. While at it, replace "echo" using printf in debug() and say() to eliminate the temptation of reintroducing the same bug. Signed-off-by: Danny Lin <danny0838@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-08http: add support for specifying an SSL cipher listLars Kellogg-Stedman
Teach git about a new option, "http.sslCipherList", which permits one to specify a list of ciphers to use when negotiating SSL connections. The setting can be overwridden by the GIT_SSL_CIPHER_LIST environment variable. Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-07contrib/subtree: there's no push --squashDanny Lin
The documentation says that --squash is for 'add', 'merge', 'pull' and 'push', while --squash actually doesn't change the behavior of 'push'. Correct the documentation. Signed-off-by: Danny Lin <danny0838@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-06completion: remove credential helpers from porcelain commandsSZEDER Gábor
Don't offer the "main" 'git credential' command or any of the credential helpers from contrib/credential/ when completing git commands. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-03completion: fix and update 'git log --decorate=' optionsSZEDER Gábor
'git log --decorate=' understands the 'full', 'short' and 'no' options. From these the completion script only offered 'short' and it offered 'long' instead of 'full'. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-03completion: remove redundant __git_compute_all_commands() callSZEDER Gábor
During lazy-initialization of the lists of all commands and porcelain commands the function __git_compute_all_commands() is called twice. The relevant part of the call sequence looks like this: __git_compute_porcelain_commands() __git_compute_all_commands() <finds list of all commands uninitialized> __git_list_all_commands() <initializes list of all commands> __git_list_porcelain_commands() __git_compute_all_commands() <finds list of all commands already initialized, does nothing> <filters porcelains from list of all commands> Either one of the two calls could be removed and the initialization of both command lists would still work as a whole, but let's remove the call from __git_compute_porcelain_commands(), because this way __git_list_porcelain_commands() will keep working in itself. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-28Merge branch 'mh/multimail-renewal'Junio C Hamano
* mh/multimail-renewal: Update git-multimail to version 1.0.2
2015-04-28Update git-multimail to version 1.0.2Michael Haggerty
The only changes are to the README files, most notably the list of maintainers and the project URL. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-27Merge branch 'ma/bash-completion-leaking-x' into maintJunio C Hamano
The completion script (in contrib/) contaminated global namespace and clobbered on a shell variable $x. * ma/bash-completion-leaking-x: completion: fix global bash variable leak on __gitcompappend
2015-04-21Merge branch 'jk/colors' into maintJunio C Hamano
"diff-highlight" (in contrib/) used to show byte-by-byte differences, which meant that multi-byte characters can be chopped in the middle. It learned to pay attention to character boundaries (assuming the UTF-8 payload). * jk/colors: diff-highlight: do not split multibyte characters
2015-04-20Merge branch 'ma/bash-completion-leaking-x'Junio C Hamano
The completion script (in contrib/) contaminated global namespace and clobbered on a shell variable $x. * ma/bash-completion-leaking-x: completion: fix global bash variable leak on __gitcompappend
2015-04-14Merge branch 'jk/colors'Junio C Hamano
"diff-highlight" (in contrib/) used to show byte-by-byte differences, which meant that multi-byte characters can be chopped in the middle. It learned to pay attention to character boundaries (assuming the UTF-8 payload). * jk/colors: diff-highlight: do not split multibyte characters
2015-04-13completion: fix global bash variable leak on __gitcompappendMárcio Almada
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-04diff-highlight: do not split multibyte charactersKyle J. McKay
When the input is UTF-8 and Perl is operating on bytes instead of characters, a diff that changes one multibyte character to another that shares an initial byte sequence will result in a broken diff display as the common byte sequence prefix will be separated from the rest of the bytes in the multibyte character. For example, if a single line contains only the unicode character U+C9C4 (encoded as UTF-8 0xEC, 0xA7, 0x84) and that line is then changed to the unicode character U+C9C0 (encoded as UTF-8 0xEC, 0xA7, 0x80), when operating on bytes diff-highlight will show only the single byte change from 0x84 to 0x80 thus creating invalid UTF-8 and a broken diff display. Fix this by putting Perl into character mode when splitting the line and then back into byte mode after the split is finished. The utf8::xxx functions require Perl 5.8 so we require that as well. Also, since we are mucking with code in the split_line function, we change a '*' quantifier to a '+' quantifier when matching the $COLOR expression which has the side effect of speeding everything up while eliminating useless '' elements in the returned array. Reported-by: Yi EungJun <semtlenori@gmail.com> Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-28Merge branch 'sg/completion-gitcomp-nl-for-refs' into maintJunio C Hamano
Code clean-up. * sg/completion-gitcomp-nl-for-refs: completion: use __gitcomp_nl() for completing refs
2015-03-28Merge branch 'ct/prompt-untracked-fix' into maintJunio C Hamano
The prompt script (in contrib/) did not show the untracked sign when working in a subdirectory without any untracked files. * ct/prompt-untracked-fix: git prompt: use toplevel to find untracked files
2015-03-27Merge branch 'js/completion-ctags-pattern-substitution-fix' into maintJunio C Hamano
The code that reads from the ctags file in the completion script (in contrib/) did not spell ${param/pattern/string} substitution correctly, which happened to work with bash but not with zsh. * js/completion-ctags-pattern-substitution-fix: contrib/completion: escape the forward slash in __git_match_ctag
2015-03-26Merge branch 'sg/completion-gitcomp-nl-for-refs'Junio C Hamano
Code clean-up. * sg/completion-gitcomp-nl-for-refs: completion: use __gitcomp_nl() for completing refs
2015-03-25Merge branch 'ct/prompt-untracked-fix'Junio C Hamano
The prompt script (in contrib/) did not show the untracked sign when working in a subdirectory without any untracked files. * ct/prompt-untracked-fix: git prompt: use toplevel to find untracked files
2015-03-23Merge branch 'js/completion-ctags-pattern-substitution-fix'Junio C Hamano
The code that reads from the ctags file in the completion script (in contrib/) did not spell ${param/pattern/string} substitution correctly, which happened to work with bash but not with zsh. * js/completion-ctags-pattern-substitution-fix: contrib/completion: escape the forward slash in __git_match_ctag
2015-03-23Merge branch 'jk/push-config'Junio C Hamano
Restructure "git push" codepath to make it easier to add new configuration bits and then add push.followTags configuration that turns --follow-tags option on by default. * jk/push-config: push: allow --follow-tags to be set by config push.followTags cmd_push: pass "flags" pointer to config callback cmd_push: set "atomic" bit directly git_push_config: drop cargo-culted wt_status pointer
2015-03-23Merge branch 'sg/completion-remote' into maintJunio C Hamano
Code simplification. * sg/completion-remote: completion: simplify __git_remotes() completion: add a test for __git_remotes() helper function
2015-03-23Merge branch 'mg/doc-status-color-slot' into maintJunio C Hamano
Documentation fixes. * mg/doc-status-color-slot: config,completion: add color.status.unmerged
2015-03-22completion: use __gitcomp_nl() for completing refsSZEDER Gábor
We do that almost everywhere, because it's faster for large number of refs, see a31e62629 (completion: optimize refs completion, 2011-10-15). These were the last two places where we still used __gitcomp() for completing refs. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-17Merge branch 'mg/doc-status-color-slot'Junio C Hamano
Documentation fixes. * mg/doc-status-color-slot: config,completion: add color.status.unmerged
2015-03-17Merge branch 'sg/completion-remote'Junio C Hamano
Code simplification. * sg/completion-remote: completion: simplify __git_remotes() completion: add a test for __git_remotes() helper function
2015-03-15git prompt: use toplevel to find untracked filesCody A Taylor
The __git_ps1() prompt function would not show an untracked state when all the untracked files are outside the current working directory. Signed-off-by: Cody A Taylor <codemister99@yahoo.com> Helped-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-15contrib/completion: escape the forward slash in __git_match_ctagJohn Szakmeister
The current definition results in an incorrect expansion of the term under zsh. For instance "/^${1////\\/}/" under zsh with the argument "hi" results in: /^/\/h/\/i/ This results in an output similar to this when trying to complete `git grep chartab` under zsh: :: git grep chartabawk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 } awk: cmd. line:1: ^ backslash not last character on line awk: cmd. line:1: /^/\/c/\/h/\/a/\/r/\/t/\/a/\/b/ { print $1 } awk: cmd. line:1: ^ syntax error Leaving the prompt in a goofy state until the user hits a key. Escaping the literal / in the parameter expansion (using "/^${1//\//\\/}/") results in: /^chartab/ allowing the completion to work correctly. This formulation also works under bash. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-14push: allow --follow-tags to be set by config push.followTagsDave Olszewski
Signed-off-by: Dave Olszewski <cxreg@pobox.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-10config,completion: add color.status.unmergedMichael J Gruber
Reported-by: "Mladen B." <mladen074@gmail.com> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-06completion: simplify __git_remotes()SZEDER Gábor
The __git_remotes() helper function lists the remotes from the config file by processing the output of a 'git config' query. A simple 'git remote' produces the exact same output, so run that instead. Remotes under '$GIT_DIR/remotes' are still listed by running 'ls -1', because 'git remote' unfortunately ignores them. Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-05Merge branch 'av/wincred-with-at-in-username-fix' into maintJunio C Hamano
The credential helper for Windows (in contrib/) used to mishandle a user name with an at-sign in it. * av/wincred-with-at-in-username-fix: wincred: fix get credential if username has "@"
2015-02-18Merge branch 'av/wincred-with-at-in-username-fix'Junio C Hamano
The credential helper for Windows (in contrib/) used to mishandle a user name with an at-sign in it. * av/wincred-with-at-in-username-fix: wincred: fix get credential if username has "@"
2015-02-11Merge branch 'cj/log-invert-grep'Junio C Hamano
"git log --invert-grep --grep=WIP" will show only commits that do not have the string "WIP" in their messages. * cj/log-invert-grep: log: teach --invert-grep option
2015-01-26wincred: fix get credential if username has "@"Aleksey Vasenev
Such a username with "@" in it isn't all that unusual these days. cf. https://groups.google.com/forum/#!msg/msysgit/YVuCqmwwRyY/HULHj5OoE88J Signed-off-by: Aleksey Vasenev <margtu-fivt@ya.ru> Acked-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-14Merge branch 'tf/prompt-preserve-exit-status'Junio C Hamano
Using the exit status of the last command in the prompt, e.g. PS1='$(__git_ps1) $? ', did not work well because the helper function stomped on the exit status. * tf/prompt-preserve-exit-status: git-prompt: preserve value of $? in all cases
2015-01-14Merge branch 'rh/hide-prompt-in-ignored-directory'Junio C Hamano
* rh/hide-prompt-in-ignored-directory: git-prompt.sh: allow to hide prompt for ignored pwd git-prompt.sh: if pc mode, immediately set PS1 to a plain prompt
2015-01-14Merge branch 'mm/complete-rebase-autostash'Junio C Hamano
* mm/complete-rebase-autostash: git-completion: add --autostash for 'git rebase'
2015-01-14Merge branch 'sp/subtree-doc'Junio C Hamano
* sp/subtree-doc: subtree: fix AsciiDoc list item continuation
2015-01-14git-prompt: preserve value of $? in all casesTony Finch
Signed-off-by: Tony Finch <dot@dotat.at> Reviewed-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-13log: teach --invert-grep optionChristoph Junghans
"git log --grep=<string>" shows only commits with messages that match the given string, but sometimes it is useful to be able to show only commits that do *not* have certain messages (e.g. "show me ones that are not FIXUP commits"). Originally, we had the invert-grep flag in grep_opt, but because "git grep --invert-grep" does not make sense except in conjunction with "--files-with-matches", which is already covered by "--files-without-matches", it was moved it to revisions structure. To have the flag there expresses the function to the feature better. When the newly inserted two tests run, the history would have commits with messages "initial", "second", "third", "fourth", "fifth", "sixth" and "Second", committed in this order. The commits that does not match either "th" or "Sec" is "second" and "initial". For the case insensitive case only "initial" matches. Signed-off-by: Christoph Junghans <ottxor@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>