aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* contrib: update stats/mailmap scriptJeff King2012-12-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version changes quite a few things: 1. The original parsed the mailmap file itself, and it did it wrong (it did not understand entries with an extra email key). Instead, this version uses git's "%aE" and "%aN" formats to have git perform the mapping, meaning we do not have to read .mailmap at all, but still operate on the current state that git sees (and it also works properly from subdirs). 2. The original would find multiple names for an email, but not the other way around. This version can do either or both. If we find multiple emails for a name, the resolution is less obvious than the other way around. However, it can still be a starting point for a human to investigate. 3. The original would order only by count, not by recency. This version can do either. Combined with showing the counts, it can be easier to decide how to resolve. 4. This version shows similar entries in a blank-delimited stanza, which makes it more clear which options you are picking from. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-prompt: Document GIT_PS1_DESCRIBE_STYLEAnders Kaseorg2012-12-11
| | | | | | | | GIT_PS1_DESCRIBE_STYLE was introduced in v1.6.3.2~35. Document it in the header comments. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-remote-mediawiki: escape ", \, and LF in file namesMatthieu Moy2012-11-29
| | | | | | | | | | A mediawiki page can contain, and even start with a " character, we have to escape it when generating the fast-export stream, as well as \ character. While we're there, also escape newlines, but I don't think we can get them from MediaWiki pages. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* completion: add options --single-branch and --branch to "git clone"Ralf Thielow2012-11-28
| | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Completion must sort before using uniqMarc Khouzam2012-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user can be presented with invalid completion results when trying to complete a 'git checkout' command. This can happen when using a branch name prefix that matches multiple remote branches. For example, if available branches are: master remotes/GitHub/maint remotes/GitHub/master remotes/origin/maint remotes/origin/master When performing completion on 'git checkout ma' the user will be given the choices: maint master However, 'git checkout maint' will fail in this case, although completion previously said 'maint' was valid. Furthermore, when performing completion on 'git checkout mai', no choices will be suggested. So, the user is first told that the branch name 'maint' is valid, but when trying to complete 'mai' into 'maint', that completion is no longer valid. The completion results should never propose 'maint' as a valid branch name, since 'git checkout' will refuse it. The reason for this bug is that the uniq program only works with sorted input. The man page states "uniq prints the unique lines in a sorted file". When __git_refs uses the guess heuristic employed by checkout for tracking branches it wants to consider remote branches but only if the branch name is unique. To do that, it calls 'uniq -u'. However the input given to 'uniq -u' is not sorted. Therefore, in the above example, when dealing with 'git checkout ma', "__git_refs '' 1" will find the following list: master maint master maint master which, when passed to 'uniq -u' will remain the same. Therefore 'maint' will be wrongly suggested as a valid option. When dealing with 'git checkout mai', the list will be: maint maint which happens to be sorted and will be emptied by 'uniq -u', properly ignoring 'maint'. A solution for preventing the completion script from suggesting such invalid branch names is to first call 'sort' and then 'uniq -u'. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2012-10-13
|\ | | | | | | | | * maint: Fix spelling error in post-receive-email hook
| * Fix spelling error in post-receive-email hookRichard Fearn2012-10-13
| | | | | | | | | | Signed-off-by: Richard Fearn <richardfearn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2012-09-25
|\ \ | |/ | | | | | | * maint: Revert "completion: fix shell expansion of items"
| * Revert "completion: fix shell expansion of items"Jeff King2012-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 25ae7cfd19c8f21721363c64163cd5d9d1135b20. That patch does fix expansion of weird variables in some simple tests, but it also seems to break other things, like expansion of refs by "git checkout". While we're sorting out the correct solution, we are much better with the original bug (people with metacharacters in their completions occasionally see an error message) than the current bug (ref completion does not work at all). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Sync with maintJunio C Hamano2012-09-24
|\ \ | |/
| * Improve the description of GIT_PS1_SHOWUPSTREAMJonathan "Duke" Leto2012-09-24
| | | | | | | | | | | | | | | | Describe what '=' means in the output of __git_ps1 when using GIT_PS1_SHOWUPSTREAM, which was not previously described. Signed-off-by: Jonathan "Duke" Leto <jonathan@leto.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2012-09-20
|\ \ | |/ | | | | | | | | * maint: Documentation: Document signature showing options completion: fix shell expansion of items
| * Merge branch 'nd/maint-remote-remove' into maintJunio C Hamano2012-09-20
| |\ | | | | | | | | | | | | * nd/maint-remote-remove: remote: prefer subcommand name 'remove' to 'rm'
| * | completion: fix shell expansion of itemsFelipe Contreras2012-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Jeroen Meijer[1]; the current code doesn't deal properly with items (tags, branches, etc.) that have ${} in them because they get expaned by bash while using compgen. A simple solution is to quote the items so they get expanded properly (\$\{\}). In order to achieve that I took bash-completion's quote() function, which is rather simple, and renamed it to __git_quote() as per Jeff King's suggestion. Solves the original problem for me. [1] http://article.gmane.org/gmane.comp.version-control.git/201596 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2012-09-17
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | * maint: t/perf: add "trash directory" to .gitignore Add missing -z to git check-attr usage text for consistency with man page git-jump: ignore (custom) prefix in diff mode Documentation: indent-with-non-tab uses "equivalent tabs" not 8 completion: add --no-edit to git-commit
| * | git-jump: ignore (custom) prefix in diff modeMischa POSLAWSKY2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Matching the default file prefix b/ does not yield any results if config option diff.noprefix or diff.mnemonicprefix is enabled. Signed-off-by: Mischa POSLAWSKY <git@shiar.nl> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | completion: add --no-edit to git-commitYacine Belkadi2012-09-16
| | | | | | | | | | | | | | | Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'cn/branch-set-upstream-to'Junio C Hamano2012-09-14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finishing touches to the recently graduated topic to introduce "git branch --set-upstream-to" option. * cn/branch-set-upstream-to: completion: complete branch name for "branch --set-upstream-to=" completion: add --set-upstream-to and --unset-upstream
| * | | completion: complete branch name for "branch --set-upstream-to="Michael J Gruber2012-09-11
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | completion: add --set-upstream-to and --unset-upstreamCarlos Martín Nieto2012-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove --set-upstream as it's deprecated now. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'nd/maint-remote-remove'Junio C Hamano2012-09-12
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * nd/maint-remote-remove: remote: prefer subcommand name 'remove' to 'rm'
| * | | remote: prefer subcommand name 'remove' to 'rm'Nguyễn Thái Ngọc Duy2012-09-06
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All remote subcommands are spelled out words except 'rm'. 'rm', being a popular UNIX command name, may mislead users that there are also 'ls' or 'mv'. Use 'remove' to fit with the rest of subcommands. 'rm' is still supported and used in the test suite. It's just not widely advertised. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jc/merge-bases'Junio C Hamano2012-09-11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimise the "merge-base" computation a bit, and also update its users that do not need the full merge-base information to call a cheaper subset. * jc/merge-bases: reduce_heads(): reimplement on top of remove_redundant() merge-base: "--is-ancestor A B" get_merge_bases_many(): walk from many tips in parallel in_merge_bases(): use paint_down_to_common() merge_bases_many(): split out the logic to paint history in_merge_bases(): omit unnecessary redundant common ancestor reduction http-push: use in_merge_bases() for fast-forward check receive-pack: use in_merge_bases() for fast-forward check in_merge_bases(): support only one "other" commit
| * | | in_merge_bases(): support only one "other" commitJunio C Hamano2012-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In early days of its life, I planned to make it possible to compute "is a commit contained in all of these other commits?" with this function, but it turned out that no caller needed it. Just make it take two commit objects and add a comment to say what these two functions do. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ph/credential-gnome-keyring'Junio C Hamano2012-09-10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * ph/credential-gnome-keyring: contrib: add credential helper for GnomeKeyring
| * | | | contrib: add credential helper for GnomeKeyringPhilipp A. Hartmann2012-08-24
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this installed in your $PATH, you can store git-over-http passwords in your keyring by doing: git config credential.helper gnome-keyring The code is based in large part on the work of John Szakmeister who wrote the helper originally for the initial, unpublished version of the credential helper protocol. This version will pass t0303 if you do: GIT_TEST_CREDENTIAL_HELPER=gnome-keyring \ ./t0303-credential-external.sh Signed-off-by: Philipp A. Hartmann <pah@qo.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'ef/win32-cred-helper'Junio C Hamano2012-08-29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credential helper for Win32 to allow access to the keychain of the logged-in user. * ef/win32-cred-helper: contrib: add win32 credential-helper
| * | | | contrib: add win32 credential-helperErik Faye-Lund2012-08-16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Windows port of Git expects binary pipes, we need to make sure the helper-end also sets up binary pipes. Side-step CRLF-issue in test to make it pass. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'da/difftool-updates'Junio C Hamano2012-08-27
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git difftool --dir-diff" learned to use symbolic links to prepare temporary copy of the working tree when available. * da/difftool-updates: difftool: silence warning Add Code Compare v2.80.4 as a merge / diff tool for Windows mergetool,difftool: Document --tool-help consistently difftool: Disable --symlinks on cygwin difftool: Handle compare() returning -1 difftool: Wrap long lines for readability difftool: Check all return codes from compare() difftool: Handle finding mergetools/ in a path with spaces difftool: Use symlinks when diffing against the worktree difftool: Call the temp directory "git-difftool" difftool: Move option values into a hash difftool: Eliminate global variables difftool: Simplify print_tool_help()
| * | | Add Code Compare v2.80.4 as a merge / diff tool for WindowsSebastian Schuberth2012-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code Compare is a commercial file comparison tool for Windows, see http://www.devart.com/codecompare/ Version 2.80.4 added support for command line arguments preceded by a dash instead of a slash. This is required for Git for Windows because slashes in command line arguments get mangled with according to these rules: http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint-1.7.11' into maintJunio C Hamano2012-08-24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.7.11: Prepare for 1.7.11.6 Make the ciabot scripts completely self-configuring in the normal case. Improved documentation for the ciabot scripts. man: git pull -r is a short for --rebase gitcli: describe abbreviation of long options rev-list docs: clarify --topo-order description Documentation/CodingGuidelines: spell out more shell guidelines Documentation: do not mention .git/refs/* directories tests: Introduce test_seq
| * | | | Make the ciabot scripts completely self-configuring in the normal case.Eric S. Raymond2012-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Improved documentation for the ciabot scripts.Eric S. Raymond2012-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint-1.7.11' into maintJunio C Hamano2012-08-22
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | | * maint-1.7.11: contrib/ciabot: Get ciabot configuration from git variables
| * | | contrib/ciabot: Get ciabot configuration from git variablesEric S. Raymond2012-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes remove all need to modify the ciabot scripts for installation. Instead, per-project configuration can be dome via variables in a [ciabot] section of the config file. Also, correct for the new server address. Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Merge branch 'lm/git-blame-el' into maintJunio C Hamano2012-08-06
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lm/git-blame-el: git-blame.el: Do not use bare 0 to mean (point-min) git-blame.el: Use with-current-buffer where appropriate git-blame.el: Do not use goto-line in lisp code
| * \ \ \ Merge branch 'rs/git-blame-mapcar-mapc' into maintJunio C Hamano2012-08-06
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | * rs/git-blame-mapcar-mapc: git-blame.el: use mapc instead of mapcar
* | | | | git-remote-mediawiki: replace TODO-list in comment by appropriate linkMatthieu Moy2012-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My account on Github is now used as wiki and issue tracking. This will be more flexible than in-tree management of a TODO-list. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jk/mediawiki-credential'Junio C Hamano2012-07-23
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/mediawiki-credential: mw-to-git: use git-credential's URL parser credential: convert "url" attribute into its parsed subparts mw-to-git: check blank credential attributes via length docs/credential: minor clarity fixups
| * | | | | mw-to-git: use git-credential's URL parserJeff King2012-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can just feed our URL straight to git-credential and it will parse it for us, saving us some code. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | mw-to-git: check blank credential attributes via lengthJeff King2012-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When writing a credential to git-credential, we omit fields that do not have a true value. This will skip empty or undefined fields (which we want), but will also accidentally skip usernames or passwords which happen to have a non-true value (e.g., "0"). Be more careful by checking for non-zero length. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: allow page names with a ':'Matthieu Moy2012-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionnally, pages named Foo:Bar are page 'Bar' in namespace 'Foo'. However, it is also possible to call a page Foo:Bar if 'Foo' is not a namespace. In this case, the actual name of the page is 'Foo:Bar', in the main namespace. Since we can't tell with only the filename, query the wiki for a namespace 'Foo' in these cases, but deal with the case where no such namespace is found. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: fix incorrect test usage in testMatthieu Moy2012-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: properly deal with invalid remote revisionsMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some wiki, including https://git.wiki.kernel.org/ have invalid revision numbers (i.e. the actual revision numbers are non-contiguous). Don't die when encountering one. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: show progress information when getting last remote ↵Matthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revision Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: show progress information when listing pagesMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial phases of push and pull with git-remote-mediawiki can be long on a large wiki. Let the user know what's going on. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: use --force when adding notesMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When notes are created to record a push, it normally doesn't exist yet. However, when a push is interrupted and then restarted, it may happen that a commit already has notes attached, and we want to reflect the newly created remote revision, hence use 'git notes add -f' to override the existing one Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: get rid of O(N^2) loopMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The algorithm to find a path from the local revision to the remote one was calling "git rev-list" and parsing its output N times. Run rev-list only once, and fill a hashtable with the result to optimize the body of the loop. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: make mediafiles export optionalMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to use git-remote-mediawiki on a tree with both .mw files and other files. Before git-remote-mediawiki learnt how to export mediafiles, such mixed trees allowed the user to maintain both the wiki and other files for the same project in the same repository. With the newly added support for exporting mediafiles, pushing such mixed trees would upload unrelated files as mediafiles, which may not be desired. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | git-remote-mediawiki: actually send empty comment when they're emptyMatthieu Moy2012-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>