get_fetch_map(): tighten checks on dest refs

The code to check the refname we store the fetched result locally did not
bother checking the first 5 bytes of it, presumably assuming that it
always begin with "refs/".  For a fetch refspec (or the result of applying
wildcard on one), we always want the RHS to map to something inside
"refs/" hierarchy, so let's spell that rule out in a more explicit way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'fa/vcs-svn' into pu

A follow-up to a GSoC project, but seems not quite ready.
Will discard.

* fa/vcs-svn:
  vcs-svn: remove repo_tree
  vcs-svn/svndump: rewrite handle_node(), begin|end_revision()
  vcs-svn/svndump: restructure node_ctx, rev_ctx handling
  svndump: move struct definitions to .h
Merge branch 'aw/rebase-am-failure-detection' into pu

I am unhappy a bit about the possible performance implications of
having to store the output in a temporary file only for a rare case
of format-patch aborting.

* aw/rebase-am-failure-detection:
  rebase: Handle cases where format-patch fails
Merge branch 'ta/doc-cleanup' into pu

Misapplication of a patch fixed; the ones near the tip needs to
update the links to point at the html files, though.

* ta/doc-cleanup:
  Documentation/howto: convert plain text files to asciidoc
  Documentation/technical: convert plain text files to asciidoc
  Change headline of technical/send-pack-pipeline.txt to not confuse its content with content from git-send-pack.txt
  Shorten two over-long lines in git-bisect-lk2009.txt by abbreviating some sha1
  Split over-long synopsis in git-fetch-pack.txt into several lines
Merge branch 'mo/cvs-server-updates' into pu

* mo/cvs-server-updates:
  cvsserver Documentation: new cvs ... -r support
  cvsserver: add t9402 to test branch and tag refs
  cvsserver: support -r and sticky tags for most operations
  cvsserver: Add version awareness to argsfromdir
  cvsserver: generalize getmeta() to recognize commit refs
  cvsserver: implement req_Sticky and related utilities
  cvsserver: add misc commit lookup, file meta data, and file listing functions
  cvsserver: define a tag name character escape mechanism
  cvsserver: cleanup extra slashes in filename arguments
  cvsserver: factor out git-log parsing logic
Merge branch 'lt/diff-stat-show-0-lines' into pu

We failed to mention a file without any content change but whose
permission bit was modified, or (worse yet) a new file without any
content in the "git diff --stat" output.

* lt/diff-stat-show-0-lines:
  Fix "git diff --stat" for interesting - but empty - file changes
Merge branch 'jc/prettier-pretty-note' into pu

Needs updates to the placeholder documentation.

* jc/prettier-pretty-note:
  Documentation: decribe format-patch --notes
  format-patch --notes: show notes after three-dashes
  format-patch: append --signature after notes
  pretty_print_commit(): do not append notes message
  pretty: prepare notes message at a centralized place
  format_note(): simplify API
  pretty: remove reencode_commit_message()
Merge branch 'jn/warn-on-inaccessible-loosen' into pu

An RFC to deal with a situation where .config/git is a file and we
notice .config/git/config is not readable due to ENOTDIR, not
ENOENT; I think a bit more refactored approach to consistently
address permission errors across config, exclude and attrs is
desirable.  Don't we also need a check for an opposite situation
where we open .config/git/config or .gitattributes for reading but
they turn out to be directories?

* jn/warn-on-inaccessible-loosen:
  config: exit on error accessing any config file
  doc: advertise GIT_CONFIG_NOSYSTEM
  config: treat user and xdg config permission problems as errors
  config, gitignore: failure to access with ENOTDIR is ok
Merge branch 'cr/cvsimport-local-zone' into pu

Allows "cvsimport" to read per-author timezone from the author info
file.

* cr/cvsimport-local-zone:
  git-cvsimport: allow author-specific timezones
Merge branch 'jc/apply-trailing-blank-removal' into pu

Fix to update_pre_post_images() that did not take into account the
possibility that whitespace fix could shrink the preimage and
change the number of lines in it.

Extra set of eyeballs appreciated.

* jc/apply-trailing-blank-removal:
  apply.c:update_pre_post_images(): the preimage can be truncated
Merge branch 'nd/tree-walk-enum-cleanup' into pu

* nd/tree-walk-enum-cleanup:
  tree-walk: use enum interesting instead of integer
Merge branch 'jc/maint-fetch-tighten-refname-check' into pu

* jc/maint-fetch-tighten-refname-check:
  get_fetch_map(): tighten checks on dest refs
Merge branch 'tx/relative-in-the-future' into pu

Not my itch; rewritten an earlier submission by Tom Xue into
somewhat more maintainable form, though it breaks existing i18n.

Waiting for a voluteer to fix it up.
Otherwise may discard.

* tx/relative-in-the-future:
  date: show relative dates in the future
  date: refactor the relative date logic from presentation
Merge branch 'jx/test-real-path' into pu

Running tests with the "trash" directory elsewhere with the "--root"
option did not work well if the directory was specified by a symbolic
link pointing at it.

Seems broken as it makes $(pwd) and TRASH_DIRECTORY inconsistent.
Will discard.

* jx/test-real-path:
  test: set the realpath of CWD as TRASH_DIRECTORY
Merge branch 'as/test-tweaks' into pu

Various minor tweaks to the test framework to paint its output
lines in colors that match what they mean better.

Has the "is this really blue?" issue Peff raised resolved???

* as/test-tweaks:
  tests: paint unexpectedly fixed known breakages in bold red
  tests: test the test framework more thoroughly
  [SQUASH] t/t0000-basic.sh: quoting of TEST_DIRECTORY is screwed up
  tests: refactor mechanics of testing in a sub test-lib
  tests: paint skipped tests in bold blue
  tests: test number comes first in 'not ok $count - $message'
  tests: paint known breakages in bold yellow
Merge branch 'ms/contrib-thunderbird-updates' into pu

Update helper to send out format-patch output using Thunderbird.
Seems to have design regression for silent users.

* ms/contrib-thunderbird-updates:
  [SQUASH] minimum fixup
  Thunderbird: fix appp.sh format problems
Merge branch 'mb/remote-default-nn-origin' into pu

When the user does not specify what remote to interact with, we
often attempt to use 'origin'.  This can now be customized via a
configuration variable.

Expecting a reroll.

"The first remote becomes the default" bit is better done as a
separate step.

* mb/remote-default-nn-origin:
  Teach get_default_remote to respect remote.default.
  Test that plain "git fetch" uses remote.default when on a detached HEAD.
  Teach clone to set remote.default.
  Teach "git remote" about remote.default.
  Teach remote.c about the remote.default configuration setting.
  Rename remote.c's default_remote_name static variables.

Conflicts:
	builtin/remote.c
	t/t5505-remote.sh
Merge branch 'jc/split-blob' into pu

Not ready.

I finished the streaming checkout codepath, but as explained in
127b177 (bulk-checkin: support chunked-object encoding, 2011-11-30),
these are still early steps of a long and painful journey. At least
pack-objects and fsck need to learn the new encoding for the series
to be usable locally, and then index-pack/unpack-objects needs to
learn it to be used remotely.

Given that I heard a lot of noise that people want large files, and
that I was asked by somebody at GitTogether'11 privately for an
advice on how to pay developers (not me) to help adding necessary
support, I am somewhat disappointed that the original patch series
that was sent long time ago still remains here without much comments
and updates from the developer community. I even made the interface
to the logic that decides where to split chunks easily replaceable,
and I deliberately made the logic in the original patch extremely
stupid to entice others, especially the "bup" fanbois, to come up
with a better logic, thinking that giving people an easy target to
shoot for, they may be encouraged to help out. The plan is not
working :-<.

* jc/split-blob:
  chunked-object: streaming checkout
  chunked-object: fallback checkout codepaths
  bulk-checkin: support chunked-object encoding
  bulk-checkin: allow the same data to be multiply hashed
  new representation types in the packstream
  packfile: use varint functions

Conflicts:
	builtin/pack-objects.c
	streaming.c
	t/t1050-large.sh
Merge branch 'ph/credential-refactor' into pu

Attempts to refactor to share code among OSX keychain, Gnome keyring
and Win32 credential helpers.

* ph/credential-refactor:
  wincred: port to generic credential helper
  osxkeychain: port to generic credential helper implementation
  gnome-keyring: port to generic helper implementation
  contrib: add generic credential helper
Merge branch 'jc/xprm-generation' into pu

A toy to analyze how bad the clock skews are in histories of real
world projects.

Stalled mostly due to lack of responses.

* jc/xprm-generation:
  test-generation: compute generation numbers and clock skews