Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:38

0001 /*
0002  * Copyright (C) the libgit2 contributors. All rights reserved.
0003  *
0004  * This file is part of libgit2, distributed under the GNU GPL v2 with
0005  * a Linking Exception. For full terms see the included COPYING file.
0006  */
0007 #ifndef INCLUDE_git_net_h__
0008 #define INCLUDE_git_net_h__
0009 
0010 #include "common.h"
0011 #include "oid.h"
0012 #include "types.h"
0013 
0014 /**
0015  * @file git2/net.h
0016  * @brief Git networking declarations
0017  * @ingroup Git
0018  * @{
0019  */
0020 GIT_BEGIN_DECL
0021 
0022 #define GIT_DEFAULT_PORT "9418"
0023 
0024 /**
0025  * Direction of the connection.
0026  *
0027  * We need this because we need to know whether we should call
0028  * git-upload-pack or git-receive-pack on the remote end when get_refs
0029  * gets called.
0030  */
0031 typedef enum {
0032     GIT_DIRECTION_FETCH = 0,
0033     GIT_DIRECTION_PUSH  = 1
0034 } git_direction;
0035 
0036 /**
0037  * Description of a reference advertised by a remote server, given out
0038  * on `ls` calls.
0039  */
0040 struct git_remote_head {
0041     int local; /* available locally */
0042     git_oid oid;
0043     git_oid loid;
0044     char *name;
0045     /**
0046      * If the server send a symref mapping for this ref, this will
0047      * point to the target.
0048      */
0049     char *symref_target;
0050 };
0051 
0052 /** @} */
0053 GIT_END_DECL
0054 #endif