git add <pathspec>... defaults to "-A"

Make "git add <pathspec>..." notice paths that have been removed
from the working tree, i.e. the same as "git add -A <pathspec>...".

Given that "git add <pathspec>" is to update the index with the
state of the named part of the working tree as a whole, it makes it
more intuitive, and also makes it possible to simplify the advice we
give while marking the paths the user finished resolving conflicts
with.  We used to say "to record removal as a resolution, remove the
path from the working tree and say 'git rm'; for all other cases,
edit the path in the working tree and say 'git add'", but we can now
say "update the path in the working tree and say 'git add'" instead.

As promised, this merges the temporary update_files_in_cache() helper
function back to add_files_to_cache() function.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git add: -u/-A now affects the entire working tree

As promised in 0fa2eb530fb7 (add: warn when -u or -A is used without
pathspec, 2013-01-28), in Git 2.0, "git add -u/-A" that is run
without pathspec in a subdirectory updates all updated paths in the
entire working tree, not just the current directory and its
subdirectories.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
core.statinfo: remove as promised in Git 2.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
push: switch default from "matching" to "simple"

We promised to change the behaviour of lazy "git push [there]" that
does not say what to push on the command line from "matching" to
"simple" in Git 2.0.

This finally flips that bit.

Helped-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff: remove "diff-files -q" in a version of Git in a distant future

This was inherited from "show-diff -q" that was invented to tell
comparison between the index and the working tree to ignore only
removals in 2005.

These days, it is spelled as "--diff-filter=d".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule foreach: skip eval for more than one argument

'eval "$@"' creates an extra layer of shell interpretation, which is
probably not expected by a user who passes multiple arguments to git
submodule foreach:

 $ git grep "'"
 [searches for single quotes]
 $ git submodule foreach git grep "'"
 Entering '[submodule]'
 /usr/lib/git-core/git-submodule: 1: eval: Syntax error: Unterminated quoted string
 Stopping at '[submodule]'; script returned non-zero status.

To fix this, if the user passes more than one argument, execute "$@"
directly instead of passing it to eval.

Examples:

 * Typical usage when adding an extra level of quoting is to pass a
   single argument representing the entire command to be passed to the
   shell.  This doesn't change that.

 * One can imagine someone feeding untrusted input as an argument:

 	git submodule foreach git grep "$variable"

   That currently results in a nonobvious shell code injection
   vulnerability.  Executing the command named by the arguments
   directly, as in this patch, fixes it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Merge branch 'master' into next

* master:
  path-utils test: rename mingw_path function to print_path
  howto/revert-a-faulty-merge: fix unescaped '^'s
  howto/setup-git-server-over-http: fix unescaped '^'s
  mergetools/diffmerge: support DiffMerge as a git mergetool
  .mailmap: switch to Thomas Rast's personal address
  status: show commit sha1 in "You are currently cherry-picking" message
  status test: add missing && to <<EOF blocks
  checkout test: enable test with complex relative path
  git-credential-netrc: fix uninitialized warning
  Documentation/Makefile: make AsciiDoc dblatex dir configurable
  rebase -i: respect core.abbrev
  RelNotes/1.8.5: direct script writers to "git status --porcelain"
  remote set-head -h: add long options to synopsis
  remote doc: document long forms of set-head options
  clone: tighten "local paths with colons" check a bit
  merge-recursive: fix parsing of "diff-algorithm" option
Merge branch 'ak/submodule-foreach-quoting' into next

* ak/submodule-foreach-quoting:
  submodule foreach: skip eval for more than one argument
Merge branch 'ew/keepalive' into next

* ew/keepalive:
  http: enable keepalive on TCP sockets
Merge branch 'hu/cherry-pick-previous-branch' into next

* hu/cherry-pick-previous-branch:
  cherry-pick: handle "-" after parsing options
Merge branch 'jc/pack-objects' into next

* jc/pack-objects:
  pack-objects: shrink struct object_entry
Merge branch 'jc/prompt-upstream' into next

* jc/prompt-upstream:
  git-prompt.sh: optionally show upstream branch name
Merge branch 'jk/http-auth-redirects' into next

* jk/http-auth-redirects:
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
Merge branch 'jx/relative-path-regression-fix' (early part) into next

* 'jx/relative-path-regression-fix' (early part):
  relative_path should honor dos-drive-prefix
  test: use unambigous leading path (/foo) for MSYS
Merge branch 'mg/more-textconv' into next

Make "git grep" and "git show" pay attention to --textconv when
dealing with blob objects.

There was a question about how defaulting to 'git show --textconv'
would interact with the "git show HEAD:file.c >file.c" habit.
$gmane/221833

* mg/more-textconv:
  grep: honor --textconv for the case rev:path
  grep: allow to use textconv filters
  t7008: demonstrate behavior of grep with textconv
  cat-file: do not die on --textconv without textconv filters
  show: honor --textconv for blobs
  diff_opt: track whether flags have been set explicitly
  t4030: demonstrate behavior of show with textconv
Merge branch 'master' into next

* master:
  mergetool--lib: Fix typo in the merge/difftool help
  sparse: suppress some "using sizeof on a function" warnings
  format-patch doc: Thunderbird wraps lines unless mailnews.wraplength=0
  gitweb test: fix highlight test hang on Linux Mint
  wrapper.c: only define gitmkstemps if needed
  refs.c: spell NULL pointer as NULL
  config.c: mark file-local function static
  CodingGuidelines: style for multi-line comments
  config doc: user.signingkey is also used for signed commits
Merge branch 'master' into next

* master:
  git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY
  git.txt: fix asciidoc syntax of --*-pathspecs
  clone --branch: refuse to clone if upstream repo is empty
Merge branch 'po/dot-url' into next

Explain how '.' can be used to refer to the "current repository"
in the documentation.

* po/dot-url:
  doc/cli: make "dot repository" an independent bullet point
Merge branch 'ew/keepalive' into next

* ew/keepalive:
  http: use curl's tcp keepalive if available
Merge branch 'jc/upload-pack-send-symref' into next

One long-standing flaw in the pack transfer protocol used by "git
clone" was that there was no way to tell the other end which branch
"HEAD" points at, and the receiving end needed to guess.  A new
capability has been defined in the pack protocol to convey this
information so that cloning from a repository with more than one
branches pointing at the same commit where the HEAD is at now
reliably sets the initial branch in the resulting repository.

* jc/upload-pack-send-symref:
  clone: test the new HEAD detection logic
  connect: annotate refs with their symref information in get_remote_head()
  connect.c: make parse_feature_value() static
  upload-pack: send non-HEAD symbolic refs
  upload-pack: send symbolic ref information as capability
  upload-pack.c: do not pass confusing cb_data to mark_our_ref()
  t5505: fix "set-head --auto with ambiguous HEAD" test