gitweb: Cleanup git_print_log()

When we see a signed-off-by line (and its friends), we set $signoff
to true, but then we process the next line after we are done without
giving control to the rest of the loop.  And when the line we saw is
not a signed-off-by line, we reset $signoff to false before running
the remainder of the loop.

Hence, the check for $signoff that attempts to remove an extra empty
line between two signed-off-by line was not doing anything useful.

Rename $empty to a more explicit name $skip_blank_line to tell us to
skip a blank line when we see one, set it after we see and emit a
blank line (to avoid showing more than one empty lines in a raw) or
after we handle a signed-off-by line (to avoid empty lines after
such a line), to fix this bug, and get rid of the $signoff variable
that is not useful.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb: Handle other types of tag in git_print_log

There are many types of tags used in S-o-b area [1].
Update the regex to handle them properly. It requires
the tag should be started by a capital letter and ended
by '-by: ' or '-By: '. The only exception is 'Cc: '.

[1] http://lwn.net/Articles/503829/

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb: Add support to Link: tag

The tip tree is the one of major subsystem tree in the
Linux kernel project. On the tip tree, the Link: (or
similar Buglink:) tag is used for tracking the original
discussion or context. Since it's ususally in the S-o-b
area, it'd be better using same style with others.

Also as it tends to contain a message-id sent from git
send-email, a part of the line would set a wrong hyperlink
like [1]. Fix it by not using format_log_line_html().

[1] git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=08942f6d5d992e9486b07653fd87ea8182a22fa0

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'mm/push-default-switch-warning' into jch

Will defer for another cycle.

# By Matthieu Moy
* mm/push-default-switch-warning:
  push: start warning upcoming default change for push.default
Merge branch 'jn/perl-makemaker-leading-paths' into jch

Minor build tweak.  People who do not use ExtUtils::MakeMaker may
want to test this before it hits the 'master' branch.

Will merge to 'master'.

# By Johannes Sixt (1) and Jonathan Nieder (1)
* jn/perl-makemaker-leading-paths:
  perl/Makefile: Fix a missing double-quote
  perl/Makefile: move "mkdir -p" to module installation loop for maintainability
Merge branch 'mm/config-xdg' into jch

Teach git to read various information from $XDG_CONFIG_HOME/git/ to allow
the user to avoid cluttering $HOME.

Will merge to 'master'.

# By Huynh Khoi Nguyen Nguyen
* mm/config-xdg:
  config: write to $XDG_CONFIG_HOME/git/config file when appropriate
  Let core.attributesfile default to $XDG_CONFIG_HOME/git/attributes
  Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore
  config: read (but not write) from $XDG_CONFIG_HOME/git/config file
Merge branch 'mm/credential-plumbing' into jch

Expose the credential API to scripted Porcelain writers.

Will merge to 'master'.

# By Matthieu Moy (2) and Javier Roucher Iglesias (1)
* mm/credential-plumbing:
  git-remote-mediawiki: add credential support
  git credential fill: output the whole 'struct credential'
  add 'git credential' plumbing command
Merge branch 'rj/platform-pread-may-be-thread-unsafe' into jch

On Cygwin, the platform pread(3) is not thread safe, just like our
own compat/ emulation, and cannot be used in the index-pack program.

Will merge to 'master'.

* rj/platform-pread-may-be-thread-unsafe:
  index-pack: Disable threading on cygwin
Merge branch 'vr/use-our-perl-in-tests' into jch

Some implementations of Perl terminates "lines" with CRLF even when
the script is operating on just a sequence of bytes.  Make sure to
use "$PERL_PATH", the version of Perl the user told Git to use, in
our tests to avoid unnecessary breakages in tests.

# By Junio C Hamano (3) and Vincent van Ravesteijn (1)
* vr/use-our-perl-in-tests:
  t/README: add a bit more Don'ts
  tests: enclose $PERL_PATH in double quotes
  t/test-lib.sh: export PERL_PATH for use in scripts
  t: Replace 'perl' by $PERL_PATH
Merge branch 'cw/no-detaching-an-unborn' into jch

"git checkout --detach", when you are still on an unborn branch,
should be forbidden, but it wasn't.

# By Chris Webb
* cw/no-detaching-an-unborn:
  git-checkout: disallow --detach on unborn branch
Merge branch 'cw/rebase-i-root' into jch

* cw/rebase-i-root:
  t3404: make test 57 work with dash and others
  Add tests for rebase -i --root without --onto
  rebase -i: support --root without --onto
Merge branch 'mz/rebase-no-mbox' into jch

Teach "am --rebasing" codepath to grab authorship, log message and
the patch text directly out of existing commits.  This will help
rebasing commits that have confusing "diff" output in their log
messages.

* mz/rebase-no-mbox:
  am: don't call mailinfo if $rebasing
  am --rebasing: get patch body from commit, not from mailbox
  rebase --root: print usage on too many args
  rebase: don't source git-sh-setup twice

Conflicts:
	t/t3412-rebase-root.sh
Merge branch 'js/fast-export-paths-with-spaces' into jch

"git fast-export" produced an input stream for fast-import without
properly quoting pathnames when they contain SPs in them.

# By Jay Soffian
* js/fast-export-paths-with-spaces:
  fast-export: quote paths with spaces
Merge branch 'mm/mediawiki-file-attachments' (early part) into jch

# By Matthieu Moy (3) and others
* 'mm/mediawiki-file-attachments' (early part):
  git-remote-mediawiki: import "File:" attachments
  git-remote-mediawiki: split get_mw_pages into smaller functions
  git-remote-mediawiki: send "File:" attachments to a remote wiki
  git-remote-mediawiki: don't "use encoding 'utf8';"
  git-remote-mediawiki: don't compute the diff when getting commit message
Merge branch 'pw/git-p4-tests' into jch

More "git p4" tests.

# By Pete Wyckoff
* pw/git-p4-tests:
  git p4 test: fix badp4dir test
  git p4 test: split up big t9800 test
  git p4 test: cleanup_git should make a new $git
  git p4 test: copy source indeterminate
  git p4 test: check for error message in failed test
  git p4 test: rename some "git-p4 command" strings
  git p4 test: never create default test repo
  git p4 test: simplify quoting involving TRASH_DIRECTORY
  git p4 test: use real_path to resolve p4 client symlinks
  git p4 test: wait longer for p4d to start and test its pid
Merge branch 'mz/empty-rebase-test' into jch

We did not have test to make sure "git rebase" without extra options
filters out an empty commit in the original history.

# By Martin von Zweigbergk
* mz/empty-rebase-test:
  add test case for rebase of empty commit
Merge branch 'cw/help-over-network' into jch

"git help -w $cmd" can show HTML version of documentation for
"git-$cmd" by setting help.htmlpath to somewhere other than the
default location where the build procedure installs them locally;
the variable can even point at a http:// URL.

# By Chris Webb
* cw/help-over-network:
  Allow help.htmlpath to be a URL prefix
  Add config variable to set HTML path for git-help --web
Merge branch 'jc/maint-blame-unique-abbrev' into jch

"git blame" did not try to make sure the abbreviated commit object
names in its output are unique.

Will merge to 'master', and then to older maintenance releases.

* jc/maint-blame-unique-abbrev:
  blame: compute abbreviation width that ensures uniqueness

Conflicts:
	builtin/blame.c
Merge branch 'tb/sanitize-decomposed-utf-8-pathname' into jch

Teaches git to normalize pathnames read from readdir(3) and all
arguments from the command line into precomposed UTF-8 (assuming
that they come as decomposed UTF-8) to work around issues on Mac OS.

I think there still are other places that need conversion
(e.g. paths that are read from stdin for some commands), but this
should be a good first step in the right direction.

Will merge to 'next'.

# By Torsten Bögershausen
* tb/sanitize-decomposed-utf-8-pathname:
  git on Mac OS and precomposed unicode
Merge branch 'jc/refactor-diff-stdin' into jch

Due to the way "git diff --no-index" is bolted onto by touching the
low level code that is shared with the rest of the "git diff" code,
even though it has to work in a very different way, any comparison
that involves a file "-" at the root level incorrectly tried to read
from the standard input.  This cleans up the no-index codepath
further to remove code that reads from the standard input from the
core side, which is never necessary when git is running its usual
diff operation.

Will merge to 'next', and later down to older maintenance releases.

* jc/refactor-diff-stdin:
  diff-index.c: "git diff" has no need to read blob from the standard input
  diff-index.c: unify handling of command line paths
  diff-index.c: do not pretend paths are pathspecs

Conflicts:
	diff-no-index.c