vcs-svn: fix clang-analyzer error

vcs-svn/svndiff.c:298:3: warning: Assigned value is garbage or undefined
                off_t pre_off = pre_off; /* stupid GCC... */
                ^               ~~~~~~~

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn: simplify cleanup in apply_one_window()

As a side-effect, fix clang-analyzer warning:

vcs-svn/svndiff.c:278:3: warning: expression result unused [-Wunused-value]
                error("invalid delta: incorrect postimage length");
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This warning caused by an insanely concise error() upstream.

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn: prefer constcmp to prefixcmp

Comparisons in svndump.c are always guarded by length.
As a bonus, elimate dependency on prefixcmp for upstream.

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn: prefer strstr over memmem

The common pattern is to use strstr to match a fixed needle.
As a bonus, elimate dependency on memmem for upstream.

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn: fix signedness warnings

Stop mixing off_t and size_t.

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vcs-svn: drop no-op reset methods

Since v1.7.5~42^2~6 (vcs-svn: remove buffer_read_string)
buffer_reset() does nothing thus fast_export_reset() also.

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c: move check_to_create_blob() closer to its sole caller

Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c::check_patch(): move "already exists" logic to check_to_create()

The check_to_create_blob() function used to check only the case
where we are applying to the working tree.  Rename the function to
check_to_create() and make it also responsible for checking the case
where we apply to the index.  Also make its caller responsible for
issuing an error message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
WIP: apply --3way with add/add conflict

load_preimage() needs to be refactored so that we can read from the
patch->new_name before this change can work.

Also there currently is no check to avoid overwriting local changes, as
check_preimage() will not check anything for a patch that creates a new
path (the check is done in check_to_create() for the old name, but not
for the new name).
commit: document a couple of options

Document git commit '--branch' and '--no-post-rewrite'.  Mention that
'-z' can also be spelt as '--null'.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jk/version-string' into jch

I am somewhat tempted to merge this to master before 1.7.11 final.
Thoughts?

# By Jeff King
* jk/version-string:
  http: get default user-agent from git_user_agent
  version: add git_user_agent function
  move git_version_string into version.c
Merge branch 'jk/clone-local' into jch

"git clone --local $path" started its life as an experiment to
optionally use link/copy when cloning a repository on the disk, but
we didn't deprecate it after we made the option a no-op to always
use the optimization.

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/clone-local:
  clone: allow --no-local to turn off local optimizations
  docs/clone: mention that --local may be ignored
Merge branch 'jk/no-more-asciidoc7' into jch

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/no-more-asciidoc7:
  docs: drop antique comment from Makefile
  docs: drop asciidoc7compatible flag
Merge branch 'jc/request-pull-match-tagname' into jch

"git request-pull $url dev" when the tip of "dev" branch was tagged
with "ext4-for-linus" used the contents from the tag in the output
but still asked the "dev" branch to be pulled, not the tag.

Not urgent; probably early post 1.7.11.

* jc/request-pull-match-tagname:
  request-pull: really favor a matching tag
Merge branch 'jc/bundle-complete-notice' into jch

Running "git bundle verify" on a bundle that records a complete
history said "it requires these 0 commits".

Not urgent; probably early post 1.7.11.

* jc/bundle-complete-notice:
  tweak "bundle verify" of a complete history
Merge branch 'vr/help-per-platform' into jch

* vr/help-per-platform:
  help: use HTML as the default help format on Windows

Conflicts:
	Makefile
Merge branch 'jc/fmt-merge-msg-people' into jch

Need to merge to 'master' before 1.7.11.

* jc/fmt-merge-msg-people:
  fmt-merge-msg: make attribution into comment lines
Merge branch 'jk/maint-t1304-setfacl' into jch

Works around a false test failure caused by a bug in ecryptofs.

Not urgent; probably early post 1.7.11.

# By Jeff King
* jk/maint-t1304-setfacl:
  t1304: improve setfacl prerequisite setup
Merge branch 'jc/ls-files-i-dir' into jch

"git ls-files --exclude=t -i" did not consider anything under t/
as excluded, as it did not pay attention to exclusion of leading
paths while walking the index.  Other two users of excluded() are
also updated.

Not urgent; probably early post 1.7.11.

* jc/ls-files-i-dir:
  dir.c: make excluded() file scope static
  unpack-trees.c: use path_excluded() in check_ok_to_remove()
  builtin/add.c: use path_excluded()
  path_excluded(): update API to less cache-entry centric
  ls-files -i: micro-optimize path_excluded()
  ls-files -i: pay attention to exclusion of leading paths
Merge branch 'nd/stream-index-pack' into pu

Use streaming API to read from the object store to avoid having to hold
a large blob object in-core while running index-pack.

Not urgent; probably early post 1.7.11.

# By Nguyễn Thái Ngọc Duy
* nd/stream-index-pack:
  index-pack: use streaming interface for collision test on large blobs
  index-pack: factor out unpack core from get_data_from_pack
  index-pack: use streaming interface on large blobs (most of the time)
  index-pack: hash non-delta objects while reading from stream