summaryrefslogtreecommitdiff
path: root/src/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-04-28 14:34:55 -0700
committerRussell Belfer <rb@github.com>2014-05-02 09:21:33 -0700
commit0fc8e1f6bd9a5148d3a262142e9a70126f5c3a42 (patch)
tree7941140dacf3a0b820363280ecdca2790cf5cdf3 /src/diff.h
parent8ef4e11a76599111b98682d235e7a4df921b2597 (diff)
downloadlibgit2-0fc8e1f6bd9a5148d3a262142e9a70126f5c3a42.tar.gz
Lay groundwork for updating stat cache in diff
This reorganized the diff OID calculation to make it easier to correctly update the stat cache during a diff once the flags to do so are enabled. This includes marking the path of a git_index_entry as const so we can make a "fake" git_index_entry with a "const char *" path and not get warnings. I was a little surprised at how unobtrusive this change was, but I think it's probably a good thing.
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/diff.h b/src/diff.h
index 491fc4667..8fa3c9b7b 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -95,7 +95,9 @@ extern int git_diff_delta__format_file_header(
int oid_strlen);
extern int git_diff__oid_for_file(
- git_oid *oit, git_diff *, const char *, uint16_t, git_off_t);
+ git_oid *out, git_diff *, const char *, uint16_t, git_off_t);
+extern int git_diff__oid_for_entry(
+ git_oid *out, git_diff *, const git_index_entry *entry);
extern int git_diff__from_iterators(
git_diff **diff_ptr,