cherry-pick: don't forget -s on failure

In case 'git cherry-pick -s <commit>' failed, the user had to use 'git
commit -s' (i.e. state the -s option again), which is easy to forget
about.  Instead, write the signed-off-by line early, so plain 'git
commit' will have the same result.

Also update 'git commit -s', so that in case there is already a relevant
Signed-off-by line before the Conflicts: line, it won't add one more at
the end of the message. If there is no such line, then add it before the
the Conflicts: line.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t7810-grep: bring log --grep tests in common form

The log --grep tests generate the expected out in different ways.
Make them all use command blocks so that subshells are avoided and the
expected output is easier to grasp visually.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t7810-grep: test multiple --grep with and without --all-match

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t7810-grep: test multiple --author with --all-match

The "--all-match" option is about "--grep", and does not affect how
"--author" or "--committer" limitation is applied.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t7810-grep: test interaction of multiple --grep and --author options

There are tests for this interaction already. Restructure slightly and
avoid any claims about --all-match.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t7810-grep: test --all-match with multiple --grep and --author options

The code used to have a bug that ignores "--all-match", that requires
all "--grep" to have matched, when "--author" or "--committer" was used.

Make sure the bug will not be reintroduced.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'rs/archive-zip-utf8' into jch

Need help from people on platforms on which Zip matters to see
compatiblity with other people's zip implementations.

Will merge to 'master' as part of the sixth batch.

* rs/archive-zip-utf8:
  archive-zip: support UTF-8 paths
Merge branch 'jc/mailinfo-RE' into jch

We strip the prefix from "Re: subject" and also from a less common
"re: subject", but left even less common "RE: subject" intact.

Will merge to 'master' as part of the seventh batch.

* jc/mailinfo-RE:
  mailinfo: strip "RE: " prefix
Merge branch 'dg/run-command-child-cleanup' into jch

The code to wait for subprocess and remove it from our internal queue
wasn't quite right.

Will merge to 'master' as part of the seventh batch.

* dg/run-command-child-cleanup:
  run-command.c: fix broken list iteration in clear_child_for_cleanup
Merge branch 'cn/branch-set-upstream-to' into jch

Finishing touches to the recently graduated topic to introduce
"git branch --set-upstream-to" option.

Will merge to 'master' as part of the seventh batch.

* cn/branch-set-upstream-to:
  completion: complete branch name for "branch --set-upstream-to="
  completion: add --set-upstream-to and --unset-upstream
Merge branch 'jc/ll-merge-binary-ours' into jch

"git merge -Xtheirs" did not help content-level merge of binary
files; it should just take their version.  Also "*.jpg binary" in
the attributes did not imply they should use the binary ll-merge
driver.

Will merge to 'master' as part of the seventh batch.

* jc/ll-merge-binary-ours:
  ll-merge: warn about inability to merge binary files only when we can't
  attr: "binary" attribute should choose built-in "binary" merge driver
  merge: teach -Xours/-Xtheirs to binary ll-merge driver

Conflicts:
	ll-merge.c
Merge branch 'sl/autoconf' into jch

Reduces repetition in configure.ac.

Will merge to 'master' as part of the seventh batch.

* sl/autoconf:
  build: don't duplicate substitution of make variables
  build: improve GIT_CONF_SUBST signature
Merge branch 'jc/maint-blame-no-such-path' into jch

"git blame MAKEFILE" run in a history that has "Makefile" but not
"MAKEFILE" should say "No such file MAKEFILE in HEAD", but got
confused on a case insensitive filesystem and failed to do so.

Even during a conflicted merge, "git blame $path" always meant to
blame uncommitted changes to the "working tree" version; make it
more useful by showing cleanly merged parts as coming from the other
branch that is being merged.

Will merge to 'next'.

* jc/maint-blame-no-such-path:
  blame: allow "blame file" in the middle of a conflicted merge
  blame $path: avoid getting fooled by case insensitive filesystems
Merge branch 'mh/string-list' into jch

Will merge to 'next'.

* mh/string-list:
  api-string-list.txt: initialize the string_list the easy way
  string_list: add a function string_list_longest_prefix()
  string_list: add a new function, string_list_remove_duplicates()
  string_list: add a new function, filter_string_list()
  string_list: add two new functions for splitting strings
  string_list: add function string_list_append_nodup()
Merge branch 'mh/fetch-filter-refs' into jch

Code simplification and clarification.

Will merge to 'next'.

* mh/fetch-filter-refs:
  fetch-pack: eliminate spurious error messages
  cmd_fetch_pack(): simplify computation of return value
  fetch-pack: report missing refs even if no existing refs were received
  cmd_fetch_pack(): return early if finish_connect() fails
  filter_refs(): simplify logic
  filter_refs(): build refs list as we go
  filter_refs(): delete matched refs from sought list
  fetch_pack(): update sought->nr to reflect number of unique entries
  filter_refs(): do not check the same sought_pos twice
  Change fetch_pack() and friends to take string_list arguments
  fetch_pack(): reindent function decl and defn
  Rename static function fetch_pack() to http_fetch_pack()
  t5500: add tests of fetch-pack --all --depth=N $URL $REF
  t5500: add tests of error output for missing refs
Merge branch 'jk/config-warn-on-inaccessible-paths' into jch

The attribute system may be asked for a path whose leading
directories do not exist in the current working tree.  In addition
to ENOENT, ENOTDIR must be ignored.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR
Merge branch 'nd/maint-diffstat-summary' into jch

Earlier we made the diffstat summary line that shows the number of
lines added/deleted localizable, but it was found irritating having
to see them in various languages on a list whose discussion language
is English.

Will merge to 'next'.
The original had trivial thinko in reverting Q_(), which has been
fixed.

* nd/maint-diffstat-summary:
  Revert diffstat back to English
Merge branch 'jc/maint-log-grep-all-match' (early part) into jch

* 'jc/maint-log-grep-all-match' (early part):
  log: document use of multiple commit limiting options
  log --grep/--author: honor --all-match honored for multiple --grep patterns
  grep: show --debug output only once
  grep: teach --debug option to dump the parse tree

Conflicts:
	builtin/grep.c
Merge branch 'jw/doc-commit-title' into jch

Update parts of document that talked about "first line of commit
log" to say "title of commit" with definition of what that "title"
is.

Will merge to 'next' after eyeballing.

* jw/doc-commit-title:
  Documentation: describe subject more precisely
fetch: align per-ref summary report in UTF-8 locales

fetch does printf("%-*s", width, "foo") where "foo" can be a utf-8
string, but width is in bytes, not columns. For ASCII it's fine as one
byte takes one column. For utf-8, this may result in misaligned ref
summary table.

Introduce gettext_width() function that returns the string length in
columns (currently only supports utf-8 locales). Make the code use
TRANSPORT_SUMMARY(x) where the length is compensated properly in
non-English locales.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>