mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-23 07:31:36 +00:00

There is one well-known and well-tested parser which we should use, instead of implementing parsing a second time. The common parser is also augmented to copy the LHS into the RHS if the latter is empty. The expressions test had to change a bit, as we now catch a bad RHS of a refspec locally.
55 lines
1.0 KiB
C
55 lines
1.0 KiB
C
/*
|
|
* 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_push_h__
|
|
#define INCLUDE_push_h__
|
|
|
|
#include "git2.h"
|
|
#include "refspec.h"
|
|
|
|
typedef struct push_spec {
|
|
struct git_refspec refspec;
|
|
|
|
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;
|
|
|
|
/* options */
|
|
unsigned pb_parallelism;
|
|
|
|
git_packbuilder_progress pack_progress_cb;
|
|
void *pack_progress_cb_payload;
|
|
git_push_transfer_progress transfer_progress_cb;
|
|
void *transfer_progress_cb_payload;
|
|
};
|
|
|
|
/**
|
|
* Free the given push status object
|
|
*
|
|
* @param status The push status object
|
|
*/
|
|
void git_push_status_free(push_status *status);
|
|
|
|
#endif
|