match-trees: factor out fill_tree_desc_strict

Deduplicate code by moving tree_desc initialization into a helper
function, fill_tree_desc_strict.  It is like fill_tree_descriptor,
except that it only accepts tree hashes and no tree references (tags,
commits).  No functional change.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
use logical OR (||) instead of binary OR (|) in logical context

The compiler can short-circuit the evaluation of conditions strung
together with logical OR operators instead of computing the resulting
bitmask with binary ORs.  More importantly, this patch makes the
intent of the changed code clearer, because the logical context (as
opposed to binary context) becomes immediately obvious.

While we're at it, simplify the check for patch->is_rename in
builtin/apply.c a bit; it can only be 0 or 1, so we don't need a
comparison operator.

Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'rs/match-trees-refactor' into jch

* rs/match-trees-refactor:
  match-trees: factor out fill_tree_desc_strict
Merge branch 'rs/logical-vs-binary-or' into jch

* rs/logical-vs-binary-or:
  use logical OR (||) instead of binary OR (|) in logical context
Merge branch 'jk/add-i-custom-diff-algo' into jch

* jk/add-i-custom-diff-algo:
  add--interactive: respect diff.algorithm
Merge branch 'jh/libify-note-handling' into jch

* jh/libify-note-handling:
  Move create_notes_commit() from notes-merge.c into notes-utils.c
  Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c
  finish_copy_notes_for_rewrite(): Let caller provide commit message
### 2.0
Merge branch 'jc/push-2.0-default-to-simple' into jch

* jc/push-2.0-default-to-simple:
  push: switch default from "matching" to "simple"

# Conflicts:
# 	Documentation/config.txt
# 	Documentation/git-push.txt
# 	builtin/push.c
Merge branch 'jn/add-2.0-u-A-sans-pathspec' into jch

* jn/add-2.0-u-A-sans-pathspec:
  git add: -u/-A now affects the entire working tree
Merge branch 'jc/add-2.0-ignore-removal' into jch

Updated endgame for "git add <pathspec>" that defaults to "--all"
aka "--no-ignore-removal".

* jc/add-2.0-ignore-removal:
  git add <pathspec>... defaults to "-A"

# Conflicts:
# 	builtin/add.c
Merge branch 'jc/core-checkstat-2.0' into jch

* jc/core-checkstat-2.0:
  core.statinfo: remove as promised in Git 2.0
Merge branch 'mg/more-textconv' into pu

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

I thought this was pretty well designed and executed, but it seems
there are some doubts on the list; kicking back to 'pu'.

* 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

# Conflicts:
# 	object.c
# 	object.h
Merge branch 'jl/submodule-mv' into pu

"git mv A B" when moving a submodule A does "the right thing",
inclusing relocating its working tree and adjusting the paths in
the .gitmodules file.

* jl/submodule-mv:
  submodule.c: duplicate real_path's return value
  rm: delete .gitmodules entry of submodules removed from the work tree
  Teach mv to update the path entry in .gitmodules for moved submodules
  Teach mv to move submodules using a gitfile
  Teach mv to move submodules together with their work trees
Merge branch 'jk/submodule-subdirectory-ok' into pu

Allow various subcommands of "git submodule" to be run not from the
top of the working tree of the superproject.

* jk/submodule-subdirectory-ok:
  submodule: fix quoting in relative_path()
  submodule: drop the top-level requirement
  rev-parse: add --prefix option
Merge branch 'fc/remote-helpers-use-specified-python' into pu

I do not particularly think the second from the bottom is a good
change, but it takes the remainder of the series hostage.

* fc/remote-helpers-use-specified-python:
  remote-helpers: add exec-path links
  remote-helpers: allow direct test execution
  remote-helpers: rename tests
  remote-helpers: generate scripts
Merge branch 'mm/color-auto-default' into pu

Flip the default for color.ui to 'auto', which is what many
tutorials recommend new users to do.

* mm/color-auto-default:
  make color.ui default to 'auto'
  config: refactor management of color.ui's default value
Merge branch 'fc/sequencer-skip-quiet' into pu

The bottom three looked more or less reasonable.  Execution of
post-rewrite hook could use a better refactoring from the original
code copied from builtin/commit.c, though.

* fc/sequencer-skip-quiet:
  sequencer: run post-rewrite hook
  cherry-pick: store rewritten commits
  cherry-pick: add --skip-empty option
  sequencer: avoid leaking message buffer when refusing to create an empty commit
  sequencer: remove useless indentation
Merge branch 'js/test-ln-s-add' into pu

Many tests that check the behaviour of symbolic links stored in the
index or the tree objects do not have to be skipped on a filesystem
that lack symbolic link support.

* js/test-ln-s-add:
  t4011: remove SYMLINKS prerequisite
  t6035: use test_ln_s_add to remove SYMLINKS prerequisite
  t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
  t3100: use test_ln_s_add to remove SYMLINKS prerequisite
  t3030: use test_ln_s_add to remove SYMLINKS prerequisite
  t0000: use test_ln_s_add to remove SYMLINKS prerequisite
  tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
  tests: introduce test_ln_s_add
  t3010: modernize style
  test-chmtime: Fix exit code on Windows

# Conflicts:
# 	t/t8007-cat-file-textconv.sh
Merge branch 'ap/diff-ignore-blank-lines' into pu

"git diff" learned a mode that ignores hunks whose change consists
only of additions and removals of blank lines, which is the same as
"diff -B" (ignore blank lines) of GNU diff.

* ap/diff-ignore-blank-lines:
  diff: add --ignore-blank-lines option
Merge branch 'mz/rebase-tests' into pu

* mz/rebase-tests:
  tests: move test for rebase messages from t3400 to t3406
  t3406: modernize style
  add tests for rebasing merged history
  add tests for rebasing root
  add tests for rebasing of empty commits
  add tests for rebasing with patch-equivalence present
  add simple tests of consistency across rebase types