From 0f4b2f028ab3a70b76b9bd67f073747df7078559 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sun, 1 Jul 2018 15:13:50 +0100 Subject: reader: optionally validate index matches workdir When using a workdir reader, optionally validate that the index contents match the working directory contents. --- src/reader.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/reader.h') diff --git a/src/reader.h b/src/reader.h index 7bb60e144..e1d906807 100644 --- a/src/reader.h +++ b/src/reader.h @@ -9,6 +9,9 @@ #include "common.h" +/* Returned when the workdir does not match the index */ +#define GIT_READER_MISMATCH 1 + typedef struct git_reader git_reader; /* @@ -76,7 +79,8 @@ extern int git_reader_for_index( */ extern int git_reader_for_workdir( git_reader **out, - git_repository *repo); + git_repository *repo, + bool validate_index); /** * Read the given filename from the reader and populate the given buffer -- cgit v1.2.1