summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2016-08-10Merge branch 'jk/completion-diff-submodule'Junio C Hamano
* jk/completion-diff-submodule: completion: add completion for --submodule=* diff option
2016-08-10Merge branch 'jt/format-patch-from-config'Junio C Hamano
"git format-patch" learned format.from configuration variable to specify the default settings for its "--from" option. * jt/format-patch-from-config: format-patch: format.from gives the default for --from
2016-08-09completion: add completion for --submodule=* diff optionJacob Keller
Teach git-completion.bash to complete --submodule= for git commands which take diff options. Also teach completion for git-log to support --diff-algorithms as well. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-08-08Merge branch 'cp/completion-clone-recurse-submodules'Junio C Hamano
* cp/completion-clone-recurse-submodules: completion: add option '--recurse-submodules' to 'git clone'
2016-08-08Merge branch 'da/subtree-modernize'Junio C Hamano
Style fixes for "git subtree" (in contrib/). * da/subtree-modernize: subtree: adjust function definitions to match CodingGuidelines subtree: adjust style to match CodingGuidelines
2016-08-03Merge branch 'jk/git-jump'Junio C Hamano
"git jump" script (in contrib/) has been updated a bit. * jk/git-jump: contrib/git-jump: fix typo in README contrib/git-jump: add whitespace-checking mode contrib/git-jump: fix greedy regex when matching hunks
2016-08-03Merge branch 'pm/build-persistent-https-with-recent-go'Junio C Hamano
The build procedure for "git persistent-https" helper (in contrib/) has been updated so that it can be built with more recent versions of Go. * pm/build-persistent-https-with-recent-go: contrib/persistent-https: use Git version for build label contrib/persistent-https: update ldflags syntax for Go 1.7+
2016-08-03Merge branch 'da/subtree-2.9-regression'Junio C Hamano
"git merge" in Git v2.9 was taught to forbid merging an unrelated lines of history by default, but that is exactly the kind of thing the "--rejoin" mode of "git subtree" (in contrib/) wants to do. "git subtree" has been taught to use the "--allow-unrelated-histories" option to override the default. * da/subtree-2.9-regression: subtree: fix "git subtree split --rejoin" t7900-subtree.sh: fix quoting and broken && chains
2016-08-01format-patch: format.from gives the default for --fromJosh Triplett
This helps users who would prefer format-patch to default to --from, and makes it easier to change the default in the future. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-28Merge branch 'nd/worktree-lock'Junio C Hamano
"git worktree prune" protected worktrees that are marked as "locked" by creating a file in a known location. "git worktree" command learned a dedicated command pair to create and remove such a file, so that the users do not have to do this with editor. * nd/worktree-lock: worktree.c: find_worktree() search by path suffix worktree: add "unlock" command worktree: add "lock" command worktree.c: add is_worktree_locked() worktree.c: add is_main_worktree() worktree.c: add find_worktree()
2016-07-28subtree: adjust function definitions to match CodingGuidelinesDavid Aguilar
We prefer a space between the function name and the parentheses, and no space inside the parentheses. The opening "{" should also be on the same line. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-28subtree: adjust style to match CodingGuidelinesDavid Aguilar
Prefer "test" over "[ ... ]", use double-quotes around variables, break long lines, and properly indent "case" statements. Helped-by: Johannes Sixt <j6t@kdbg.org> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-27completion: add option '--recurse-submodules' to 'git clone'Chris Packham
Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-26subtree: fix "git subtree split --rejoin"David Aguilar
"git merge" in v2.9 prevents merging unrelated histories. "git subtree split --rejoin" creates unrelated histories when creating a split repo from a raw sub-directory that did not originate from an invocation of "git subtree add". Restore the original behavior by passing --allow-unrelated-histories when merging subtrees. This ensures that the synthetic history created by "git subtree split" can be merged. Add a test to ensure that this feature works as advertised. Reported-by: Brett Cundal <brett.cundal@iugome.com> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-26t7900-subtree.sh: fix quoting and broken && chainsDavid Aguilar
Allow whitespace in arguments to subtree_test_create_repo. Add missing && chains. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-22contrib/git-jump: fix typo in READMEJeff King
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-22contrib/git-jump: add whitespace-checking modeJeff King
If you have whitespace errors in lines you've introduced, it can be convenient to be able to jump directly to them for fixing. You can't quite use "git jump diff" for this, because though it passes arbitrary options to "git diff", it expects to see an actual unified diff in the output. Whereas "git diff --check" actually produces lines that look like compiler quickfix lines already, meaning we just need to run it and feed the output directly to the editor. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-22contrib/git-jump: fix greedy regex when matching hunksJeff King
The hunk-header regex looks for "\+\d+" to find the post-image line numbers, but it skips the pre-image line numbers with a simple ".*". That means we may greedily eat the post-image numbers and match a "\+\d" further on, in the funcname text. For example, commit 6b9c38e has this hunk header: diff --git a/t/t0006-date.sh b/t/t0006-date.sh [...] @@ -50,8 +50,8 @@ check_show iso-local "$TIME" '2016-06-15 14:13:20 +0000' If you run: git checkout 6b9c38e git jump diff HEAD^ t/ it will erroneously match "+0000" as the starting line number and jump there, rather than line 50. We can fix it by just making the "skip" regex non-greedy, taking the first "+" we see, which should be the post-image line information. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-22contrib/persistent-https: use Git version for build labelParker Moore
The previous method simply used the UNIX timestamp of when the binary was built as its build label. $ make && ./git-remote-persistent-http -print_label 1469061546 This patch aims to align the label for this binary with the Git version contained in the GIT-VERSION-FILE. This gives a better sense of the version of the binary as it can be mapped to a particular revision or release of Git itself. For example: $ make && ./git-remote-persistent-http -print_label 2.9.1.275.g75676c8 Discussion of this patch is available on a related thread in the mailing list surrounding this package called "contrib/persistent-https: update ldflags syntax for Go 1.7+". The gmane.org link is: http://article.gmane.org/gmane.comp.version-control.git/299653/ Signed-off-by: Parker Moore <parkrmoore@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-22contrib/persistent-https: update ldflags syntax for Go 1.7+Parker Moore
Running `make all` in `contrib/persistent-https` results in a failure on Go 1.7 and above. Specifically, the error is: go build -o git-remote-persistent-https \ -ldflags "-X main._BUILD_EMBED_LABEL 1468613136" # _/Users/parkr/github/git/contrib/persistent-https /usr/local/Cellar/go/1.7rc1/libexec/pkg/tool/darwin_amd64/link: -X flag requires argument of the form importpath.name=value make: *** [git-remote-persistent-https] Error 2 This `name=value` syntax for the -X flag was introduced in Go v1.5 (released Aug 19, 2015): - release notes: https://golang.org/doc/go1.5#link - commit: https://github.com/golang/go/commit/12795c02f3d6fc54ece09a86e70aaa40a94d5131 In Go v1.7, support for the old syntax was removed: - release notes: https://tip.golang.org/doc/go1.7#compiler - commit: https://github.com/golang/go/commit/51b624e6a29b135ce0fadb22b678acf4998ff16f Add '=' between the symbol and its value for recent versions of Go, while leaving it out for older ones. Signed-off-by: Parker Moore <parkrmoore@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-19Merge branch 'bc/cocci'Junio C Hamano
Conversion from unsigned char sha1[20] to struct object_id continues. * bc/cocci: diff: convert prep_temp_blob() to struct object_id merge-recursive: convert merge_recursive_generic() to object_id merge-recursive: convert leaf functions to use struct object_id merge-recursive: convert struct merge_file_info to object_id merge-recursive: convert struct stage_data to use object_id diff: rename struct diff_filespec's sha1_valid member diff: convert struct diff_filespec to struct object_id coccinelle: apply object_id Coccinelle transformations coccinelle: convert hashcpy() with null_sha1 to hashclr() contrib/coccinelle: add basic Coccinelle transforms hex: add oid_to_hex_r()
2016-07-08worktree: add "unlock" commandNguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-08worktree: add "lock" commandNguyễn Thái Ngọc Duy
Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-06Merge branch 'nd/worktree-cleanup-post-head-protection'Junio C Hamano
Further preparatory clean-up for "worktree" feature continues. * nd/worktree-cleanup-post-head-protection: worktree: simplify prefixing paths worktree: avoid 0{40}, too many zeroes, hard to read worktree.c: use is_dot_or_dotdot() git-worktree.txt: keep subcommand listing in alphabetical order worktree.c: rewrite mark_current_worktree() to avoid strbuf completion: support git-worktree
2016-07-06Merge branch 'nb/gnome-keyring-build' into maintJunio C Hamano
Build improvements for gnome-keyring (in contrib/) * nb/gnome-keyring-build: gnome-keyring: Don't hard-code pkg-config executable
2016-07-06Merge branch 'vs/prompt-avoid-unset-variable' into maintJunio C Hamano
The git-prompt scriptlet (in contrib/) was not friendly with those who uses "set -u", which has been fixed. * vs/prompt-avoid-unset-variable: git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
2016-06-28contrib/coccinelle: add basic Coccinelle transformsbrian m. carlson
Coccinelle (http://coccinelle.lip6.fr/) is a program which performs mechanical transformations on C programs using semantic patches. These semantic patches can be used to implement automatic refactoring and maintenance tasks. Add a set of basic semantic patches to convert common patterns related to the struct object_id transformation, as well as a README. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-27Merge branch 'tb/complete-status'Junio C Hamano
The completion script (in contrib/) learned to complete "git status" options. * tb/complete-status: completion: add git status completion: add __git_get_option_value helper completion: factor out untracked file modes into a variable
2016-06-27Merge branch 'nb/gnome-keyring-build'Junio C Hamano
Build improvements for gnome-keyring (in contrib/) * nb/gnome-keyring-build: gnome-keyring: Don't hard-code pkg-config executable
2016-06-27Merge branch 'vs/prompt-avoid-unset-variable'Junio C Hamano
The git-prompt scriptlet (in contrib/) was not friendly with those who uses "set -u", which has been fixed. * vs/prompt-avoid-unset-variable: git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_sha
2016-06-14gnome-keyring: Don't hard-code pkg-config executableHeiko Becker
Helpful if your pkg-config executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-10completion: add git statusThomas Braun
Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-10completion: add __git_get_option_value helperThomas Braun
This function allows to search the commmand line and config files for an option, long and short, with mandatory value. The function would return e.g. for the command line "git status -uno --untracked-files=all" the result "all" regardless of the config option. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-10completion: factor out untracked file modes into a variableThomas Braun
Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-06git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION, $short_shaVille Skyttä
When the shell is in "nounset" or "set -u" mode, referencing unset or null variables results in an error. Protect $ZSH_VERSION and $BASH_VERSION against that, and initialize $short_sha before use. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-24completion: support git-worktreeNguyễn Thái Ngọc Duy
This adds bare-bone completion support for git-worktree. More advanced completion (e.g. ref completion in git-worktree-add) can be added later. --force completion in "worktree add" is left out because that option should be handled with care. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-13git-multimail: update to release 1.3.1Matthieu Moy
The changes are described in CHANGES. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-03Sync with maintJunio C Hamano
* maint: git-multimail: update to release 1.3.0
2016-05-03git-multimail: update to release 1.3.0Matthieu Moy
The changes are described in CHANGES. Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr> Contributions-by: Stefan Tatschner <rumpelsepp@sevenbyte.org> Contributions-by: Simon P <simon.git@le-huit.fr> Contributions-by: Leander Hasty <leander@1stplayable.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-13Merge branch 'mg/complete-cherry-mark-to-log'Junio C Hamano
The completion scripts (in contrib/) did not include the "--cherry-mark" option when completing "git log <HT>". * mg/complete-cherry-mark-to-log: completion: complete --cherry-mark for git log
2016-04-13Merge branch 'rt/completion-help'Junio C Hamano
Shell completion (in contrib/) updates. * rt/completion-help: completion: add 'revisions' and 'everyday' to 'git help' completion: add option '--guides' to 'git help'
2016-04-05completion: complete --cherry-mark for git logMichael J Gruber
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-24completion: add 'revisions' and 'everyday' to 'git help'Ralf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-03-24completion: add option '--guides' to 'git help'Ralf Thielow
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-22Merge branch 'pw/completion-stash' into maintJunio C Hamano
* pw/completion-stash: completion: fix mis-indentation in _git_stash()
2016-02-22Merge branch 'pw/completion-stash'Junio C Hamano
* pw/completion-stash: completion: fix mis-indentation in _git_stash()
2016-02-22completion: fix mis-indentation in _git_stash()SZEDER Gábor
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-10Merge branch 'cc/untracked'Junio C Hamano
Update the untracked cache subsystem and change its primary UI from "git update-index" to "git config". * cc/untracked: t7063: add tests for core.untrackedCache test-dump-untracked-cache: don't modify the untracked cache config: add core.untrackedCache dir: simplify untracked cache "ident" field dir: add remove_untracked_cache() dir: add {new,add}_untracked_cache() update-index: move 'uc' var declaration update-index: add untracked cache notifications update-index: add --test-untracked-cache update-index: use enum for untracked cache options dir: free untracked cache when removing it
2016-02-05Merge branch 'tb/complete-word-diff-regex' into maintJunio C Hamano
* tb/complete-word-diff-regex: completion: complete "diff --word-diff-regex="
2016-02-05Merge branch 'pw/completion-stash' into maintJunio C Hamano
* pw/completion-stash: completion: update completion arguments for stash