mergetool: rename bc3 to bc

Beyond Compare version 4 works the same way as version 3, so rename
the existing "bc3" adaptor to just "bc", while keeping "bc3" as a
backward compatible wrapper.

Noticed-by: Olivier Croquette <ocroquette@free.fr>
Helped-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep: fix match highlighting for combined patterns with context lines

When git grep is run with combined patterns such as '-e p1 --and -e
p2' and surrounding context lines are requested, the output contains
incorrectly highlighted matches.

Consider the following output (highlighted matches are surrounded by '*'
characters):
    $ cat testfile
    foo a
    foo b
    foo bar
    baz bar foo
    bar x
    bar y
    $ git grep -n -C2 -e foo --and -e bar testfile
    testfile-1-*foo* a
    testfile-2-*foo* b
    testfile:3:*foo* *bar*
    testfile:4:baz *bar* *foo*
    testfile-5-*bar* x
    testfile-6-*bar* y

Lines 1, 2, 5 and 6 do not match the combined patterns, they only
contain incorrectly highlighted 'false positives'.

Modify the show_line() function in grep.c to highlight matches only on
lines that match the combined pattern. Do not highlight matches on lines
that provide only context or contain only the function name of the match.

The output of the same command after the change:
    $ git grep -n -C2 -e foo --and -e bar testfile
    testfile-1-foo a
    testfile-2-foo b
    testfile:3:*foo* *bar*
    testfile:4:baz *bar* *foo*
    testfile-5-bar x
    testfile-6-bar y

Also avoid unnecessary regmatch on lines we do not split by
moving the code to paint a single line piece-by-piece only
to apply to the matched line.

Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
push: heed user.signingkey for signed pushes

push --signed promises to take user.signingkey as the signing key but
fails to read the config.

Make it do so.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/pack-objects-no-bitmap-when-splitting'

Splitting pack-objects output into multiple packs is incompatible
with the use of reachability bitmap.

* jk/pack-objects-no-bitmap-when-splitting:
  pack-objects: turn off bitmaps when we split packs
Merge branch 'po/doc-status-markup'

Update documentation mark-up.

* po/doc-status-markup:
  doc: fix 'git status --help' character quoting
Merge branch 'rs/run-command-env-array'

Add managed "env" array to child_process to clarify the lifetime
rules.

* rs/run-command-env-array:
  use env_array member of struct child_process
  run-command: add env_array, an optional argv_array for env
Merge branch 'tb/core-filemode-doc'

Doc update.

* tb/core-filemode-doc:
  core.filemode may need manual action
Merge branch 'wk/t1304-wo-USER'

* wk/t1304-wo-USER:
  t1304: Set LOGNAME even if USER is unset or null
Merge branch 'eb/no-pthreads'

Allow us build with NO_PTHREADS=NoThanks compilation option.

* eb/no-pthreads:
  Handle atexit list internaly for unthreaded builds
  pack-objects: set number of threads before checking and warning
  index-pack: fix compilation with NO_PTHREADS
Merge branch 'nd/dir-prep-exclude-cleanup'

Code clean-up.

* nd/dir-prep-exclude-cleanup:
  dir.c: remove the second declaration of "stk" in prep_exclude()
Merge branch 'sb/plug-transport-leak'

Code clean-up.

* sb/plug-transport-leak:
  .mailmap: add Stefan Bellers corporate mail address
  transport: free leaking head in transport_print_push_status()
Merge branch 'jc/push-cert'

* jc/push-cert:
  push: heed user.signingkey for signed pushes
Update draft release notes to 2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'zk/grep-color-words' into next

"git grep --color" highlighted matching tokens on non-matching
context lines and function name headers, which was unwanted.

* zk/grep-color-words:
  grep: fix match highlighting for combined patterns with context lines
Merge branch 'oc/mergetools-beyondcompare' into next

Version 4 of BeyondCompare works just as well as its version 3 with
mergetool; allow people to say "git mergetool --tool bc" instead of
forcing them to say "git mergetool --tool bc3".

* oc/mergetools-beyondcompare:
  mergetool: rename bc3 to bc
Sync with master

* master:
  Update draft release notes to 2.2
  push: heed user.signingkey for signed pushes
gpg-interface: provide clear helper for struct signature_check

The struct has been growing members whose malloced memory needs to be
freed. Do this with one helper function so that no malloced memory shall
be left unfreed.
gpg-interface: provide access to the payload

In contrast to tag signatures, commit signatures are put into the
header, that is between the other header parts and commit messages.

Provide access to the commit content sans the signature, which is the
payload that is actually signed. Commit signature verification does the
parsing anyways, and callers may wish to act on or display the commit
object sans the signature.