summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-21grep: show non-empty lines before functions with -WLibravatar René Scharfe2-5/+24
Non-empty lines before a function definition are most likely comments for that function and thus relevant. Include them in function context. Such a non-empty line might also belong to the preceding function if there is no separating blank line. Stop extending the context upwards also at the next function line to make sure only one extra function body is shown at most. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21grep: update boundary variable for pre-contextLibravatar René Scharfe1-6/+8
Function context can be bigger than -A/-B/-C context. To find the beginning of the combined context we search backwards. Currently we check at each loop iteration what we're looking for and determine the effective upper boundary based on that. Simplify this a bit by setting the variable "from" to the lowest unshown line number up front if we're looking for a function line and set it back to the required -B/-C context line number when we find one. This prepares the ground for the next patch; no functional change intended. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21t7810: improve check of -W with user-defined function linesLibravatar René Scharfe1-10/+31
The check for function context (-W) together with user-defined function line patterns reuses hello.c and pretends it's written in a language in which function lines contain either "printf" or a trailing curly brace. That's a bit obscure. Make the test easier to read by adding a small PowerShell script, using a simple, but meaningful expression, and separating out checks for different aspects into dedicated tests instead of simply matching the whole output byte for byte. Also include a test for showing comments before function lines like git Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21xdiff: show non-empty lines before functions with -WLibravatar René Scharfe2-1/+4
Non-empty lines before a function definition are most likely comments for that function and thus relevant. Include them in function context. Such a non-empty line might also belong to the preceeding function if there is no separating blank line. Stop extending the context upwards also at the next function line to make sure only one extra function body is shown at most. Original-patch-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21xdiff: factor out is_func_rec()Libravatar René Scharfe1-3/+7
Add a helper for checking if a given record is a function line. It frees callers from having to deal with the buffer arguments of match_func_rec(). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-21t4051: add test for comments preceding function linesLibravatar René Scharfe2-0/+7
When showing function context it would be helpful to show comments immediately before declarations, as they are most likely relevant. Add a test for that, but without specifying the choice of lines too rigidly in the test---we may want to stop before and not include "/*" in the future, for example. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-15Sync with maintLibravatar Junio C Hamano1-0/+68
2017-11-15RelNotes: the fourth batch for 2.16Libravatar Junio C Hamano1-24/+69
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-15Merge branch 'bp/read-index-from-skip-verification'Libravatar Junio C Hamano3-0/+8
Drop (perhaps overly cautious) sanity check before using the index read from the filesystem at runtime. * bp/read-index-from-skip-verification: read_index_from(): speed index loading by skipping verification of the entry order
2017-11-15Merge branch 'bc/submitting-patches-in-asciidoc'Libravatar Junio C Hamano3-161/+192
The SubmittingPatches document has been converted to produce an HTML version via AsciiDoc/Asciidoctor. * bc/submitting-patches-in-asciidoc: Documentation: convert SubmittingPatches to AsciiDoc Documentation: enable compat-mode for Asciidoctor
2017-11-15Merge branch 'sb/bisect-run-empty'Libravatar Junio C Hamano1-0/+2
"git bisect run" that did not specify any command to run used to go ahead and treated all commits to be tested as 'good'. This has been corrected by making the command error out. * sb/bisect-run-empty: bisect run: die if no command is given
2017-11-15Merge branch 'rd/bisect-view-is-visualize'Libravatar Junio C Hamano3-10/+9
Doc and message updates to teach users "bisect view" is a synonym for "bisect visualize". * rd/bisect-view-is-visualize: bisect: mention "view" as an alternative to "visualize"
2017-11-15Merge branch 'jk/info-alternates-fix'Libravatar Junio C Hamano1-1/+3
We used to add an empty alternate object database to the system that does not help anything; it has been corrected. * jk/info-alternates-fix: link_alt_odb_entries: make empty input a noop
2017-11-15Merge branch 'cb/t4201-robustify'Libravatar Junio C Hamano2-5/+7
A test update. * cb/t4201-robustify: t4201: make use of abbreviation in the test more robust
2017-11-15Merge branch 'ab/pcre-v2'Libravatar Junio C Hamano2-3/+4
Building with NO_LIBPCRE1_JIT did not disable it, which has been fixed. * ab/pcre-v2: grep: fix NO_LIBPCRE1_JIT to fully disable JIT
2017-11-15Merge branch 'tz/fsf-address-update'Libravatar Junio C Hamano44-103/+69
* tz/fsf-address-update: Replace Free Software Foundation address in license notices Replace Free Software Foundation address in license notices
2017-11-15Merge branch 'ad/rebase-i-serie-typofix'Libravatar Junio C Hamano1-1/+1
* ad/rebase-i-serie-typofix: rebase -i: fix comment typo
2017-11-15Merge branch 'ab/mediawiki-namespace'Libravatar Junio C Hamano1-1/+37
The remote-helper for talking to MediaWiki has been updated to work with mediawiki namespaces. * ab/mediawiki-namespace: remote-mediawiki: show progress while fetching namespaces remote-mediawiki: process namespaces in order remote-mediawiki: support fetching from (Main) namespace remote-mediawiki: skip virtual namespaces remote-mediawiki: show known namespace choices on failure remote-mediawiki: allow fetching namespaces with spaces remote-mediawiki: add namespace support
2017-11-15Merge branch 'ma/reduce-heads-leakfix'Libravatar Junio C Hamano7-23/+52
Leak fixes. * ma/reduce-heads-leakfix: reduce_heads: fix memory leaks builtin/merge-base: free commit lists
2017-11-15Merge branch 'js/for-each-ref-remote-name-and-ref'Libravatar Junio C Hamano5-15/+120
The "--format=..." option "git for-each-ref" takes learned to show the name of the 'remote' repository and the ref at the remote side that is affected for 'upstream' and 'push' via "%(push:remotename)" and friends. * js/for-each-ref-remote-name-and-ref: for-each-ref: test :remotename and :remoteref for-each-ref: let upstream/push report the remote ref name for-each-ref: let upstream/push optionally report the remote name
2017-11-15Merge branch 'jt/submodule-tests-cleanup'Libravatar Junio C Hamano1-205/+46
* jt/submodule-tests-cleanup: Tests: clean up and document submodule helpers
2017-11-15Merge branch 'cc/git-packet-pm'Libravatar Junio C Hamano3-94/+202
Parts of a test to drive the long-running content filter interface has been split into its own module, hopefully to eventually become reusable. * cc/git-packet-pm: Git/Packet.pm: extract parts of t0021/rot13-filter.pl for reuse t0021/rot13-filter: add capability functions t0021/rot13-filter: refactor checking final lf t0021/rot13-filter: add packet_initialize() t0021/rot13-filter: improve error message t0021/rot13-filter: improve 'if .. elsif .. else' style t0021/rot13-filter: refactor packet reading functions t0021/rot13-filter: fix list comparison
2017-11-15Merge branch 'bw/rebase-i-ignored-submodule-fix'Libravatar Junio C Hamano2-1/+20
"git rebase -i" recently started misbehaving when a submodule that is configured with 'submodule.<name>.ignore' is dirty; this has been corrected. * bw/rebase-i-ignored-submodule-fix: wt-status: actually ignore submodules when requested
2017-11-15Merge branch 'mh/tidy-ref-update-flags'Libravatar Junio C Hamano16-163/+189
Code clean-up in refs API implementation. * mh/tidy-ref-update-flags: refs: update some more docs to use "oid" rather than "sha1" write_packed_entry(): take `object_id` arguments refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING` refs: rename constant `REF_NODEREF` to `REF_NO_DEREF` refs: tidy up and adjust visibility of the `ref_update` flags ref_transaction_add_update(): remove a check ref_transaction_update(): die on disallowed flags prune_ref(): call `ref_transaction_add_update()` directly files_transaction_prepare(): don't leak flags to packed transaction
2017-11-15Merge branch 'sr/wrapper-quote-filenames'Libravatar Junio C Hamano3-6/+6
Some error messages did not quote filenames shown in it, which have been fixed. * sr/wrapper-quote-filenames: wrapper.c: consistently quote filenames in error messages
2017-11-15Merge branch 'ma/bisect-leakfix'Libravatar Junio C Hamano3-19/+29
Leak fixes. * ma/bisect-leakfix: bisect: fix memory leak when returning best element bisect: fix off-by-one error in `best_bisection_sorted()` bisect: fix memory leak in `find_bisection()` bisect: change calling-convention of `find_bisection()`
2017-11-15Merge branch 'rs/sequencer-rewrite-file-cleanup'Libravatar Junio C Hamano1-29/+16
Code cleanup. * rs/sequencer-rewrite-file-cleanup: sequencer.c: check return value of close() in rewrite_file() sequencer: use O_TRUNC to truncate files sequencer: factor out rewrite_file()
2017-11-15Merge branch 'ao/merge-verbosity-getenv-just-once'Libravatar Junio C Hamano1-3/+4
Code cleanup. * ao/merge-verbosity-getenv-just-once: merge-recursive: check GIT_MERGE_VERBOSITY only once
2017-11-15Merge branch 'mh/avoid-rewriting-packed-refs'Libravatar Junio C Hamano4-1/+238
Recent update to the refs infrastructure implementation started rewriting packed-refs file more often than before; this has been optimized again for most trivial cases. * mh/avoid-rewriting-packed-refs: files-backend: don't rewrite the `packed-refs` file unnecessarily t1409: check that `packed-refs` is not rewritten unnecessarily
2017-11-15Merge branch 'rs/imap-send-next-arg-fix'Libravatar Junio C Hamano1-2/+13
Error checking in "git imap-send" for empty response has been improved. * rs/imap-send-next-arg-fix: imap-send: handle missing response codes gracefully imap-send: handle NULL return of next_arg()
2017-11-15Merge branch 'ab/mediawiki-name-truncation'Libravatar Junio C Hamano1-1/+2
The remote-helper for talking to MediaWiki has been updated to truncate an overlong pagename so that ".mw" suffix can still be added. * ab/mediawiki-name-truncation: remote-mediawiki: limit filenames to legal
2017-11-15Start preparation for 2.15.1Libravatar Junio C Hamano3-2/+70
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-11-15Merge branch 'ks/mailmap' into maintLibravatar Junio C Hamano1-0/+1
* ks/mailmap: mailmap: use Kaartic Sivaraam's new address
2017-11-15Merge branch 'jm/relnotes-2.15-typofix' into maintLibravatar Junio C Hamano1-3/+3
Typofix. * jm/relnotes-2.15-typofix: fix typos in 2.15.0 release notes
2017-11-15Merge branch 'cn/diff-indent-no-longer-is-experimental' into maintLibravatar Junio C Hamano4-9/+6
Doc update. * cn/diff-indent-no-longer-is-experimental: diff: --indent-heuristic is no longer experimental
2017-11-15Merge branch 'js/mingw-redirect-std-handles' into maintLibravatar Junio C Hamano3-0/+88
MinGW updates. * js/mingw-redirect-std-handles: mingw: document the standard handle redirection mingw: optionally redirect stderr/stdout via the same handle mingw: add experimental feature to redirect standard handles
2017-11-15Merge branch 'js/wincred-empty-cred' into maintLibravatar Junio C Hamano2-2/+27
MinGW updates. * js/wincred-empty-cred: wincred: handle empty username/password correctly t0302: check helper can handle empty credentials
2017-11-15Merge branch 'js/mingw-full-version-in-resources' into maintLibravatar Junio C Hamano2-3/+4
MinGW updates. * js/mingw-full-version-in-resources: mingw: include the full version information in the resources
2017-11-15Merge branch 'dk/libsecret-unlock-to-load-fix' into maintLibravatar Junio C Hamano1-1/+1
The credential helper for libsecret (in contrib/) has been improved to allow possibly prompting the end user to unlock secrets that are currently locked (otherwise the secrets may not be loaded). * dk/libsecret-unlock-to-load-fix: credential-libsecret: unlock locked secrets
2017-11-15Merge branch 'js/early-config' into maintLibravatar Junio C Hamano1-1/+3
Correct start-up sequence so that a repository could be placed immediately under the root directory again (which was broken at around Git 2.13). * js/early-config: setup: avoid double slashes when looking for HEAD
2017-11-15Merge branch 'ad/5580-unc-tests-on-cygwin' into maintLibravatar Junio C Hamano1-4/+10
UNC paths are also relevant in Cygwin builds and they are now tested just like Mingw builds. * ad/5580-unc-tests-on-cygwin: t5580: add Cygwin support
2017-11-15Merge branch 'ao/diff-populate-filespec-lstat-errorpath-fix' into maintLibravatar Junio C Hamano1-8/+6
After an error from lstat(), diff_populate_filespec() function sometimes still went ahead and used invalid data in struct stat, which has been fixed. * ao/diff-populate-filespec-lstat-errorpath-fix: diff: fix lstat() error handling in diff_populate_filespec()
2017-11-15Merge branch 'sb/blame-config-doc' into maintLibravatar Junio C Hamano1-0/+17
Description of blame.{showroot,blankboundary,showemail,date} configuration variables have been added to "git config --help". * sb/blame-config-doc: config: document blame configuration
2017-11-15Merge branch 'tb/complete-checkout' into maintLibravatar Junio C Hamano2-1/+6
Command line completion (in contrib/) update. * tb/complete-checkout: completion: add remaining flags to checkout
2017-11-15Merge branch 'jc/check-ref-format-oor' into maintLibravatar Junio C Hamano4-4/+32
"git check-ref-format --branch @{-1}" bit a "BUG()" when run outside a repository for obvious reasons; clarify the documentation and make sure we do not even try to expand the at-mark magic in such a case, but still call the validation logic for branch names. * jc/check-ref-format-oor: check-ref-format doc: --branch validates and expands <branch> check-ref-format --branch: strip refs/heads/ using skip_prefix check-ref-format --branch: do not expand @{...} outside repository
2017-11-15Merge branch 'jc/t5601-copy-workaround' into maintLibravatar Junio C Hamano1-0/+2
A (possibly flakey) test fix. * jc/t5601-copy-workaround: t5601: rm the target file of cp that could still be executing
2017-11-15Merge branch 'jk/rebase-i-exec-gitdir-fix' into maintLibravatar Junio C Hamano2-1/+17
A recent regression in "git rebase -i" that broke execution of git commands from subdirectories via "exec" insn has been fixed. * jk/rebase-i-exec-gitdir-fix: sequencer: pass absolute GIT_DIR to exec commands
2017-11-15Merge branch 'bw/grep-recurse-submodules' into maintLibravatar Junio C Hamano1-0/+2
A broken access to object databases in recent update to "git grep --recurse-submodules" has been fixed. * bw/grep-recurse-submodules: grep: take the read-lock when adding a submodule
2017-11-15Merge branch 'js/submodule-in-excluded' into maintLibravatar Junio C Hamano2-1/+12
"git status --ignored -u" did not stop at a working tree of a separate project that is embedded in an ignored directory and listed files in that other project, instead of just showing the directory itself as ignored. * js/submodule-in-excluded: status: do not get confused by submodules in excluded directories
2017-11-15Merge branch 'ao/check-resolve-ref-unsafe-result' into maintLibravatar Junio C Hamano1-0/+2
"git commit", after making a commit, did not check for errors when asking on what branch it made the commit, which has been correted. * ao/check-resolve-ref-unsafe-result: commit: check result of resolve_ref_unsafe