blob.h 767 Bytes
Newer Older
Vicent Marti committed
1
/*
Edward Thomson committed
2
 * Copyright (C) the libgit2 contributors. All rights reserved.
Vicent Marti committed
3 4 5 6
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
7 8 9
#ifndef INCLUDE_blob_h__
#define INCLUDE_blob_h__

10
#include "git2/blob.h"
11
#include "repository.h"
Vicent Marti committed
12
#include "odb.h"
13 14 15 16
#include "fileops.h"

struct git_blob {
	git_object object;
Vicent Marti committed
17
	git_odb_object *odb_object;
18 19
};

20
void git_blob__free(void *blob);
21
int git_blob__parse(void *blob, git_odb_object *obj);
22
int git_blob__getbuf(git_buf *buffer, git_blob *blob);
23

24 25 26 27 28 29 30 31 32
extern int git_blob__create_from_paths(
	git_oid *out_oid,
	struct stat *out_st,
	git_repository *repo,
	const char *full_path,
	const char *hint_path,
	mode_t hint_mode,
	bool apply_filters);

33
#endif