gitweb: refer to picon/gravatar images over the same scheme

With the current code, the images from picon and gravatar are
requested over http://, and browsers give mixed contents warning
when gitweb is served over https://.

Just drop the scheme: part from the URL, so that these external
sites are accessed over https:// in such a case.

Signed-off-by: Andrej E Baranov <admin@andrej-andb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetools: simplify how we handle "vim" and "defaults"

Remove the exceptions for "vim" and "defaults" in the mergetool library
so that every filename in mergetools/ matches 1:1 with the name of a
valid built-in tool.

Define the trivial fallback definition of shell functions in-line in
git-mergetool-lib script, instead of dot-sourcing them from another
file.  The result is much easier to follow.

[jc: squashed in an update from John Keeping as well]

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetool--lib: simplify command expressions

Update variable assignments to always use $(command "$arg")
in their RHS instead of "$(command "$arg")" as the latter
is harder to read.  Make get_merge_tool_cmd() simpler by
avoiding "echo" and $(command) substitutions completely.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetool--lib: improve the help text in guess_merge_tool()

This code path is only activated when the user does not have a valid
configured tool.  Add a message to guide new users towards configuring a
default tool.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mergetool--lib: add functions for finding available tools

Refactor show_tool_help() so that the tool-finding logic is broken out
into a separate show_tool_names() function.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
doc: generate a list of valid merge tools

Use the show_tool_names() function to build lists of all
the built-in tools supported by difftool and mergetool.
This frees us from needing to update the documentation
whenever a new tool is added.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack: simplify request validation

Long time ago, we used to punt on a large (read: asking for more
than 256 refs) fetch request and instead sent a full pack, because
we couldn't fit many refs on the command line of rev-list we run
internally to enumerate the objects to be sent.  To fix this,
565ebbf (upload-pack: tighten request validation., 2005-10-24),
added a check to count the number of refs in the request and matched
with the number of refs we advertised, and changed the invocation of
rev-list to pass "--all" to it, still keeping us under the command
line argument limit.

However, these days we feed the list of objects requested and the
list of objects the other end is known to have via standard input,
so there is no longer a valid reason to special case a full clone
request.  Remove the code associated with "create_full_pack" to
simplify the logic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload/receive-pack: allow hiding ref hiearchies

Teach upload-pack and receive-pack to omit some refs from the
initial advertisement by introducing the transfer.hiderefs
multivalued configuration variable.  Any ref that is under the
hierarchies listed on the value of this variable is excluded from
responses to "ls-remote", "fetch", "clone" or "push" requests.  One
typical use case may be

	[transfer]
		hiderefs = refs/pull

to hide the refs hosting sites internally use to record pull
requests made against the repository, whose objects do not yet
logically belong to the project.

As these refs do not count as OUR_REF, an attempt to fetch objects
at the tip of them will be rejected.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
receive-pack: reject an attempt to update/delete a hidden ref

An attempt to update or delete a ref that is hidden from "git push"
is rejected.  With this the server side can implement refs that are
only available for its own use, e.g. refs/pull/11/head used to hold
an incoming pull request at GitHub.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack: optionally allow fetching from the tips of hidden refs

With uploadpack.allowtipsha1inwant configuration option set, future
versions of "git fetch" that allow an exact object name (likely to
have been obtained out of band) on the LHS of the fetch refspec can
make a request with a "want" line that names an object that may not
have been advertised due to transfer.hiderefs configuration.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ta/doc-no-small-caps' into jch

Update documentation to change "GIT" which was a poor-man's small
caps to "Git" which was the intended spelling.  Also change "git"
spelled in all-lowercase to "Git" when it refers to the system as
the whole or the concept it embodies, as opposed to the command the
end users would type.

Will wait for a week or so (say, til end of January) for Thomas to
collect fix-ups, squash the result into two patches and then merge
to 'next'.

* ta/doc-no-small-caps:
  fixup! Change 'git' to 'Git' whenever the whole system is referred to #4
  Change 'git' to 'Git' whenever the whole system is referred to #4
  fixup! Change 'git' to 'Git' whenever the whole system is referred to #3
  Change 'git' to 'Git' whenever the whole system is referred to #3
  fixup! Change 'git' to 'Git' whenever the whole system is referred to #2
  Change 'git' to 'Git' whenever the whole system is referred to #2
  fixup! fixup! Change 'git' to 'Git' whenever the whole system is referred to #1
  fixup! Change 'git' to 'Git' whenever the whole system is referred to #1
  Change 'git' to 'Git' whenever the whole system is referred to #1
  Documentation: avoid poor-man's small caps

Conflicts:
	Documentation/git-cvsimport.txt
	Documentation/howto/maintain-git.txt
Merge branch 'jk/mergetool' into jch

Cleans up mergetool/difftool combo.

A replacement for the tip one has been requested.
$gmane/214858

* jk/mergetool:
  mergetools: simplify how we handle "vim" and "defaults"
  mergetool--lib: don't call "exit" in setup_tool
  mergetool--lib: improve show_tool_help() output
  mergetools/vim: remove redundant diff command
  git-difftool: use git-mergetool--lib for "--tool-help"
  git-mergetool: don't hardcode 'mergetool' in show_tool_help
  git-mergetool: remove redundant assignment
  git-mergetool: move show_tool_help to mergetool--lib
Merge branch 'da/mergetool-docs' into jch

Build on top of the clean-up done by jk/mergetool and automatically
generate the list of mergetool and difftool backends the build
supports to be included in the documentation.

This may still need to be fixed up at minor details; I'd like to
see a review from John Keeping on these.

* da/mergetool-docs:
  doc: generate a list of valid merge tools
  mergetool--lib: add functions for finding available tools
  mergetool--lib: improve the help text in guess_merge_tool()
  mergetool--lib: simplify command expressions

Conflicts:
	Documentation/Makefile
Merge branch 'jk/gc-auto-after-fetch' into jch

This is to resolve merge conflicts early for the same topic to
recent codebase.

Will merge to 'next'.

* jk/gc-auto-after-fetch:
  fetch-pack: avoid repeatedly re-scanning pack directory
  fetch: run gc --auto after fetching
Merge branch 'jk/read-commit-buffer-data-after-free' into jch

Clarify the ownership rule for commit->buffer field, which some
callers incorrectly accessed without making sure the data is
available there.

Will merge to 'next'.

* jk/read-commit-buffer-data-after-free:
  logmsg_reencode: lazily load missing commit buffers
  logmsg_reencode: never return NULL
  commit: drop useless xstrdup of commit message
Merge branch 'ss/mergetools-tortoise' into jch

Update mergetools to work better with newer merge helper tortoise ships.

Will merge to 'next'.

* ss/mergetools-tortoise:
  mergetools: allow passing pathnames with SP in them to TortoiseGitMerge
  mergetools: support TortoiseGitMerge
Merge branch 'bc/git-p4-for-python-2.4' into jch

With small updates to remove dependency on newer features of
Python, keep git-p4 usable with older Python.

Will merge to 'next'.

* bc/git-p4-for-python-2.4:
  git-p4.py: support Python 2.4
  git-p4.py: support Python 2.5
Merge branch 'nd/branch-error-cases' into jch

Fix various error messages and conditions in "git branch", e.g. we
advertised "branch -d/-D" to remove one or more branches but actually
implemented removal of zero or more branches---request to remove no
branches was not rejected.

Will merge to 'next', perhaps after rebasing on an older base
so that this can later be merged to the maintenance track.

* nd/branch-error-cases:
  branch: mark more strings for translation
  branch: give a more helpful message on redundant arguments
  branch: reject -D/-d without branch name
  branch: no detached HEAD check when editing another branch's description
Merge branch 'jc/hidden-refs' into jch

* jc/hidden-refs:
  upload-pack: optionally allow fetching from the tips of hidden refs
  receive-pack: reject an attempt to update/delete a hidden ref
  upload/receive-pack: allow hiding ref hiearchies
  upload-pack: simplify request validation
  upload-pack: share more code
Merge branch 'mp/complete-paths' into jch

The completion script used to let the default completer to suggest
pathnames, which gave too many irrelevant choices (e.g. "git add"
would not want to add an unmodified path).  Teach it to use a more
git-aware logic to enumerate only relevant ones.

This is logically the right thing to do, and we would really love
to see people who have been involved in completion code to review
and comment on the implementation.

Will merge to 'next' to see if anybody screams.

* mp/complete-paths:
  git-completion.bash: add support for path completion