config: make parsing stack struct independent from actual data source

To simplify adding other sources we extract all functions needed for
parsing into a list of callbacks. We implement those callbacks for the
current file parsing. A new source can implement its own set of callbacks.

Instead of storing the concrete FILE pointer for parsing we store a void
pointer. A new source can use this to store its custom data.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
teach config --blob option to parse config from database

This can be used to read configuration values directly from git's
database. For example it is useful for reading to be checked out
.gitmodules files directly from the database.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
do not die when error in config parsing of buf occurs

If a config parsing error in a file occurs we can die and let the user
fix the issue. This is different for the buf parsing function since it
can be used to parse blobs of .gitmodules files. If a parsing error
occurs here we should proceed since otherwise a database containing such
an error in a single revision could be rendered unusable.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'hv/config-from-blob' into pu

$gmane/223964

* hv/config-from-blob:
  do not die when error in config parsing of buf occurs
  teach config --blob option to parse config from database
  config: make parsing stack struct independent from actual data source
  config: drop cf validity check in get_next_char()
  config: factor out config file stack management
Merge branch 'jc/show-branch' into pu

* jc/show-branch:
  show-branch: use commit slab to represent bitflags of arbitrary width
  show-branch.c: remove "all_mask"
  show-branch.c: abstract out "flags" operation
  show-branch.c: lift all_mask/all_revs to a global static
  show-branch.c: update comment style

# Conflicts:
# 	builtin/show-branch.c
Merge branch 'mh/multimail' into pu

$gmane/223564

* mh/multimail:
  git-multimail: a replacement for post-receive-email
Merge branch 'rj/read-default-config-in-show-ref-pack-refs' into pu

The changes themselves are probably good, but it is unclear what
basic setting needs to be read for which exact operation.

$gmane/228294

* rj/read-default-config-in-show-ref-pack-refs:
  ### DONTMERGE: needs better explanation on what config they need
  pack-refs.c: Add missing call to git_config()
  show-ref.c: Add missing call to git_config()
Merge branch 'rj/cygwin-clarify-use-of-cheating-lstat' into pu

Turns quite a many uses of lstat() into fast_lstat() to mark
callsites that allow "a faster but cheating and incorrect variant".
Defining fast_lstat() to be the same as lstat(), is fine from
correctness point of view, but it can be replaced with an
alternative implementation that more quickly grabs only the part of
the stat information that matter (e.g. cygwin).  The places where
we _do_ require a fully correct lstat() are left as lstat().

The damage this patch makes to the the core codepath on systems may
be rather large from readability's point of view, though.

* rj/cygwin-clarify-use-of-cheating-lstat:
  cygwin: Add fast_lstat() and fast_fstat() functions
Merge branch 'jc/pull-training-wheel' into pu

Make "git pull" refuse with "it does not fast forward; choose between
'pull --merge' and 'pull --rebase'".

John Keeping seems to want to restrict this to "git pull" without
any other argument. I personally do not have a strong opinion
either way, but I'm inclined to take such a patch to loosen the new
logic with other people's support.  Hint, hint...

* jc/pull-training-wheel:
  pull: require choice between rebase/merge on non-fast-forward pull
Merge branch 'rr/send-email-ssl-verify' into pu

The issue seems a lot deeper than the initial attempt and needs
somebody to sit down and sort out to get the version dependencies
and lazy loading right.

* rr/send-email-ssl-verify:
  SQUASH??? update to support SSL_ca_file as well as SSL_ca_path
  SQUASH??? send-email: cover both smtps and starttls cases
  fixup! send-email: squelch warning from Net::SMTP::SSL
  SQUASH??? send-email giving default value to ssl-cert-path with ||= assignment
  send-email: introduce sendemail.smtpsslcertpath
  send-email: squelch warning from Net::SMTP::SSL
Merge branch 'tr/merge-recursive-index-only' into pu

* tr/merge-recursive-index-only:
  merge-recursive: -Xindex-only to leave worktree unchanged
  merge-recursive: untangle double meaning of o->call_depth
  merge-recursive: remove dead conditional in update_stages()
Merge branch 'km/http-curl-config-per-url' into pu

* km/http-curl-config-per-url:
  config: add support for http.<url>.* settings