Sha256: 6883a184830f4c59427177eba5462d27737706a1be899db35423c5ad9d6c8c4a

Contents?: true

Size: 1.21 KB

Versions: 40

Compression:

Stored size: 1.21 KB

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * 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_patch_parse_h__
#define INCLUDE_patch_parse_h__

#include "common.h"

#include "parse.h"
#include "patch.h"

typedef struct {
	git_refcount rc;

	git_patch_options opts;

	git_parse_ctx parse_ctx;
} git_patch_parse_ctx;

extern git_patch_parse_ctx *git_patch_parse_ctx_init(
	const char *content,
	size_t content_len,
	const git_patch_options *opts);

extern void git_patch_parse_ctx_free(git_patch_parse_ctx *ctx);

/**
 * Create a patch for a single file from the contents of a patch buffer.
 *
 * @param out The patch to be created
 * @param contents The contents of a patch file
 * @param contents_len The length of the patch file
 * @param opts The git_patch_options
 * @return 0 on success, <0 on failure.
 */
extern int git_patch_from_buffer(
	git_patch **out,
	const char *contents,
	size_t contents_len,
	const git_patch_options *opts);

extern int git_patch_parse(
	git_patch **out,
	git_patch_parse_ctx *ctx);

extern int git_patch_parsed_from_diff(git_patch **, git_diff *, size_t);

#endif

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
rugged-1.9.0 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.7.2 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.6.5 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.7.1 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.6.3 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.6.2 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.5.1 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.4.5 vendor/libgit2/src/patch_parse.h
rugged-1.5.0.1 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.5.0 vendor/libgit2/src/libgit2/patch_parse.h
rugged-1.3.2.3 vendor/libgit2/src/patch_parse.h
rugged-1.4.4 vendor/libgit2/src/patch_parse.h
rugged-1.3.2.1 vendor/libgit2/src/patch_parse.h
rugged-1.4.3 vendor/libgit2/src/patch_parse.h
rugged-1.3.2 vendor/libgit2/src/patch_parse.h
rugged-1.4.2 vendor/libgit2/src/patch_parse.h
rugged-1.3.1 vendor/libgit2/src/patch_parse.h
rugged-1.3.0 vendor/libgit2/src/patch_parse.h
rugged-1.2.0 vendor/libgit2/src/patch_parse.h
rugged-1.1.1 vendor/libgit2/src/patch_parse.h