Documentation: explain push.default option a bit more

The previous documentation was explaining _what_ the options were doing,
but were of little help explaining _why_ a user should set his default to
either of the options.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Undocument deprecated alias 'push.default=tracking'

It's been deprecated since 53c4031 (Johan Herland, Wed Feb 16 2011,
push.default: Rename 'tracking' to 'upstream'), so it's OK to remove it
from documentation (even though it's still supported) to make the
explanations more readable.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t5528-push-default.sh: add helper functions

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jm/maint-strncpy-diff-no-index' into jch

Will merge to 'master'.

By Jim Meyering
* jm/maint-strncpy-diff-no-index:
  diff: avoid stack-buffer-read-overrun for very long name
Merge branch 'mb/fetch-call-a-non-branch-a-ref' into jch

Will merge to 'master'.

By Marc Branchaud
* mb/fetch-call-a-non-branch-a-ref:
  fetch: describe new refs based on where it came from
  fetch: Give remote_ref to update_local_ref() as well

Conflicts:
	builtin/fetch.c
Merge branch 'jk/repack-no-explode-objects-from-old-pack' into jch

By Jeff King
* jk/repack-no-explode-objects-from-old-pack:
  gc: use argv-array for sub-commands
  argv-array: add a new "pushl" method
  argv-array: refactor empty_argv initialization
  gc: do not explode objects which will be immediately pruned
Merge branch 'rt/cherry-revert-conflict-summary' into jch

In the older days, the header "Conflicts:" in "cherry-pick" and
"merge" was separated by a blank line from the list of paths that
follow for readability, but when "merge" was rewritten in C, we lost
it by mistake. Remove the newline from "cherry-pick" to make them
match again.

Will merge to 'master'.

By Ralf Thielow
* rt/cherry-revert-conflict-summary:
  sequencer: remove additional blank line
Merge branch 'cb/cherry-pick-rev-path-confusion' into jch

The command line parser choked "git cherry-pick $name" when $name can be
both revision name and a pathname, even though $name can never be a path
in the context of the command.

The issue the patch addresses is real, but the way it is implemented felt
unnecessarily invasive a bit.  It may be cleaner for this caller to add
the "--" to the end of the argv_array it passes to setup_revisions().

Will merge to 'master'.

By Clemens Buchacher
* cb/cherry-pick-rev-path-confusion:
  cherry-pick: do not expect file arguments
Merge branch 'jc/merge-reduce-parents-early' into jch

Will merge to 'master'.

By Junio C Hamano (4) and Michał Kiedrowicz (1)
* jc/merge-reduce-parents-early:
  fmt-merge-msg: discard needless merge parents
  builtin/merge.c: reduce parents early
  builtin/merge.c: collect other parents early
  builtin/merge.c: remove "remoteheads" global variable
  merge tests: octopus with redundant parents

Conflicts:
	t/t7602-merge-octopus-many.sh
Merge branch 'js/fast-import-test-9300' into jch

Will merge to 'master'.

By Johannes Sixt
* js/fast-import-test-9300:
  t9300-fast-import: avoid 'exit' in test_expect_success snippets
Merge branch 'rl/maint-stash-i18n-save-error' into jch

Will merge to 'master'.

By Ross Lagerwall
* rl/maint-stash-i18n-save-error:
  stash: use eval_gettextln correctly
Merge branch 'cb/maint-report-mount-point-correctly-in-setup' into jch

The filesystem boundary was not correctly reported when .git directory
discovery stopped at a mount point.

Will merge to 'master'.

By Clemens Buchacher
* cb/maint-report-mount-point-correctly-in-setup:
  properly keep track of current working directory
Merge branch 'cb/http-multi-curl-auth' into jch

Fixes http authentication breakage when we keep multiple HTTP requests in
flight using curl-multi.

Will merge to 'master'.

By Jeff King (3) and Clemens Buchacher (1)
* cb/http-multi-curl-auth:
  http: use newer curl options for setting credentials
  http: clean up leak in init_curl_http_auth
  fix http auth with multiple curl handles
  http auth fails with multiple curl handles
Merge branch 'lp/diffstat-with-graph' into jch

Looked reasonable.
Will merge to 'master'.

By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (1)
* lp/diffstat-with-graph:
  Prevent graph_width of stat width from falling below min
  t4052: Test diff-stat output with minimum columns
  t4052: Adjust --graph --stat output for prefixes
  Adjust stat width calculations to take --graph output into account
  Add output_prefix_length to diff_options
  t4052: test --stat output with --graph
Merge branch 'ld/git-p4-tags-and-labels' (early part) into jch

By Luke Diamand
* 'ld/git-p4-tags-and-labels' (early part):
  git p4: import/export of labels to/from p4
  git p4: Fixing script editor checks
Merge branch 'jc/index-v4' into jch

Trivially shrinks the on-disk size of the index file to save both I/O and
checksum overhead.  The "v4" format represented here may not be what we
eventually want to have, but the preparatory refactoring steps and the way
how backward compatibility is retained should give plenty to learn to GSoC
student-hopefuls.

The bottom one makes use of "varint" encoding from the stalled
jc/split-blob topic.

* jc/index-v4:
  update-index: upgrade/downgrade on-disk index version
  read-cache.c: write prefix-compressed names in the index
  read-cache.c: read prefix-compressed names in index on-disk version v4
  read-cache.c: move code to copy incore to ondisk cache to a helper function
  read-cache.c: move code to copy ondisk to incore cache to a helper function
  read-cache.c: report the header version we do not understand
  read-cache.c: make create_from_disk() report number of bytes it consumed
  read-cache.c: allow unaligned mapping of the index file
  cache.h: hide on-disk index details
  varint: make it available outside the context of pack
Merge branch 'tr/xdiff-fast-hash' into jch

Will merge to 'next'.

By Thomas Rast
* tr/xdiff-fast-hash:
  xdiff: load full words in the inner loop of xdl_hash_record
Merge branch 'cb/daemon-test-race-fix' into jch

Fix race condition between starting and waiting for git-daemon in the
test.

Will merge to 'next'.

By Clemens Buchacher
* cb/daemon-test-race-fix:
  git-daemon wrapper to wait until daemon is ready
Merge branch 'ld/git-p4-tags-and-labels' into jch

By Luke Diamand
* ld/git-p4-tags-and-labels:
  git p4: move verbose to base class
  git p4: Ignore P4EDITOR if it is empty
  git p4: Squash P4EDITOR in test harness
  git p4: fix-up "import/export of labels to/from p4"
push: introduce new push.default mode "simple"

When calling "git push" without argument, we want to allow Git to do
something simple to explain and safe. push.default=matching is unsafe
when used to push to shared repositories, and hard to explain to
beginners in some contexts. It is debatable whether 'upstream' or
'current' is the safest or the easiest to explain, so introduce a new
mode called 'simple' that is the intersection of them: push to the
upstream branch, but only if it has the same name remotely. If not, give
an error that suggests the right command to push explicitely to
'upstream' or 'current'.

A question is whether to allow pushing when no upstream is configured. An
argument in favor of allowing the push is that it makes the new mode work
in more cases. On the other hand, refusing to push when no upstream is
configured encourages the user to set the upstream, which will be
beneficial on the next pull. Lacking better argument, we chose to deny
the push, because it will be easier to change in the future if someone
shows us wrong.

Original-patch-by: Jeff King <peff@peff.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>