push.h 1 KB
Newer Older
1
/*
Edward Thomson committed
2
 * Copyright (C) the libgit2 contributors. All rights reserved.
3 4 5 6 7 8 9 10
 *
 * 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_push_h__
#define INCLUDE_push_h__

#include "git2.h"
11
#include "refspec.h"
12 13

typedef struct push_spec {
14
	struct git_refspec refspec;
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

	git_oid loid;
	git_oid roid;
} push_spec;

typedef struct push_status {
	bool ok;

	char *ref;
	char *msg;
} push_status;

struct git_push {
	git_repository *repo;
	git_packbuilder *pb;
	git_remote *remote;
	git_vector specs;
	bool report_status;

	/* report-status */
	bool unpack_ok;
	git_vector status;
37 38 39

	/* options */
	unsigned pb_parallelism;
40 41 42 43 44

	git_packbuilder_progress pack_progress_cb;
	void *pack_progress_cb_payload;
	git_push_transfer_progress transfer_progress_cb;
	void *transfer_progress_cb_payload;
45 46
};

47 48 49 50 51 52 53
/**
 * Free the given push status object
 *
 * @param status The push status object
 */
void git_push_status_free(push_status *status);

54
#endif