1 /* 2 * Copyright (C) the libgit2 contributors. All rights reserved. 3 * 4 * This file is part of libgit2, distributed under the GNU GPL v2 with 5 * a Linking Exception. For full terms see the included COPYING file. 6 */ 7 module libgit2_d.net; 8 9 10 private static import libgit2_d.oid; 11 12 /** 13 * @file git2/net.h 14 * @brief Git networking declarations 15 * @ingroup Git 16 * @{ 17 */ 18 extern (C): 19 nothrow @nogc: 20 public: 21 22 enum GIT_DEFAULT_PORT = "9418"; 23 24 /** 25 * Direction of the connection. 26 * 27 * We need this because we need to know whether we should call 28 * git-upload-pack or git-receive-pack on the remote end when get_refs 29 * gets called. 30 */ 31 enum git_direction 32 { 33 GIT_DIRECTION_FETCH = 0, 34 GIT_DIRECTION_PUSH = 1, 35 } 36 37 /** 38 * Description of a reference advertised by a remote server, given out 39 * on `ls` calls. 40 */ 41 struct git_remote_head 42 { 43 /** 44 * available locally 45 */ 46 int local; 47 48 libgit2_d.oid.git_oid oid; 49 libgit2_d.oid.git_oid loid; 50 char* name; 51 52 /** 53 * If the server send a symref mapping for this ref, this will 54 * point to the target. 55 */ 56 char* symref_target; 57 } 58 59 /** @} */