blob.h 788 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 11
#include "common.h"

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

struct git_blob {
	git_object object;
Vicent Marti committed
19
	git_odb_object *odb_object;
20 21
};

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

26 27 28 29 30 31 32 33 34
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);

35
#endif