add documentation for writing config files

Replace TODO introduced in commit 9c3c22 with documentation
explaining Git config API functions for writing configuration
files.

Signed-off-by: Tanay Abhra <tanayabh@gmail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-push: fix link in man page

Signed-off-by: Tony Finch <dot@dotat.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ta/doc-config'

* ta/doc-config:
  add documentation for writing config files
Merge branch 'tf/maint-doc-push'

* tf/maint-doc-push:
  git-push: fix link in man page
Git 2.1.0-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
RelNotes: no more check_ref_format micro-optimization

Signed-off-by: Junio C Hamano <gitster@pobox.com>
various contrib: Fix links in man pages

Inspired by 2147fa7e (2014-07-31 git-push: fix link in man page),
I grepped through the whole tree searching for 'gitlink:' occurrences.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Release notes: grammatical fixes

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'mb/relnotes-2.1'

* mb/relnotes-2.1:
  Release notes: grammatical fixes
  RelNotes: no more check_ref_format micro-optimization
log_ref_write: use strbuf instead of hand-rolled malloc

Besides being fewer lines of code, a strbuf helps in a few
ways:

  1. It makes it much more obvious that the combination of
     malloc with a magic "100" followed by "sprintf" is not
     a buffer overflow (it is not currently, because that
     100 is accounting for 2 sha1s and some whitespace, but
     it takes some careful reading to realize it).

  2. It makes it easier to write the logic of what is
     getting formatted. For example, in the existing code,
     we write a newline after the committer, and then
     sometimes overwrite that newline with the reflog
     message, only to add another newline. This is much
     easier written by adding the newline afterwards.

  3. It makes future patches to tweak the format much
     easier.
log_ref_write: optionally write refname into log

The usual reflog format does not contain the ref name, since
it is implicit in the location of the log. However, ...
read and write everything log