rebase -i: teach "--exec <cmd>"

During an interactive rebase session, it is sometimes desirable to
run tests on each commit in the resulting history.  This can be done
by adding "exec <test command>" when editing the insn sheet, but the
command used for testing is often the same for all resulting commits.

By passing "--exec <cmd>" from the command line, automatically add
these "exec" lines after each commit in the final history.  To work
well with the --autosquash option, these are added at the end of
each runs of "fixup" and "squash".

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/version-string' into jch

I am somewhat tempted to merge this to master before 1.7.11 final.
Thoughts?

# By Jeff King
* jk/version-string:
  http: get default user-agent from git_user_agent
  version: add git_user_agent function
  move git_version_string into version.c
Merge branch 'jk/clone-local' into jch

"git clone --local $path" started its life as an experiment to
optionally use link/copy when cloning a repository on the disk, but
we didn't deprecate it after we made the option a no-op to always
use the optimization.

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/clone-local:
  clone: allow --no-local to turn off local optimizations
  docs/clone: mention that --local may be ignored
Merge branch 'jk/no-more-asciidoc7' into jch

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/no-more-asciidoc7:
  docs: drop antique comment from Makefile
  docs: drop asciidoc7compatible flag
Merge branch 'jc/request-pull-match-tagname' into jch

"git request-pull $url dev" when the tip of "dev" branch was tagged
with "ext4-for-linus" used the contents from the tag in the output
but still asked the "dev" branch to be pulled, not the tag.

Not urgent; probably early post 1.7.11.

* jc/request-pull-match-tagname:
  request-pull: really favor a matching tag
Merge branch 'jc/bundle-complete-notice' into jch

Running "git bundle verify" on a bundle that records a complete
history said "it requires these 0 commits".

Not urgent; probably early post 1.7.11.

* jc/bundle-complete-notice:
  tweak "bundle verify" of a complete history
Merge branch 'vr/help-per-platform' into jch

Not urgent; probably early post 1.7.11.

* vr/help-per-platform:
  help: use HTML as the default help format on Windows

Conflicts:
	Makefile
Merge branch 'jk/maint-t1304-setfacl' into jch

Works around a false test failure caused by a bug in ecryptofs.

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/maint-t1304-setfacl:
  t1304: improve setfacl prerequisite setup
Merge branch 'jc/ls-files-i-dir' into jch

"git ls-files --exclude=t -i" did not consider anything under t/
as excluded, as it did not pay attention to exclusion of leading
paths while walking the index.  Other two users of excluded() are
also updated.

Not urgent; probably early post 1.7.11.

* jc/ls-files-i-dir:
  dir.c: make excluded() file scope static
  unpack-trees.c: use path_excluded() in check_ok_to_remove()
  builtin/add.c: use path_excluded()
  path_excluded(): update API to less cache-entry centric
  ls-files -i: micro-optimize path_excluded()
  ls-files -i: pay attention to exclusion of leading paths
Merge branch 'nd/stream-index-pack' into pu

Use streaming API to read from the object store to avoid having to hold
a large blob object in-core while running index-pack.

Not urgent; probably early post 1.7.11.

# By Nguyễn Thái Ngọc Duy
* nd/stream-index-pack:
  index-pack: use streaming interface for collision test on large blobs
  index-pack: factor out unpack core from get_data_from_pack
  index-pack: use streaming interface on large blobs (most of the time)
  index-pack: hash non-delta objects while reading from stream
Merge branch 'nd/stream-pack-objects' into pu

Not urgent; probably early post 1.7.11.

# By Nguyễn Thái Ngọc Duy
* nd/stream-pack-objects:
  pack-objects: use streaming interface for reading large loose blobs
Merge branch 'jk/no-more-pre-exec-callback' into pu

On hold for 6 months until ancient "less" goes extinct.

# By Jeff King
* jk/no-more-pre-exec-callback:
  pager: drop "wait for output to run less" hack
Merge branch 'mm/push-default-switch-warning' into pu

Will merge to next after 1.7.11.

Hopwefully we can have a solidly tested series early in 1.7.12 or
1.7.13 at the latest.

# By Matthieu Moy
* mm/push-default-switch-warning:
  push: start warning upcoming default change for push.default
Merge branch 'js/submodule-relative' into pu

Makes "git submodule" deal with nested submodule structure where a
module is contained within a module whose origin is specified as a
relative URL to its superproject's origin.

Not urgent; probably early post 1.7.11.

# By Jon Seymour
* js/submodule-relative:
  submodule: fix handling of superproject origin URLs like foo, ./foo and ./foo/bar
  submodule: fix sync handling of some relative superproject origin URLs
  submodule: document failure to handle relative superproject origin URLs
  submodule: additional regression tests for relative URLs
Merge branch 'jk/no-op-push-message' into pu

Rewords the status message of "git push" that pushed only one ref
differently from "Everything up-to-date", to give a bit more help to
people who get the message when their current branch is not pushed.

# By Jeff King
* jk/no-op-push-message:
  improve no-op push output
Merge branch 'nl/http-proxy-more' into pu

I queued only the later two patches from this series, even though they do
not make much sense without the first one that seems to need a bit more
work, so that we won't forget.

# By Jeff King (1) and Nelson Benitez Leon (1)
* nl/http-proxy-more:
  http: rename HTTP_REAUTH to HTTP_AUTH_RETRY
  http: Avoid limit of retrying request only twice
Merge branch 'sg/bash-prompt' into pu

This is only the "correction" bits taken from the beginning of a larger
series that is to be rerolled.  The first two are tangled with Felipe's
topic so a reroll, if comes, should build on top of them.

# By SZEDER Gábor
* sg/bash-prompt:
  completion: respect $GIT_DIR
  completion: use __gitdir() in _git_log()
  tests: add tests for the bash prompt functions in the completion script
  tests: move code to run tests under bash into a helper library
Merge branch 'jc/run-hook-env-1' into pu

Not urgent.

Updates run_hook() API to be much less specific to "commit".  It would
only be useful if people start doing more interesting things with hooks.

* jc/run-hook-env-1:
  run_hook(): enhance the interface to pass arbitrary environment
Merge branch 'jc/apply-3way' into pu

"git apply" learns to wiggle the base version and perform three-way merge
when a patch does not exactly apply to the version you have.

It turns out that it is somewhat unpleasant to handle add/add conflicts in
this code, but it seems necessary if we want to use "apply -3" to replace
the use of "apply --build-fake-ancestor" followed by the slow "merge" in
"am -3".

* jc/apply-3way:
  wip
  WIP: apply --3way with add/add conflict
  apply.c::check_patch(): move "already exists" logic to check_to_create()
  apply.c: move check_to_create_blob() closer to its sole caller
  apply -3: add failing test for add/add conflicts
  apply: fix an incomplete comment in check_patch()
  apply: refactor "previous patch" logic
  apply: a bit more comments on PATH_TO_BE_DELETED
  apply: document --3way option
  apply: allow rerere() upon --3way results
  apply: register conflicted stages to the index
  apply: plug the three-way merge logic in
  apply: fall back on three-way merge
  apply: accept -3/--3way command line option
  apply: split load_preimage() helper function out
  apply: refactor read_file_or_gitlink()
  apply: clear_image() clears things a bit more

Conflicts:
	builtin/apply.c
Merge branch 'jc/maint-push-refs-all' into pu

Allows pushing and fetching refs/stash.
Not ready.
There still seem to be other bugs hiding (e.g. try pushing twice).

* jc/maint-push-refs-all:
  get_fetch_map(): tighten checks on dest refs
  fetch/push: allow refs/*:refs/*