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>
Merge branch 'rj/tap-fix' into jch

Will merge to 'next'.

* rj/tap-fix:
  test-lib.sh: Suppress the "passed all ..." message if no tests run
  test-lib.sh: Add check for invalid use of 'skip_all' facility
  test-lib.sh: Fix some shell coding style violations
  t4016-*.sh: Skip all tests rather than each test
  t3902-*.sh: Skip all tests rather than each test
  t3300-*.sh: Fix a TAP parse error
Merge branch 'kd/cvsimport-avoid-invalid-tag' into jch

"cvsimport" tried to create a tag taken from CVS without
sufficiently sanitizing it, causing the import to fail when an
invalid character in the tagname made underlying "git tag" to fail.

Will merge to 'next'.

* kd/cvsimport-avoid-invalid-tag:
  cvsimport: strip all inappropriate tag strings
Merge branch 'nd/i18n-status' into jch

Will merge to 'next'.

* nd/i18n-status:
  status: remove i18n legos
Merge branch 'nd/log-n-doc' into jch

Will merge to 'next'.

* nd/log-n-doc:
  doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt
Merge branch 'nd/maint-remote-remove' into jch

Will merge to 'next'.

* nd/maint-remote-remove:
  remote: prefer subcommand name 'remove' to 'rm'

Conflicts:
	builtin/remote.c
Merge branch 'sb/send-email-reconfirm-fix' into jch

Will merge to 'next'.

* sb/send-email-reconfirm-fix:
  send-email: initial_to and initial_reply_to are both optional
Merge branch 'sn/ls-remote-get-url-doc' into jch

Will merge to 'next'.

* sn/ls-remote-get-url-doc:
  ls-remote: document the '--get-url' option
Merge branch 'dj/fetch-all-tags' into jch

"git fetch --all", when passed "--no-tags", did not honor the
"--no-tags" option while fetching from individual remotes (the same
issue existed with "--tags", but combination "--all --tags" makes
much less sense than "--all --no-tags").

Will merge to 'next'.

* dj/fetch-all-tags:
  fetch --all: pass --tags/--no-tags through to each remote
Merge branch 'rj/path-cleanup' into jch

Will merge to 'next'.

* rj/path-cleanup:
  Call mkpathdup() rather than xstrdup(mkpath(...))
  Call git_pathdup() rather than xstrdup(git_path("..."))
  path.c: Use vsnpath() in the implementation of git_path()
  path.c: Don't discard the return value of vsnpath()
  path.c: Remove the 'git_' prefix from a file scope function
Merge branch 'rs/archive-zip-utf8' into jch

Will merge to 'next'.

* rs/archive-zip-utf8:
  archive-zip: support UTF-8 paths
Merge branch 'js/compat-mkdir' into jch

Finishing touches to recently added wrapper for mkdir() that do not
want to see trailing slashes.

Will merge to 'next'.

* js/compat-mkdir:
  Document MKDIR_WO_TRAILING_SLASH in Makefile
Merge branch 'js/compat-itimer' into jch

Pieces to support compilation on __TANDEM.

Will merge to 'next'.

* js/compat-itimer:
  Add a no-op setitimer() wrapper

Conflicts:
	git-compat-util.h
Merge branch 'mh/abspath' into jch

Will merge to 'next'.

* mh/abspath:
  t0060: split absolute path test in two to exercise some of it on Windows
  t0060: verify that real_path() removes extra slashes
  real_path(): properly handle nonexistent top-level paths
  t0060: verify that real_path() works correctly with absolute paths
  real_path(): reject the empty string
  t0060: verify that real_path() fails if passed the empty string
  absolute_path(): reject the empty string
  t0060: verify that absolute_path() fails if passed the empty string
  t0060: move tests of real_path() from t0000 to here
Merge branch 'jc/maint-checkout-fileglob-doc' into jch

Updated with help from Peff.

Will merge to 'next'.

* 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 'nd/checkout-option-parsing-fix' into jch

The option parsing of "git checkout" had error checking, dwim and
defaulting missing options, all mixed in the code, and issuing an
appropriate error message with useful context was getting harder.
Reorganize the code and allow giving a proper diagnosis when the
user says "git checkout -b -t foo bar" (e.g. "-t" is not a good name
for a branch).

Will merge to 'next' after squashing the tip two.

* nd/checkout-option-parsing-fix:
  checkout: reorder option handling
  checkout: move more parameters to struct checkout_opts
  checkout: pass "struct checkout_opts *" as const pointer

Conflicts:
	builtin/checkout.c