diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-04 11:47:46 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-05 15:53:59 +0000 |
| commit | 6fecf4d127bb6dd4257885ff6c71c12f92e66b94 (patch) | |
| tree | 1f98a19b5e2a57a6cc27e5511bfcf385a433c362 /src/reader.h | |
| parent | 12f9ac17a63986f64799098bfd3b18c91b9c08a1 (diff) | |
| download | libgit2-6fecf4d127bb6dd4257885ff6c71c12f92e66b94.tar.gz | |
apply: handle exact renames
Deltas containing exact renames are special; they simple indicate that a
file was renamed without providing additional metadata (like the
filemode). Teach the reader to provide the file mode and use the
preimage's filemode in the case that the delta does not provide one.)
Diffstat (limited to 'src/reader.h')
| -rw-r--r-- | src/reader.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reader.h b/src/reader.h index f9dd6b54b..18a6a1103 100644 --- a/src/reader.h +++ b/src/reader.h @@ -25,7 +25,7 @@ typedef struct git_reader git_reader; * reader after disposing the underlying object that it reads. */ struct git_reader { - int (*read)(git_buf *out, git_oid *out_oid, git_reader *reader, const char *filename); + int (*read)(git_buf *out, git_oid *out_oid, git_filemode_t *mode, git_reader *reader, const char *filename); }; /** @@ -93,6 +93,7 @@ extern int git_reader_for_workdir( extern int git_reader_read( git_buf *out, git_oid *out_id, + git_filemode_t *out_filemode, git_reader *reader, const char *filename); |
