log-tree: use custom line terminator in line termination mode

When using a custom format in line termination mode (as opposed to line
separation mode), the configured line terminator is not used, so things
like "git log --pretty=tformat:%H -z" do not work properly.

Make it use the line terminator the user ordered.

Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree: the previous one is still not quite right

The correct output would have NUL after each commit, so "-z --format=%s"
would have a single-liner subject with the line-terminating LF replaced
with NUL, and "-p/--stat -z --format=%s" would have a single-liner subject
with its line-terminating LF, followed by the diff/diffstat in which the
terminating LF of the last line is replaced with NUL, but to be consistent
with what "-p/--stat -z --pretty=format:%s" does, I think it is OK to
append NUL to the diff/diffstat part instead of replacing its last LF with
NUL.

The added test shows the update is still not right for "-p -z --format".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'lp/diffstat-with-graph' (early part) into jch

By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (1)
* 'lp/diffstat-with-graph' (early part):
  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 'jc/index-v4' into jch

Trivially shrinks the on-disk size of the index file to save both I/O and
checksum overhead.  It even comes with a technical doc updates.

The topic should give a solid base to build on further updates, with the
code refactoring in its earlier parts, and the backward compatibility
mechanism in its later parts.

Will merge to "master".

* jc/index-v4:
  index-v4: document the entry format
  unpack-trees: preserve the index file version of original
  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

Use word-at-a-time comparison to find end of line or NUL (end of buffer),
borrowed from the linux-kernel discussion.

Will merge to "master".

By Thomas Rast
* tr/xdiff-fast-hash:
  xdiff: choose XDL_FAST_HASH code on sizeof(long) instead of __WORDSIZE
  xdiff: load full words in the inner loop of xdl_hash_record
Merge branch 'nd/i18n' (early part) into jch

By Nguyễn Thái Ngọc Duy (9) and Jonathan Nieder (1)
* 'nd/i18n' (early part):
  i18n: bundle: mark strings for translation
  i18n: index-pack: mark strings for translation
  i18n: apply: update say_patch_name to give translators complete sentence
  i18n: apply: mark strings for translation
  i18n: remote: mark strings for translation
  i18n: make warn_dangling_symref() automatically append \n
  i18n: help: mark strings for translation
  i18n: mark relative dates for translation
  strbuf: convenience format functions with \n automatically appended
  Makefile: feed all header files to xgettext

Conflicts:
	builtin/apply.c
	bundle.c
	refs.c
Merge branch 'mm/simple-push' into jch

New users tend to work on one branch at a time and push the result
out. The current and upstream modes of push is a more suitable default
mode than matching mode for these people, but neither is surprise-free
depending on how the project is set up. Introduce a "simple" mode that
is a subset of "upstream" but only works when the branch is named the same
between the remote and local repositories.

The plan is to make it the new default when push.default is not
configured.

Will merge to "master".

By Matthieu Moy (5) and others
* mm/simple-push:
  push.default doc: explain simple after upstream
  push: document the future default change for push.default (matching -> simple)
  t5570: use explicit push refspec
  push: introduce new push.default mode "simple"
  t5528-push-default.sh: add helper functions
  Undocument deprecated alias 'push.default=tracking'
  Documentation: explain push.default option a bit more
Merge branch 'nd/i18n' into jch

More message strings marked for i18n.

Will merge to "master".

By Nguyễn Thái Ngọc Duy
* nd/i18n:
  help: replace underlining "help -a" headers using hyphens with a blank line
Merge branch 'jk/doc-asciidoc-inline-literal' into jch

Our documentation was written for an ancient version of AsciiDoc,
making the source not very readable.

Will merge to "master".

By Jeff King
* jk/doc-asciidoc-inline-literal:
  docs: stop using asciidoc no-inline-literal
Merge branch 'zj/mksh-columns-breakage' into jch

A broken shell may not let us set an environment value to an arbitrary
value, interfering with some of the tests. Introduce a test prerequisite
so that we can skip some tests on such a platform.

Will merge to "master".

By Zbigniew Jędrzejewski-Szmek
* zj/mksh-columns-breakage:
  test-lib: skip test with COLUMNS=1 under mksh
Merge branch 'lp/diffstat-with-graph' into jch

Will merge to "master".

By Zbigniew Jędrzejewski-Szmek
* lp/diffstat-with-graph:
  t4052: work around shells unable to set COLUMNS to 1
Merge branch 'nd/columns' into jch

A couple of commands learn --column option to produce columnar output.

Will merge to "master".

By Nguyễn Thái Ngọc Duy (9) and Zbigniew Jędrzejewski-Szmek (1)
* nd/columns:
  tag: add --column
  column: support piping stdout to external git-column process
  status: add --column
  branch: add --column
  help: reuse print_columns() for help -a
  column: add dense layout support
  t9002: work around shells that are unable to set COLUMNS to 1
  column: add columnar layout
  Stop starting pager recursively
  Add column layout skeleton and git-column

Conflicts:
	builtin/branch.c
	builtin/help.c
	help.c
	help.h
Merge branch 'jc/rerere-train' into jch

A script written long time ago proved to be useful this week for me ;-)
with a minor tweak.

Will merge to "master".

* jc/rerere-train:
  contrib/rerere-train: use installed git-sh-setup
Merge branch 'ab/i18n' into jch

Fixes some constructs that build messages meant for i18n by concatenating
pieces of strings.

Will merge to "master".

By Ævar Arnfjörð Bjarmason
* ab/i18n:
  git-commit: remove lego in i18n messages
  git-commit: remove lego in i18n messages
  git-branch: remove lego in i18n messages
Merge branch 'pw/message-cleanup' into jch

Many error/warning messages had extra trailing newlines that are
unnecessary.

By Pete Wyckoff
* pw/message-cleanup:
  remove blank filename in error message
  remove superfluous newlines in error messages
Merge branch 'pw/p4-various' into jch

Miscellaneous updates to "git p4".

Will merge to 'master'.

By Pete Wyckoff
* pw/p4-various:
  git p4: submit files with wildcards
  git p4: fix writable file after rename or copy
  git p4: test submit
  git p4: bring back files in deleted client directory
Merge branch 'jk/maint-gitweb-test-use-sane-perl' into jch

Will merge to 'master'.

By Jeff King (1) and Zbigniew Jędrzejewski-Szmek (1)
* jk/maint-gitweb-test-use-sane-perl:
  Consistently use perl from /usr/bin/ for scripts
  t/gitweb-lib: use $PERL_PATH to run gitweb
Merge branch 'zj/diff-stat-smaller-num-columns' into jch

Spend only minimum number of columns necessary to show the number of lines
in the output from "diff --stat", instead of always allocating 4 columns
even when showing changes that are much smaller than 1000 lines.

Will merge to 'master'.

By Zbigniew Jędrzejewski-Szmek
* zj/diff-stat-smaller-num-columns:
  diff --stat: use less columns for change counts
Merge branch 'zj/diff-empty-chmod' into jch

"git diff --stat" used to fully count a binary file with modified
execution bits whose contents is unmodified, which was not right.

Will merge to 'next' after consulting the original author on the fixup!
simplification.

By Zbigniew Jędrzejewski-Szmek
* zj/diff-empty-chmod:
  diff --stat: do not run diff on indentical files
  diff --stat: report mode-only changes for binary files like text files
  tests: check --[short]stat output after chmod
  test: modernize style of t4006

Conflicts:
	diff.c
Merge branch 'jk/maint-push-progress' into jch

"git push" over smart-http lost progress output and this resurrects it.

Will merge to 'next'.

By Jeff King
* jk/maint-push-progress:
  t5541: test more combinations of --progress
  teach send-pack about --[no-]progress
  send-pack: show progress when isatty(2)

Conflicts:
	t/t5541-http-push.sh