Fix MSVC compilation warnings
blob: introduce git_blob_is_binary()
Merge pull request #1149 from nulltoken/topic/blob_isbinary

Introduce git_blob_is_binary()
Merge pull request #1151 from arrbee/fix-diff-constructor-names

Fix diff constructor names
Reset global variable to NULL after free'ing resource
Merge pull request #1156 from scunz/another_testcrash

Reset global variable to NULL after free'ing resource
Improve comment text

This looked wrong to me.  I *think* this is more appropriate
commentary.
Also, whitespace.

I was totally flaunting @ben's 3-space tab advice.
Merge pull request #1157 from rick/trivial-comment-fix

Trivial comment fix
Reorder operations in git reset

This corrects the order of operations in git reset so that the
checkout to reset the working directory content is done before
the HEAD is moved.  This allows us to use the HEAD and the index
content to know what files can / should safely be reset.

Unfortunately, there are still some cases where the behavior of
this revision differs from core git.  Notable, a file which has
been added to the index but is not present in the HEAD is
considered to be tracked by core git (and thus removable by a
reset command) whereas since this loads the target state into
the index prior to resetting, it will consider such a file to be
untracked and won't touch it.  That is a larger fix that I'll
defer to a future commit.
Rework checkout internals (again)

I've tried to map out the detailed behaviors of checkout and make
sure that we're handling the various cases correctly, along with
providing options to allow us to emulate "git checkout" and "git
checkout-index" with the various flags.  I've thrown away flags
in the checkout API that seemed like clutter and added some new
ones.  Also, I've converted the conflict callback to a general
notification callback so we can emulate "git checkout" output and
display "dirty" files.

As of this commit, the new behavior is not working 100% but some
of that is probably baked into tests that are not testing the
right thing.  This is a decent snapshot point, I think, along the
way to getting the update done.
wip: more checkout updates
Add failing test to demonstrate wrong checkout behaviour
More checkout improvements

This flips checkout back to be driven off a the changes between
the baseline and the target trees.  This reinstates the complex
code for tracking the contents of the working directory, but
overall, I think the resulting logic is easier to follow.

At this point, there are still some failing tests, some missing
tests that should be cherry picked, a needed rebase against the
development branch, and a needed rebase -i to squash some of the
intermediate commits that are just works in progress.  I'm really
just pushing this to GitHub since it is a decent snapshot of
where things are...
Failing test on git_checkout_tree when removing directories
wip: fixing reset again
Clear error to avoid leaving invalid error behind
missing error message is confusing
Add index updating to checkout

Make checkout update entries in the index for all files that are
updated and/or removed, unless flag GIT_CHECKOUT_DONT_UPDATE_INDEX
is given.  To do this, iterators were extended to allow a little
more introspection into the index being iterated over, etc.