From 65b09b1deddec64fa5639e9fea10c048d31901fa Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Thu, 2 Feb 2012 18:03:43 -0800 Subject: Implement diff lists and formatters This reworks the diff API to separate the steps of producing a diff descriptions from formatting the diff. This will allow us to share diff output code with the various diff creation scenarios and will allow us to implement rename detection as an optional pass that can be run on a diff list. --- src/diff.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/diff.h (limited to 'src/diff.h') diff --git a/src/diff.h b/src/diff.h new file mode 100644 index 00000000..1bb5c36f --- /dev/null +++ b/src/diff.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2009-2012 the libgit2 contributors + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_diff_h__ +#define INCLUDE_diff_h__ + +#include +#include "vector.h" +#include "buffer.h" + +struct git_diff_list { + git_repository *repo; + git_diff_options opts; + git_buf pfx; + git_vector files; /* vector of git_diff_file_delta */ +}; + +#endif + -- cgit v1.2.1