prepare_revision_walk(): check for return value in all places

Even the documentation tells us:

	You should check if it returns any error (non-zero return
	code) and if it does not, you can start using get_revision()
	to do the iteration.

In preparation for this commit, I grepped all occurrences of
prepare_revision_walk and added error messages, when there were none.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/blame.c: add translation to warning about failed revision walk

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'sb/blame-msg-i18n' into jch

* sb/blame-msg-i18n:
  builtin/blame.c: add translation to warning about failed revision walk
Merge branch 'sb/prepare-revision-walk-error-check' into jch

* sb/prepare-revision-walk-error-check:
  prepare_revision_walk(): check for return value in all places
unpack-tree.c: remove dead code

In line 1763 of unpack-tree.c we have a condition on the current tree
	if (current) {
		...
Within this block of code we can assume current to be non NULL, hence
the code after the statement in line 1796:
	if (current)
		return ...

cannot be reached.

The proposed patch here changes the order of the current tree and the
newtree part. I'm not sure if that's the right way to handle it.

All referenced lines have been introduced in the same commit
076b0adc (2006-07-30, read-tree: move merge functions to the library),
which was just moving the code around.
The outer condition on the current tree (now in line 1763) was introduced
in c859600954df4c292e, June 2005, [PATCH] read-tree: save more user hassles during fast-forward.
The inner condition on the current tree was introduced in
ee6566e8d70da682ac4926d, Sept. 2005, [PATCH] Rewrite read-tree

This issue was found by coverity, Id:290002

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SQUASH???
Merge branch 'sb/unpack-trees-dead-code-removal' into jch

* sb/unpack-trees-dead-code-removal:
  SQUASH???
  unpack-tree.c: remove dead code
Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op

"Current branch is a descendant of the commit you are rebasing onto"
does not necessarily mean "rebase" requires "--force".  For a plain
vanilla "history flattening" rebase, the rebase can be done without
forcing if there is a merge between the tip of the branch being
rebased and the commit you are rebasing onto, even if the tip is
descendant of the other.

[jc: reworded both the text and the log description]

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'so/rebase-doc' into jch

* so/rebase-doc:
  Documentation/git-rebase.txt: -f forces a rebase that would otherwise be a no-op
convert: Refactor would_convert_to_git() to single arg 'path'

It is only the path that matters in the decision whether to filter or
not.  Clarify this by making path the single argument of
would_convert_to_git().

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
convert: Stream from fd to required clean filter instead of mmap

The data is streamed to the filter process anyway.  Better avoid mapping
the file if possible.  This is especially useful if a clean filter
reduces the size, for example if it computes a sha1 for binary data,
like git media.  The file size that the previous implementation could
handle was limited by the available address space; large files for
example could not be handled with (32-bit) msysgit.  The new
implementation can filter files of any size as long as the filter output
is small enough.

The new code path is only taken if the filter is required.  The filter
consumes data directly from the fd.  The original data is not available
to git, so it must fail if the filter fails.

The test that exercises required filters is modified to verify that the
data actually has been modified on its way from the file system to the
object store.

The expectation on the process size is tested using /usr/bin/time.  An
alternative would have been tcsh, which could be used to print memory
information as follows:

    tcsh -c 'set time=(0 "%M"); <cmd>'

Although the logic could perhaps be simplified with tcsh, I chose to use
'time' to avoid a dependency on tcsh.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'sp/stream-clean-filter' into jch

* sp/stream-clean-filter:
  convert: Stream from fd to required clean filter instead of mmap
  convert: Refactor would_convert_to_git() to single arg 'path'