count-objects: report garbage files in pack directory too

prepare_packed_git_one() is modified to allow count-objects to hook a
report function to so we don't need to duplicate the pack searching
logic in count-objects.c. When report_pack_garbage is NULL, the
overhead is insignificant.

The garbage is reported with warning() instead of error() in packed
garbage case because it's not an error to have garbage. Loose garbage
is still reported as errors and will be converted to warnings later.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
count-objects: report how much disk space taken by garbage files

Also issue warnings on loose garbages instead of errors as a result of
using report_garbage() function in count_objects()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.txt: update description of the configuration mechanism

The old Git version where it appeared is now useful only to historians,
not to normal users. Also, the text was mentioning only the per-repo
config file, but this is a good place to teach that customization can
also be made per-user.

While at it, remove a now-defunct e-mail from an example.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/read-commit-buffer-data-after-free' into jch

Will merge to 'master'.

* jk/read-commit-buffer-data-after-free:
  log: re-encode commit messages before grepping
Merge branch 'jk/rebase-i-comment-char' into jch

Will merge to 'master'.

* jk/rebase-i-comment-char:
  rebase -i: respect core.commentchar
Merge branch 'mw/bash-prompt-show-untracked-config' into jch

Allows skipping the untracked check GIT_PS1_SHOWUNTRACKEDFILES
asks for the git-prompt (in contrib/) per repository.

Will merge to 'master'.

* mw/bash-prompt-show-untracked-config:
  t9903: add extra tests for bash.showDirtyState
  t9903: add tests for bash.showUntrackedFiles
  shell prompt: add bash.showUntrackedFiles option
Merge branch 'mp/diff-algo-config' into jch

Add diff.algorithm configuration so that the user does not type
"diff --histogram".

Will merge to 'master'.

* mp/diff-algo-config:
  diff: Introduce --diff-algorithm command line option
  config: Introduce diff.algorithm variable
  git-completion.bash: Autocomplete --minimal and --histogram for git-diff

Conflicts:
	Documentation/diff-config.txt
Merge branch 'jc/hidden-refs' into jch

Allow the server side to redact the refs/ namespace it shows to the
client.

Will merge to 'master'.

* jc/hidden-refs:
  upload/receive-pack: allow hiding ref hierarchies
  upload-pack: simplify request validation
  upload-pack: share more code

Conflicts:
	builtin/receive-pack.c
Merge branch 'jc/fetch-raw-sha1' into jch

Allows requests to fetch objects at any tip of refs (including
hidden ones).  It seems that there may be use cases even outside
Gerrit (e.g. $gmane/215701).

* jc/fetch-raw-sha1:
  fetch: fetch objects by their exact SHA-1 object names
  upload-pack: optionally allow fetching from the tips of hidden refs
  fetch: use struct ref to represent refs to be fetched
  parse_fetch_refspec(): clarify the codeflow a bit

Conflicts:
	cache.h
Merge branch 'jc/remove-treesame-parent-in-simplify-merges' into jch

The --simplify-merges logic did not cull irrelevant parents from a
merge that is otherwise not interesting with respect to the paths
we are following.

This touches a fairly core part of the revision traversal
infrastructure; even though I think this change is correct, please
report immediately if you find any unintended side effect.

Will cook in 'next'.

* jc/remove-treesame-parent-in-simplify-merges:
  simplify-merges: drop merge from irrelevant side branch

Conflicts:
	revision.c
Merge branch 'jc/remove-export-from-config-mak-in' into jch

config.mak.in template had an "export" line to cause a few
common makefile variables to be exported; if they need to be
expoted for autoconf/configure users, they should also be exported
for people who write config.mak the same way.  Move the "export" to
the main Makefile.  Also, stop exporting mandir that used to be
exported (only) when config.mak.autogen was used.  It would have
broken installation of manpages (but not other documentation
formats).

Will cook in 'next'.

* jc/remove-export-from-config-mak-in:
  Makefile: do not export mandir/htmldir/infodir
  config.mak.in: remove unused definitions

Conflicts:
	config.mak.in
### hold in next
Merge branch 'jc/push-2.0-default-to-simple' into jch

Will cook in 'next' until Git 2.0 ;-).

* jc/push-2.0-default-to-simple:
  t5570: do not assume the "matching" push is the default
  t5551: do not assume the "matching" push is the default
  t5550: do not assume the "matching" push is the default
  doc: push.default is no longer "matching"
  push: switch default from "matching" to "simple"
  t9401: do not assume the "matching" push is the default
  t9400: do not assume the "matching" push is the default
  t7406: do not assume the "matching" push is the default
  t5531: do not assume the "matching" push is the default
  t5519: do not assume the "matching" push is the default
  t5517: do not assume the "matching" push is the default
  t5516: do not assume the "matching" push is the default
  t5505: do not assume the "matching" push is the default
  t5404: do not assume the "matching" push is the default

Conflicts:
	builtin/push.c
### match next
Merge branch 'mm/config-intro-in-git-doc' into jch

* mm/config-intro-in-git-doc:
  git.txt: update description of the configuration mechanism
Merge branch 'jl/submodule-deinit' into jch

There was no Porcelain way to say "I no longer am interested in
this submodule", once you express your interest in a submodule with
"submodule init".  "submodule deinit" is the way to do so.

Expecting another reroll.
$gmane/216276

* jl/submodule-deinit:
  submodule: add 'deinit' command

Conflicts:
	Documentation/git-submodule.txt
	git-submodule.sh
Merge branch 'tz/credential-authinfo' into jch

A new read-only credential helper (in contrib/) to interact with
the .netrc/.authinfo files.  Hopefully mn/send-email-authinfo topic
can rebuild on top of something like this.

Expecting a reroll.
$gmane/215556

* tz/credential-authinfo:
  Add contrib/credentials/netrc with GPG support
Merge branch 'mn/send-email-works-with-credential' into jch

Hooks the credential system to send-email.
Rerolled.
Waiting for a review.

* mn/send-email-works-with-credential:
  git-send-email: use git credential to obtain password
  Git.pm: add interface for git credential command
  Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
  Git.pm: refactor command_close_bidi_pipe to use _cmd_close
  Git.pm: fix example in command_close_bidi_pipe documentation
  Git.pm: allow command_close_bidi_pipe to be called as method

Conflicts:
	perl/Git.pm
Merge branch 'jc/mention-tracking-for-pull-default' into jch

We stopped mentioning `tracking` is a deprecated but supported
synonym for `upstream` in pull.default even though we have no
intention of removing the support for it.

This is my "don't list it to catch readers' eyes, but make sure it
can be found if the reader looks for it" version; I'm not married
to the layout and will be happy to take a replacement patch.

Will merge to 'next', unless a replacement materializes soonish.

* jc/mention-tracking-for-pull-default:
  doc: mention tracking for pull.default

Conflicts:
	Documentation/config.txt
Merge branch 'bc/append-signed-off-by' into jch

Waiting for further reviews.
$gmane/216327 may need to be addressed.

* bc/append-signed-off-by:
  Unify appending signoff in format-patch, commit and sequencer
  format-patch: update append_signoff prototype
  t4014: more tests about appending s-o-b lines
  sequencer.c: teach append_signoff to avoid adding a duplicate newline
  sequencer.c: teach append_signoff how to detect duplicate s-o-b
  sequencer.c: always separate "(cherry picked from" from commit body
  sequencer.c: require a conforming footer to be preceded by a blank line
  sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
  t/t3511: add some tests of 'cherry-pick -s' functionality
  t/test-lib-functions.sh: allow to specify the tag name to test_commit
  commit, cherry-pick -s: remove broken support for multiline rfc2822 fields
  sequencer.c: rework search for start of footer to improve clarity

Conflicts:
	builtin/log.c
	t/t4014-format-patch.sh