merge: teach -Xours/-Xtheirs to binary ll-merge driver

The (discouraged) -Xours/-Xtheirs modes of merge are supposed to
give a quick and dirty way to come up with a random mixture of
cleanly merged parts and punted conflict resolution to take contents
from one side in conflicting parts.  These options however were only
passed down to the low level merge driver for text.

Teach the built-in binary merge driver to notice them as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr: "binary" attribute should choose built-in "binary" merge driver

The built-in "binary" attribute macro expands to "-diff -text", so
that textual diff is not produced, and the contents will not go
through any CR/LF conversion ever.  During a merge, it should also
choose the "binary" low-level merge driver, but it didn't.

Make it expand to "-diff -merge -text".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
mailinfo: strip "RE: " prefix

We already strip the more common Re: and re:, and we do not often
see RE: from saner MUA, but this prefix does exist and gets used
from time to time.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
completion: add --set-upstream-to and --unset-upstream

Remove --set-upstream as it's deprecated now.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
completion: complete branch name for "branch --set-upstream-to="

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
build: improve GIT_CONF_SUBST signature

Now, in configure.ac, a call like:

    GIT_CONF_SUBST([FOO])

will be considered equivalent to:

    GIT_CONF_SUBST([FOO], [$FOO])

This is mostly a preparatory refactoring in view of future changes.
No semantic change to the generated configure or config.mak.auto is
intended.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
build: don't duplicate substitution of make variables

Thanks to our 'GIT_CONF_SUBST' layer in configure.ac, a make variable 'VAR'
can be defined to a value 'VAL' at ./configure runtime in our build system
simply by using "GIT_CONF_SUBST([VAR], [VAL])" in configure.ac, rather than
having both to call "AC_SUBST([VAR], [VAL])" in configure.ac and adding the
'VAR = @VAR@' definition in config.mak.in.  Less duplication, less margin
for error, less possibility of confusion.

While at it, fix some formatting issues in configure.ac that unnecessarily
obscured the code flow.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c: fix broken list iteration in clear_child_for_cleanup

Iterate through children_to_clean using 'next' fields but with an
extra level of indirection. This allows us to update the chain when
we remove a child and saves us managing several variables around
the loop mechanism.

Signed-off-by: David Gould <david@optimisefitness.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ll-merge: warn about inability to merge binary files only when we can't

When a path being merged is auto detected to be a binary file, we
warned "Cannot merge binary files" before switching to activate the
binary ll-merge driver.  When we are merging with the -Xours/theirs
option, however, we know what the "clean" merge result is, and the
warning is inappropriate.

In addition, when the path is explicitly marked as a binary file,
this warning was not issued, even though without -Xours/theirs, we
cannot cleanly automerge such a path, which was inconsistent.

Move the warning code from ll_xdl_merge() to ll_binary_merge(), and
issue the message only when we cannot cleanly automerge.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11

* jc/maint-checkout-fileglob-doc:
  gitcli: contrast wildcard given to shell and to git
  gitcli: formatting fix
  Document file-glob for "git checkout -- '*.c'"
Merge branch 'da/gitk-reload-tag-contents' into maint-1.7.11

* da/gitk-reload-tag-contents:
  gitk: Rename 'tagcontents' to 'cached_tagcontent'
  gitk: Teach "Reread references" to reload tags
  gitk: Avoid Meta1-F5
Merge branch 'rj/test-regex' into maint-1.7.11

* rj/test-regex:
  test-regex: Add a test to check for a bug in the regex routines
Merge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11

* jc/maint-ident-missing-human-name:
  split_ident_line(): make best effort when parsing author/committer line
Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11

* jk/maint-quiet-is-synonym-to-s-in-log:
  log: fix --quiet synonym for -s
Git 1.7.11.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sync with 1.7.11.7
Merge branch 'mz/cherry-pick-cmdline-order' into maint

* mz/cherry-pick-cmdline-order:
  cherry-pick/revert: respect order of revisions to pick
  demonstrate broken 'git cherry-pick three one two'
  teach log --no-walk=unsorted, which avoids sorting
Merge branch 'jc/send-email-reconfirm' into maint

* jc/send-email-reconfirm:
  send-email: validate & reconfirm interactive responses
Merge branch 'sb/send-email-reconfirm-fix' into maint

* sb/send-email-reconfirm-fix:
  send-email: initial_to and initial_reply_to are both optional
Draft release notes to 1.7.12.1

We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>