MCPcopy Create free account
hub / github.com/Murmele/Gittyup / diffIndexToWorkdir

Method diffIndexToWorkdir

src/git/Repository.cpp:342–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342Diff Repository::diffIndexToWorkdir(const Index &index,
343 Diff::Callbacks *callbacks,
344 bool ignoreWhitespace) const {
345 git_diff_options opts = GIT_DIFF_OPTIONS_INIT;
346 opts.flags |= (GIT_DIFF_INCLUDE_TYPECHANGE | GIT_DIFF_DISABLE_MMAP);
347
348 if (!appConfig().value<bool>("untracked.hide", false))
349 opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_RECURSE_UNTRACKED_DIRS;
350
351 if (ignoreWhitespace)
352 opts.flags |= GIT_DIFF_IGNORE_WHITESPACE;
353
354 if (callbacks) {
355 opts.progress_cb = &Diff::Callbacks::progress;
356 opts.payload = callbacks;
357 }
358
359 git_diff *diff = nullptr;
360 git_diff_index_to_workdir(&diff, d->repo, index, &opts);
361 return Diff(diff);
362}
363
364Reference Repository::head() const {
365 git_reference *ref = nullptr;

Callers 4

fileMergeCrashMethod · 0.80
mergeConflictMethod · 0.80
resolveMethod · 0.80
mergeAbortMethod · 0.80

Calls 2

value<bool>Method · 0.80
DiffClass · 0.70

Tested by

no test coverage detected