Commit fbec2fb9 by Russell Belfer

Fix checkout to know about TYPECHANGE diffs

parent bc16fd3e
...@@ -178,6 +178,7 @@ static int checkout_diff_fn( ...@@ -178,6 +178,7 @@ static int checkout_diff_fn(
break; break;
case GIT_DELTA_MODIFIED: case GIT_DELTA_MODIFIED:
case GIT_DELTA_TYPECHANGE:
if (!(opts->checkout_strategy & GIT_CHECKOUT_OVERWRITE_MODIFIED)) { if (!(opts->checkout_strategy & GIT_CHECKOUT_OVERWRITE_MODIFIED)) {
if ((opts->skipped_notify_cb != NULL) if ((opts->skipped_notify_cb != NULL)
...@@ -291,7 +292,8 @@ int git_checkout_index( ...@@ -291,7 +292,8 @@ int git_checkout_index(
if ((git_repository__ensure_not_bare(repo, "checkout")) < 0) if ((git_repository__ensure_not_bare(repo, "checkout")) < 0)
return GIT_EBAREREPO; return GIT_EBAREREPO;
diff_opts.flags = GIT_DIFF_INCLUDE_UNTRACKED; diff_opts.flags = GIT_DIFF_INCLUDE_UNTRACKED |
GIT_DIFF_DONT_SPLIT_TYPECHANGE;
if (opts && opts->paths.count > 0) if (opts && opts->paths.count > 0)
diff_opts.pathspec = opts->paths; diff_opts.pathspec = opts->paths;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment