summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2015-08-03Merge branch 'sg/completion-commit-cleanup' into maintLibravatar Junio C Hamano1-1/+1
* sg/completion-commit-cleanup: completion: teach 'scissors' mode to 'git commit --cleanup='
2015-07-15Merge branch 'jc/prompt-document-ps1-state-separator' into maintLibravatar Junio C Hamano1-0/+4
Docfix. * jc/prompt-document-ps1-state-separator: git-prompt.sh: document GIT_PS1_STATESEPARATOR
2015-07-15Merge branch 'af/tcsh-completion-noclobber' into maintLibravatar Junio C Hamano1-1/+1
The tcsh completion writes a bash scriptlet but that would have failed for users with noclobber set. * af/tcsh-completion-noclobber: git-completion.tcsh: fix redirect with noclobber
2015-07-15Merge branch 'pa/auto-gc-mac-osx' into maintLibravatar Junio C Hamano1-1/+1
Recent Mac OS X updates breaks the logic to detect that the machine is on the AC power in the sample pre-auto-gc script. * pa/auto-gc-mac-osx: hooks/pre-auto-gc: adjust power checking for newer OS X
2015-06-12hooks/pre-auto-gc: adjust power checking for newer OS XLibravatar Panagiotis Astithas1-1/+1
The output of "pmset -g batt" changed at some point from "Currently drawing from 'AC Power'" to the slightly different "Now drawing from 'AC Power'". Starting the match from "drawing" makes the check work in both old and new versions of OS X. Signed-off-by: Panagiotis Astithas <pastith@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-10git-prompt.sh: document GIT_PS1_STATESEPARATORLibravatar Joe Cridge1-0/+4
The environment variable GIT_PS1_STATESEPARATOR can be used to set the separator between the branch name and the state symbols in the prompt. At present the variable is not mentioned in the inline documentation which makes it difficult for the casual user to identify. Signed-off-by: Joe Cridge <joe.cridge@me.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-09git-completion.tcsh: fix redirect with noclobberLibravatar Ariel Faigon1-1/+1
tcsh users who happen to have 'set noclobber' elsewhere in their ~/.tcshrc or ~/.cshrc startup files get a 'File exist' error, and the tcsh completion file doesn't get generated/updated. Adding a `!` in the redirect works correctly for both clobber (default) and 'set noclobber' users. Reviewed-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Ariel Faigon <github.2009@yendor.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-08completion: teach 'scissors' mode to 'git commit --cleanup='Libravatar SZEDER Gábor1-1/+1
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-05-26Merge branch 'sg/complete-decorate-full-not-long' into maintLibravatar Junio C Hamano1-1/+1
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-03completion: fix and update 'git log --decorate=' optionsLibravatar SZEDER Gábor1-1/+1
'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-04-28Merge branch 'mh/multimail-renewal'Libravatar Junio C Hamano2-24/+25
* mh/multimail-renewal: Update git-multimail to version 1.0.2
2015-04-28Update git-multimail to version 1.0.2Libravatar Michael Haggerty2-24/+25
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 maintLibravatar Junio C Hamano1-1/+1
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 maintLibravatar Junio C Hamano1-2/+7
"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'Libravatar Junio C Hamano1-1/+1
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'Libravatar Junio C Hamano1-2/+7
"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-12completion: fix global bash variable leak on __gitcompappendLibravatar Márcio Almada1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-04-04diff-highlight: do not split multibyte charactersLibravatar Kyle J. McKay1-2/+7
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 maintLibravatar Junio C Hamano1-2/+2
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 maintLibravatar Junio C Hamano1-1/+1
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 maintLibravatar Junio C Hamano1-1/+1
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'Libravatar Junio C Hamano1-2/+2
Code clean-up. * sg/completion-gitcomp-nl-for-refs: completion: use __gitcomp_nl() for completing refs
2015-03-25Merge branch 'ct/prompt-untracked-fix'Libravatar Junio C Hamano1-1/+1
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'Libravatar Junio C Hamano1-1/+1
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'Libravatar Junio C Hamano1-0/+1
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 maintLibravatar Junio C Hamano1-5/+2
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 maintLibravatar Junio C Hamano1-0/+1
Documentation fixes. * mg/doc-status-color-slot: config,completion: add color.status.unmerged
2015-03-22completion: use __gitcomp_nl() for completing refsLibravatar SZEDER Gábor1-2/+2
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'Libravatar Junio C Hamano1-0/+1
Documentation fixes. * mg/doc-status-color-slot: config,completion: add color.status.unmerged
2015-03-17Merge branch 'sg/completion-remote'Libravatar Junio C Hamano1-5/+2
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 filesLibravatar Cody A Taylor1-1/+1
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-14contrib/completion: escape the forward slash in __git_match_ctagLibravatar John Szakmeister1-1/+1
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.followTagsLibravatar Dave Olszewski1-0/+1
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.unmergedLibravatar Michael J Gruber1-0/+1
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()Libravatar SZEDER Gábor1-5/+2
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 maintLibravatar Junio C Hamano1-3/+22
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'Libravatar Junio C Hamano1-3/+22
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'Libravatar Junio C Hamano1-1/+1
"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-25wincred: fix get credential if username has "@"Libravatar Aleksey Vasenev1-3/+22
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'Libravatar Junio C Hamano1-5/+5
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'Libravatar Junio C Hamano1-7/+17
* 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'Libravatar Junio C Hamano1-0/+1
* mm/complete-rebase-autostash: git-completion: add --autostash for 'git rebase'
2015-01-14Merge branch 'sp/subtree-doc'Libravatar Junio C Hamano1-105/+89
* sp/subtree-doc: subtree: fix AsciiDoc list item continuation
2015-01-14git-prompt: preserve value of $? in all casesLibravatar Tony Finch1-4/+4
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 optionLibravatar Christoph Junghans1-1/+1
"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>
2015-01-07Merge branch 'tf/prompt-preserve-exit-status'Libravatar Junio C Hamano1-0/+4
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 $? inside shell prompt
2015-01-07Merge branch 'pd/completion-filenames-fix'Libravatar Junio C Hamano2-3/+3
The top-of-the-file instruction for completion scripts (in contrib/) did not name the files correctly. * pd/completion-filenames-fix: Update documentation occurrences of filename .sh
2015-01-07git-completion: add --autostash for 'git rebase'Libravatar Matthieu Moy1-0/+1
This option was added in 58794775 (rebase: implement --[no-]autostash and rebase.autostash, 2013-05-12). Completion of "--autosquash" has been there, but this was not; addition of this would require people completing "--autosquash" to type a bit more than before. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-07git-prompt.sh: allow to hide prompt for ignored pwdLibravatar Jess Austin1-0/+13
Optionally set __git_ps1 to display nothing when present working directory is ignored, triggered by the new environment variable GIT_PS1_HIDE_IF_PWD_IGNORED. This environment variable may be overridden on any repository by setting bash.hideIfPwdIgnored to "false". In the absence of GIT_PS1_HIDE_IF_PWD_IGNORED this change has no effect. Many people manage e.g. dotfiles in their home directory with git. This causes the prompt generated by __git_ps1 to refer to that "top level" repo while working in any descendant directory. That can be distracting, so this patch helps one shut off that noise. Signed-off-by: Jess Austin <jess.austin@gmail.com> Signed-off-by: Richard Hansen <rhansen@bbn.com> Reviewed-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-01-07git-prompt.sh: if pc mode, immediately set PS1 to a plain promptLibravatar Richard Hansen1-7/+4
At the beginning of __git_ps1, right after determining that the function is running in pc mode, set PS1 to a plain (undecorated) prompt. This makes it possible to simply return early without having to set PS1 if the prompt should not be decorated. Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>